$TITLE  MERGE 5

*	Default assumptions are specified here:

$if not set flex	$set flex ref
$if not set ghglim	$set ghglim ref
$if not set cse		$set cse ref
$if not set damages	$set damages no
$if not set lbd		$set lbd no
$if not set abate	$set abate no
$if not set sinks	$set sinks no
$if not set basis	$set basis ref

*==>$include "M5.SET"

* ------------------------------- M5.SET -------------------------------*

*  This section of the code contains the set definitions and also the
*  parameters associated with the time periods.

*  This GAMS model is designed so that the time intervals may be of unequal
*  length.

SETS

    iter         Negishi iterations
                 /it0*it10/;
*                /it0/;

SCALAR

    arbm      Arbitrary multiplier on utility in last time period     / 3/;

SETS

    yr           Years
                 /1990*2200/

    tp(yr)       Time periods (starting year)
                 /2000,
                  2010, 2020, 2030, 2040, 2050,
                  2060, 2070, 2080, 2090, 2100,
                  2110, 2120, 2130, 2140, 2150,
                  2160, 2170, 2180, 2190, 2200/

    tp10(tp)
                 /2010, 2020, 2030, 2040, 2050,
                  2060, 2070, 2080, 2090, 2100,
                  2110, 2120, 2130, 2140, 2150,
                  2160, 2170, 2180, 2190, 2200/

    tp20(tp)
                 /      2020, 2030, 2040, 2050,
                  2060, 2070, 2080, 2090, 2100,
                  2110, 2120, 2130, 2140, 2150,
                  2160, 2170, 2180, 2190, 2200/

    tp30(tp)
                 /            2030, 2040, 2050,
                  2060, 2070, 2080, 2090, 2100,
                  2110, 2120, 2130, 2140, 2150,
                  2160, 2170, 2180, 2190, 2200/

    tp40(tp)
                 /                  2040, 2050,
                  2060, 2070, 2080, 2090, 2100,
                  2110, 2120, 2130, 2140, 2150,
                  2160, 2170, 2180, 2190, 2200/

    tp50(tp)
                 /                        2050,
                  2060, 2070, 2080, 2090, 2100,
                  2110, 2120, 2130, 2140, 2150,
                  2160, 2170, 2180, 2190, 2200/

    tp60(tp)
                 /2060, 2070, 2080, 2090, 2100,
                  2110, 2120, 2130, 2140, 2150,
                  2160, 2170, 2180, 2190, 2200/

    tp70(tp)
                 /      2070, 2080, 2090, 2100,
                  2110, 2120, 2130, 2140, 2150,
                  2160, 2170, 2180, 2190, 2200/

    tp00(tp)
                 /                        2100,
                  2110, 2120, 2130, 2140, 2150,
                  2160, 2170, 2180, 2190, 2200/

    lk(tp)       Time periods for which activities are locked (starting year)
                       /2000, 2010, 2020/

    sy(tp)       Start year - afforestation activities
                /2010, 2020, 2030, 2040, 2050,
                 2060, 2070, 2080, 2090, 2100,
                 2110, 2120, 2130, 2140, 2150/

SETS
    tbase(tp)    Base year
    pp(tp)       Projection periods (all periods but the base period)
    tperly(tp)   Early years
    tlast(tp)    Last time period
    ylast(yr)    Last year;

tbase(tp)   =  yes$(ord(tp) eq 1);
pp(tp)      =  yes$(ord(tp) ne 1);
tperly(tp)  =  yes$(ord(tp) ne card(tp));
tlast(tp)   =  yes$(ord(tp) eq card(tp));
ylast(yr)   =  yes$(ord(yr) eq card(yr));

*display tp, tbase, pp, tperly,  tlast, ylast;

* -------------------------------------------------------------------------
*   To change number of scenarios, must modify SW (SW1,SW2), PROB.
* -------------------------------------------------------------------------

SETS
    sw           State of world
                 /sw1/;

PARAMETER
    prob(*)      Probability of each state of world
                 /sw1   1.0/;

* -------------------------------------------------------------------------

SCALAR
    res          Period of resolution
                 /2000/;

* -------------------------------------------------------------------------
*   Need following scalar to calibrate equilibrium tolerance

SCALAR
    equil        Equilibrium tolerance
                 /100/;

TABLE  fyr(*,*)  First Year of Time Period

                    fy

           2000    2000
           2005    2005
           2010    2010
           2015    2015

           2020    2020
           2030    2030
           2040    2040
           2050    2050
           2060    2060
           2070    2070
           2075    2075
           2080    2080
           2090    2090
           2100    2100
           2110    2110
           2120    2120
           2130    2130
           2140    2140
           2150    2150
           2160    2160
           2170    2170
           2180    2180
           2190    2190
           2200    2200;

PARAMETERS
    te(tp)          Years elapsed since beginning of first period
    nyper(tp)       Number of years in a given period - forward diff;

LOOP(tbase,
     te(tp) = fyr(tp,"fy") - fyr(tbase, "fy")
    );

PARAMETER	year(tp)	First year of time period;
year(tp) = fyr(tp,"fy");

nyper(tp) = te(tp+1) - te(tp);
nyper(tp)$(ord(tp) eq card(tp)) = nyper(tp-1);

PARAMETERS
yb(yr,tp)    Years belonging to period tp ;
* The following statement assigns to the set YB(*,TP) all those years that
* belong to the period TP.  The OR condition insures that the very last year
* is assigned to the very last period.

yb(yr+10,tp) = yes$(((ord(yr) ge (te(tp) + 1)) and ( ord(yr) lt (te(tp+1) + 1)))
                  or ((ord(yr) eq card(yr)) and (ord(tp) eq card(tp))));
*display te, yb;

TABLE st(* ,* )  Combinations of sw and tp requiring constraints

*   Table is set up for either one or two sw.  See also the following loop
*   for modifications based on scalar res declared above.

                     sw1   sw2

           1990       1
           2000       1
           2010       1

           2020       1
           2030       1     1
           2040       1     1
           2050       1     1

           2060       1     1
           2070       1     1
           2075       1     1
           2080       1     1
           2090       1     1
           2100       1     1

           2110       1     1
           2120       1     1
           2130       1     1
           2140       1     1
           2150       1     1

           2160       1     1
           2170       1     1
           2180       1     1
           2190       1     1
           2200       1     1
           ;


LOOP((tp,sw)$((ord(sw) ne 1) $(fyr(tp,"fy") le res)),
   st(tp,sw) = 0;
);


SETS

    mp           Macroeconomic data
                 /kgdp, depr, esub, kpvs, elvs, intpr, pnref,
                  xntax, xetax, decf, nshf, expf, nxpf, ogpd, clgdp, nw/

    at           All technologies
                 /
    		 hydro	  	Existing hydroelectric (exogenous),
    		 nuc-r	  	Existing nuc-rlear electric, 
    		 nuc-n		Advanced nuc-rlear electric (Gen III, Gen IV), 
    		 oil-r		Remaining oil-fired electric, 
    		 gas-r		Remaining gas-fired electric,
    		 gas-n		New vintage gas electric, 
    		 gas-ncs		New vintage gas electric with CCS,
    		 coal-r		Remaining coal-fired electric, 
    		 coal-rcs 	Remaining coal-fired electric with CCS, 
    		 coal-n		New coal-fired electric,
    		 coal-ncs		New coal-fired electric with CCS,
    		 wind-lc		Lower-cost renewable electric,
    		 wind-hc		Conventional renewable electric (wind-solar), 
    		 lbde		Learning-by-doing electric,
    
    		 gas-1*gas-10	Natural gas supply,	
    		 oil-1*oil-10	Oil spply including tar sands and shale oil,
    		 coal		Coal supply for both electric and non-electric,
    
    		 bfuel		Biomass non-electric energy, 
    		 synf		Coal-based synthetic fuels,
    		 cldu		Coal for direct use -- primarily industrial use, 
    		 neb-hc		"Non-electric backstop -- high cost for CCSP, assumed to be 25% high-cost biomass and 75% wind & solar hydrogen,"
    		 neb-lc		Non-electric backstop -- low cost, 
    		 lbdn		Learning by doing nonelectric/

    
    et(at)       Electricity technologies
                 /hydro, nuc-r, oil-r, gas-r, gas-n, gas-ncs,
                  coal-r, coal-rcs, coal-n, coal-ncs,
                  wind-lc, wind-hc, nuc-n, lbde/

    nt(at)       Nonelectric energy supply technologies

                 /gas-1, gas-2, gas-3, gas-4, gas-5,
                  gas-6, gas-7, gas-8, gas-9, gas-10,

                  oil-1, oil-2, oil-3, oil-4, oil-5,
                  oil-6, oil-7, oil-8, oil-9, oil-10,

                  bfuel, synf, cldu, coal,
                  neb-hc, neb-lc, lbdn/

    dle(et)      Electricity technologies subject to decline limits
                 /gas-n, gas-ncs, coal-n, wind-lc, coal-ncs, wind-hc, nuc-n, lbde/

    dln(nt)      Nonelectric technologies subject to decline limits
                 /synf, cldu, neb-hc, neb-lc, lbdn/

    xle(et)      Electricity technologies subject to expansion limits
                 /lbde, coal-ncs, wind-hc, nuc-n, gas-ncs, wind-lc/

    xlg(et)      Gas-fired electricity technologies subject to expansion limits
                 /gas-r, gas-n/

    xln(nt)      Nonelectric technologies subject to expansion limits
                 /bfuel, synf, lbdn, neb-hc, neb-lc/

    x(nt)        Exhaustible fossil fuel resources
                 /gas-1, gas-2, gas-3, gas-4, gas-5,
                  gas-6, gas-7, gas-8, gas-9, gas-10,

                  oil-1, oil-2, oil-3, oil-4, oil-5,
                  oil-6, oil-7, oil-8, oil-9, oil-10,

                  coal/

    oilc(nt)     Oil cost categories
                 /oil-1, oil-2, oil-3, oil-4, oil-5,
                  oil-6, oil-7, oil-8, oil-9, oil-10/

    gasc(nt)     Gas cost categories
                 /gas-1, gas-2, gas-3, gas-4, gas-5,
                  gas-6, gas-7, gas-8, gas-9, gas-10/

    trd          Tradeable goods
                 /nmr, oil, gas, crt/

    ghg          Greenhouse gases
                 /co2, ch4, n2o, slf, llf/

    ogg(ghg)     Other (non-carbon) greenhouse gases
                 /ch4, n2o, slf, llf/

    box          Co2 decay boxes
                 /box1*box5/

    abx          Abatement cost index
                 /1*11/

    rr           Report rows /gdp, con, invd, invf, elec, nelec, tpe/

    rg           Regions
                 /usa, weur, japan, canz, eefsu, china, india, oilex, row/

    anb(rg)      Annex B regions
                 /usa, weur, japan, canz, eefsu/

    nanb(rg)     Non-Annex B regions
                 /china, india, oilex, row/

    alias(r,rg);

*==>$include "tables\MACRO.TAB"
*-----------------------------  MACRO.TAB  -----------------------------*

*  This data file contains the macroeconomic parameter values.

*  Source: EIA,  International Energy Outlook 2004, Appendix Table A14.
*  See IEO-2004.xls

TABLE pop(*, *)    Regional population - billions

        usa     weur    japan   canz    eefsu   china   india   oilex   row     world
1990    0.255   0.376   0.124   0.048   0.412   1.155   0.846   0.219   1.827   5.263
2000    0.276   0.390   0.127   0.054   0.411   1.275   1.017   0.273   2.239   6.061
2010    0.309   0.396   0.128   0.058   0.402   1.365   1.174   0.329   2.663   6.825
2020    0.335   0.397   0.126   0.062   0.393   1.429   1.312   0.388   3.088   7.531

inf     0.335   0.397   0.126   0.062   0.393   1.500   1.500    0.635  5.052   10.000
;

$ontext
Source for values at inf:  OECD and EEFSU constant from 2020.  China and India
stabilize at identical levels.  OILEX and ROW chosen so that world population
will be 10 billion.  Exponential approach to a stationary population.
$offtext

PARAMETERS
	apop(rg)        population parameter a
	bpop(rg)        population parameter b
	cpop(rg)        population parameter c;

apop(rg)   =    pop("inf",rg);
bpop(rg)   =    pop("inf",rg)-pop("2020",rg);
cpop(rg)   =   (pop("inf",rg)-pop("2020",rg))/(pop("inf",rg)-pop("2000",rg));
cpop(rg)   =    cpop(rg)**(1/20);

*  To rule out a decline in population of any one region.
cpop(rg)   =    MIN(1, cpop(rg));

*  Note that "te" counts the number of years elapsed since 2000.

pop(tp20,rg)       =  apop(rg) - bpop(rg)*(cpop(rg)**(te(tp20)-20));
pop(tp20,"world")  =  sum(rg, pop(tp20,rg));

DISPLAY apop, bpop, cpop, POP;

*TABLE POTGDP(tp,rg)  Potential GDP - market exchange rates - trillion 1997 dollars
 TABLE POTGDP(* , *)    Potential GDP - market exchange rates - trillion 1997 dollars

          usa    weur   japan    canz   eefsu   china   india   oilex     row    world

2000    9.370   9.356   4.395   1.267   0.976   1.120   0.492   0.861   4.098   31.937
2010   12.427  11.233   5.085   1.696   1.521   2.228   0.833   1.148   5.942   42.113
2020   16.503  13.894   6.046   2.227   2.253   3.877   1.381   1.667   8.917   56.765
;

potgdp(tp,rg) = (9.817/9.370)*potgdp(tp,rg);
potgdp(tp,"world") = sum (rg, potgdp(tp,rg));

DISPLAY "1997 dollars are converted to 2000 dollars."

DISPLAY POTGDP;

PARAMETERS

YRPC(tp)          YEARS AFTER 2000

APCL(rg)          PER CAPITA LOGISTIC FUNCTION PARAMETER A
BPCL(rg)          PER CAPITA LOGISTIC FUNCTION PARAMETER B
CPCL(rg)          PER CAPITA LOGISTIC FUNCTION PARAMETER C;


*TABLE PCGDP(tp,rg)   POTENTIAL PER CAPITA GDP - THOUSAND DOLLARS - 2000 PURCHASING POWER
 TABLE PCGDP(* ,* )   POTENTIAL PER CAPITA GDP - THOUSAND DOLLARS - 2000 PURCHASING POWER

        usa      weur   japan   canz    eefsu   china   india   oilex   row

2100    115       105     105    105       50      50      25      25    25
INF     200       200     200    200      200     200     200     200   200  ;

PCGDP("2000",rg)  =  POTGDP("2000",rg)/pop("2000",rg);

parameter yr00(tp)   years after 2000;

*  When using time intervals other than DECADES, must change following:

yr00(tp) =  (ord(tp) - 1) * 10;

display yr00;

APCL(rg) =  PCGDP("inf",rg);
BPCL(rg) =  (APCL(rg)/PCGDP("2000",rg)) - 1;

CPCL(rg) =  (1/BPCL(rg)) * ((APCL(rg)/PCGDP("2100",rg)) - 1);
CPCL(rg) = (1/100) *  LOG(CPCL(rg)) ;

PCGDP(tp,rg)  =  1 + BPCL(rg)*EXP(CPCL(rg) * yr00(tp));

PCGDP(tp,rg)  =  APCL(rg)/PCGDP(tp,rg);

POTGDP(tp,rg)  = pop(tp,rg) * PCGDP(tp,rg) ;

POTGDP(tp,"world") = SUM(rg, POTGDP(tp,rg));

DISPLAY APCL, BPCL, CPCL, PCGDP, POTGDP, NYPER, TBASE;

*  UNITS: TRILLION DOLLARS, EXAJOULES, TKWH, BILLION TONS OF CARBON.

*TABLE MACRO(mp, rg)  MACROECONOMIC AND OTHER PARAMETERS
 TABLE MACRO(mp, * )  MACROECONOMIC AND OTHER PARAMETERS

       usa     weur   japan   canz    eefsu   china    india    oilex  row

KGDP   2.4     2.8     2.8     2.8     3.0      3.0     3.0     3.0     3.0
DEPR   5.00    5.00    5.00    5.00    5.00     5.00    5.00    5.00    5.00

ESUB   0.50    0.50    0.50    0.50    0.40     0.40    0.40    0.40    0.40
KPVS   0.24    0.28    0.28    0.28    0.30     0.30    0.30    0.30    0.30
ELVS   0.45    0.45    0.45    0.45    0.45     0.45    0.45    0.45    0.45

INTPR  4.00    4.00    4.00    4.00    3.70     4.00    4.00    3.70    4.00

PNREF  2.75    5.00    6.00    4.00    2.50     2.50    2.50    2.50    2.50

XNTAX          5.00    5.00    2.50
XETAX

*      usa     weur   japan   canz    eefsu   china    india   oilex   row

*  MAXIMUM DECLINE AND EXPANSION FACTORS, ANNUAL.

*	June 23, 2006: Changed from 0.98 to 0.95 to reduce use of 
*	the carbon relaxation constraint in years prior to 2100.

DECF   0.965   0.965   0.965   0.965   0.965    0.965   0.965   0.965   0.965
NSHF   0.01    0.01    0.01    0.01    0.01     0.01    0.01    0.01    0.01
EXPF   1.1161  1.1161  1.1161  1.1161  1.1161   1.1161  1.1161  1.1161  1.1161
NXPF   1.1161  1.1161  1.1161  1.1161  1.1161   1.1161  1.1161  1.1161  1.1161

*  MISCELLANEOUS FACTORS

OGPD   1.25    1.25    1.25    1.25    1.25     1.25    1.25    1.25    1.25
CLGDP          -.35    -.35                      .35     .35
NW      .230    .239    .095    .034    .042     .085    .037    .047    .190
;

$ontext
Terminology:

KGDP   INITIAL CAPITAL-GDP RATIO
DEPR   ANNUAL PERCENT DEPRECIATION

ESUB   ELASTICITY BETWEEN K-L AND E-N
KPVS   CAPITAL VALUE SHARE PARAMETER
ELVS   ELECTRIC VALUE SHARE PARAMETER

INTPR  INTERNATIONAL PRICE OF OIL - BASE YEAR - DOLLARS PER GJ
PNREF  REFERENCE PRICE OF NON-ELECTRIC ENERGY - DOLLARS PER GJ

XNTAX  EXISTING TAX RATE ON NONELECTRIC ENERGY
XETAX  EXISTING TAX RATE ON ELECTRIC ENERGY

DECF   MAX DECLINE FACTOR (ANNUAL) FOR PE-DL AND SYNF TECHNOLOGIES
NSHF   MAX MARKET SHARE FACTOR FOR EX AND NX TECHNOLOGIES
EXPF   MAX EXPANSION FACTOR (ANNUAL) FOR EX (ELECTRIC) TECHNOLOGIES
NXPF   MAX EXPANSION FACTOR (ANNUAL) FOR NX (NONELECTRIC) TECHNOLOGIES

OGPD   OIL-GAS PRICE DIFFERENTIAL - DOLLARS PER GJ
CLGDP  COAL-GDP GROWTH ELASTICITY - NO GROWTH POST-2050
NW     INITIAL VALUES OF NEGISHI WEIGHTS
$OFFTEXT

SCALAR
WORLDNW     WORLD CHECKSUM OF INITIAL NEGISHI WEIGHTS;
WORLDNW     = SUM(rg, MACRO("nw",rg));
DISPLAY WORLDNW;

*PARAMETER MPC(tp);
 PARAMETER MPC(* );

MPC("2000")      =  5.0;
MPC("2005")      =  4.95;
MPC("2010")      =  4.9;

MPC("2015")      =  4.85;
MPC("2020")      =  4.8;
MPC("2030")      =  4.7;
MPC("2040")      =  4.6;
MPC("2050")      =  4.5;

MPC("2060")      =  4.4;
MPC("2070")      =  4.3;
MPC("2080")      =  4.2;
MPC("2090")      =  4.1;
MPC("2100")      =  4.0;

MPC("2110")      =  3.9;
MPC("2120")      =  3.8;
MPC("2130")      =  3.7;
MPC("2140")      =  3.6;
MPC("2150")      =  3.5;

MPC("2160")      =  3.4;
MPC("2170")      =  3.3;
MPC("2180")      =  3.2;
MPC("2190")      =  3.1;
MPC("2200")      =  3.0;

MPC(tp)          =  MPC(tp)/100;

PARAMETERS

GROW(tp,rg)         POTENTIAL GDP GROWTH RATES - ANNUAL PERCENT
PGRO(tp,rg)         POPULATION GROWTH RATES - ANNUAL PERCENT;

GROW(tp,rg) = (POTGDP(tp+1,rg)/POTGDP(tp,rg))**(1/NYPER(TP)) - 1;
PGRO(tp,rg) =    (pop(tp+1,rg)/   pop(tp,rg))**(1/NYPER(TP)) - 1;

GROW(tp,rg) $ (ORD(tp) eq CARD(tp))
            = (POTGDP(tp,rg) - POTGDP(tp-1,rg))/
              (POTGDP(tp,rg) *  NYPER(tp-1));

PGRO(tp,rg) $ (ORD(tp) eq CARD(tp))
            = (   pop(tp,rg) -    pop(tp-1,rg))/
              (   pop(tp,rg) *  NYPER(tp-1));

GROW(tp,rg)  = 100 * GROW(tp,rg);
PGRO(tp,rg)  = 100 * PGRO(tp,rg);

DISPLAY GROW,PGRO;

PARAMETERS
AEEI(tp,rg)   AUTONOMOUS ENERGY EFFICIENCY IMPROVEMENT RATE - PERCENT PER YEAR;

*Based on Grubler suggestion for EMF 14 ground rules.  AEEI proportional to
*annual growth rate of per capita income.

AEEI(tp,rg)              = .50 * (GROW(tp,rg)-PGRO(tp,rg));
AEEI("2000",rg)$anb(rg)  = .80 * (GROW("2000",rg)-PGRO("2000",rg));
AEEI("2010",rg)$anb(rg)  = .70 * (GROW("2010",rg)-PGRO("2000",rg));

OPTION DECIMALS = 3;
DISPLAY AEEI;

GROW(tp,rg)  = .01 * GROW(tp,rg);
PGRO(tp,rg)  = .01 * PGRO(tp,rg);
AEEI(tp,rg)  = .01 * AEEI(tp,rg);

*==>$include "tables\TRADE.TAB"
*-----------------------------  TRADE.TAB  -----------------------------*

*  This data file contains the trade-related parameter values.

*  Values for 2000 are based on BP Statistical Review, 2004. See BP-2004.XLS.

TABLE oilx(* , *) Oil export limits (exaj)

          usa     weur    japan    canz    eefsu   china   india   oilex  row
2000    -26.0    -16.0    -12.2     1.4     8.0    -4.2    -3.2    45.2     6.9

2010      INF      INF      INF      INF    10.0     INF     INF    INF    INF
2020      INF      INF      INF      INF    15.0     INF     INF    INF    INF
2030      INF      INF      INF      INF    20.0     INF     INF    INF    INF
2040      INF      INF      INF      INF    25.0     INF     INF    INF    INF
2050      INF      INF      INF      INF    30.0     INF     INF    INF    INF

2060      INF      INF      INF      INF    INF      INF     INF    INF    INF
2070      INF      INF      INF      INF    INF      INF     INF    INF    INF
2080      INF      INF      INF      INF    INF      INF     INF    INF    INF
2090      INF      INF      INF      INF    INF      INF     INF    INF    INF
2100      INF      INF      INF      INF    INF      INF     INF    INF    INF

2110      INF      INF      INF      INF    INF      INF     INF    INF    INF
2120      INF      INF      INF      INF    INF      INF     INF    INF    INF
2130      INF      INF      INF      INF    INF      INF     INF    INF    INF
2140      INF      INF      INF      INF    INF      INF     INF    INF    INF
2150      INF      INF      INF      INF    INF      INF     INF    INF    INF

2160      INF      INF      INF      INF    INF      INF     INF    INF    INF
2170      INF      INF      INF      INF    INF      INF     INF    INF    INF
2180      INF      INF      INF      INF    INF      INF     INF    INF    INF
2190      INF      INF      INF      INF    INF      INF     INF    INF    INF
2200      INF      INF      INF      INF    INF      INF     INF    INF    INF
;

oilx(tbase,"world") = sum (rg, oilx(tbase,rg));


TABLE oilm(* , *) Oil import limits (exaj)

          usa     weur    japan    canz    eefsu   china   india   oilex  row
2000     26.0     16.0     12.2     -1.4    -8.0     4.2     3.2   -45.2   -6.9

2010      INF      INF      INF      INF     INF     INF     INF    INF    INF
2020      INF      INF      INF      INF     INF     INF     INF    INF    INF
2030      INF      INF      INF      INF     INF     INF     INF    INF    INF
2040      INF      INF      INF      INF     INF     INF     INF    INF    INF
2050      INF      INF      INF      INF     INF     INF     INF    INF    INF

2060      INF      INF      INF      INF     INF     INF     INF    INF    INF
2070      INF      INF      INF      INF     INF     INF     INF    INF    INF
2080      INF      INF      INF      INF     INF     INF     INF    INF    INF
2090      INF      INF      INF      INF     INF     INF     INF    INF    INF
2100      INF      INF      INF      INF     INF     INF     INF    INF    INF

2110      INF      INF      INF      INF     INF     INF     INF    INF    INF
2120      INF      INF      INF      INF     INF     INF     INF    INF    INF
2130      INF      INF      INF      INF     INF     INF     INF    INF    INF
2140      INF      INF      INF      INF     INF     INF     INF    INF    INF
2150      INF      INF      INF      INF     INF     INF     INF    INF    INF

2160      INF      INF      INF      INF     INF     INF     INF    INF    INF
2170      INF      INF      INF      INF     INF     INF     INF    INF    INF
2180      INF      INF      INF      INF     INF     INF     INF    INF    INF
2190      INF      INF      INF      INF     INF     INF     INF    INF    INF
2200      INF      INF      INF      INF     INF     INF     INF    INF    INF
;

DISPLAY oilx, oilm;

TABLE gasx(* , *) Gas export limits (exaj)

          usa     weur    japan    canz    eefsu   china   india   oilex  row

2000      -4.2     -4.5     -2.7     3.9     3.3     0.0     0.0    0.7    3.7

2010      -5.0      INF      INF     5.0     7.5             INF    INF    INF
2020      -2.5      INF      INF     2.5    15.0             INF    INF    INF
2030       INF      INF      INF     INF    22.5             INF    INF    INF
2040       INF      INF      INF     INF    30.0             INF    INF    INF
2050       INF      INF      INF     INF    37.5             INF    INF    INF

2060       INF      INF      INF     INF    45.0             INF    INF    INF
2070       INF      INF      INF     INF    52.5             INF    INF    INF
2080       INF      INF      INF     INF    60.0             INF    INF    INF
2090       INF      INF      INF     INF    67.5             INF    INF    INF
2100       INF      INF      INF     INF    75.0             INF    INF    INF

2110       INF      INF      INF     INF     INF             INF    INF    INF
2120       INF      INF      INF     INF     INF             INF    INF    INF
2130       INF      INF      INF     INF     INF             INF    INF    INF
2140       INF      INF      INF     INF     INF             INF    INF    INF
2150       INF      INF      INF     INF     INF             INF    INF    INF

2160       INF      INF      INF     INF     INF             INF    INF    INF
2170       INF      INF      INF     INF     INF             INF    INF    INF
2180       INF      INF      INF     INF     INF             INF    INF    INF
2190       INF      INF      INF     INF     INF             INF    INF    INF
2200       INF      INF      INF     INF     INF             INF    INF    INF
;

gasx(tbase,"world") = sum (rg, gasx(tbase,rg));

TABLE gasm(* , *) Gas import limits (exaj)

          usa     weur    japan    canz    eefsu   china   india   oilex  row

2000      4.2      4.5      2.7     -3.9    -3.3     0.0     0.0    -0.7   -3.7

2010      5.0      INF      INF     -5.0     INF     2.0     1.0     INF    INF
2015      5.0      INF      INF     -5.0     INF     3.0     1.5     INF    INF

2020      2.5      INF      INF     -2.5     INF     4.0     2.0     INF    INF
2030      INF      INF      INF      INF     INF     6.0     3.0     INF    INF
2040      INF      INF      INF      INF     INF     8.0     4.0     INF    INF
2050      INF      INF      INF      INF     INF    10.0     5.0     INF    INF

2060      INF      INF      INF      INF     INF     INF     INF     INF    INF
2070      INF      INF      INF      INF     INF     INF     INF     INF    INF
2080      INF      INF      INF      INF     INF     INF     INF     INF    INF
2090      INF      INF      INF      INF     INF     INF     INF     INF    INF
2100      INF      INF      INF      INF     INF     INF     INF     INF    INF

2110      INF      INF      INF      INF     INF     INF     INF     INF    INF
2120      INF      INF      INF      INF     INF     INF     INF     INF    INF
2130      INF      INF      INF      INF     INF     INF     INF     INF    INF
2140      INF      INF      INF      INF     INF     INF     INF     INF    INF
2150      INF      INF      INF      INF     INF     INF     INF     INF    INF

2160      INF      INF      INF      INF     INF     INF     INF     INF    INF
2170      INF      INF      INF      INF     INF     INF     INF     INF    INF
2180      INF      INF      INF      INF     INF     INF     INF     INF    INF
2190      INF      INF      INF      INF     INF     INF     INF     INF    INF
2200      INF      INF      INF      INF     INF     INF     INF     INF    INF
;

gasx(tbase,"world") = sum (rg, gasx(tbase,rg));
DISPLAY GASX, GASM;

TABLE synx(* , *) Synthetic fuels export limits (exaj)

          usa     weur    japan    canz    eefsu   china   india   oilex  row
2010      INF      INF      INF      INF    INF     INF     INF     INF    INF
2015      INF      INF      INF      INF    INF     INF     INF     INF    INF

2020      INF      INF      INF      INF    INF     INF     INF     INF    INF
2030      INF      INF      INF      INF    INF     INF     INF     INF    INF
2040      INF      INF      INF      INF    INF     INF     INF     INF    INF
2050      INF      INF      INF      INF    INF     INF     INF     INF    INF

2060      INF      INF      INF      INF    INF     INF     INF     INF    INF
2070      INF      INF      INF      INF    INF     INF     INF     INF    INF
2080      INF      INF      INF      INF    INF     INF     INF     INF    INF
2090      INF      INF      INF      INF    INF     INF     INF     INF    INF
2100      INF      INF      INF      INF    INF     INF     INF     INF    INF

2110      INF      INF      INF      INF    INF     INF     INF     INF    INF
2120      INF      INF      INF      INF    INF     INF     INF     INF    INF
2130      INF      INF      INF      INF    INF     INF     INF     INF    INF
2140      INF      INF      INF      INF    INF     INF     INF     INF    INF
2150      INF      INF      INF      INF    INF     INF     INF     INF    INF

2160      INF      INF      INF      INF    INF     INF     INF     INF    INF
2170      INF      INF      INF      INF    INF     INF     INF     INF    INF
2180      INF      INF      INF      INF    INF     INF     INF     INF    INF
2190      INF      INF      INF      INF    INF     INF     INF     INF    INF
2200      INF      INF      INF      INF    INF     INF     INF     INF    INF
;


TABLE synm(* , *) Synthetic fuels import limits (exaj)

          usa     weur    japan    canz    eefsu   china   india   oilex  row
2010      INF      INF      INF      INF    INF     INF     INF     INF    INF
2020      INF      INF      INF      INF    INF     INF     INF     INF    INF
2030      INF      INF      INF      INF    INF     INF     INF     INF    INF
2040      INF      INF      INF      INF    INF     INF     INF     INF    INF
2050      INF      INF      INF      INF    INF     INF     INF     INF    INF

2060      INF      INF      INF      INF    INF     INF     INF     INF    INF
2070      INF      INF      INF      INF    INF     INF     INF     INF    INF
2080      INF      INF      INF      INF    INF     INF     INF     INF    INF
2090      INF      INF      INF      INF    INF     INF     INF     INF    INF
2100      INF      INF      INF      INF    INF     INF     INF     INF    INF

2110      INF      INF      INF      INF    INF     INF     INF     INF    INF
2120      INF      INF      INF      INF    INF     INF     INF     INF    INF
2130      INF      INF      INF      INF    INF     INF     INF     INF    INF
2140      INF      INF      INF      INF    INF     INF     INF     INF    INF
2150      INF      INF      INF      INF    INF     INF     INF     INF    INF

2160      INF      INF      INF      INF    INF     INF     INF     INF    INF
2170      INF      INF      INF      INF    INF     INF     INF     INF    INF
2180      INF      INF      INF      INF    INF     INF     INF     INF    INF
2190      INF      INF      INF      INF    INF     INF     INF     INF    INF
2200      INF      INF      INF      INF    INF     INF     INF     INF    INF
;

DISPLAY SYNX, SYNM;


TABLE eisxl(* , *) EIS export limits (billion dollars)

          usa     weur    japan    canz    eefsu   china   india   oilex  row
2000

2010      INF     INF      INF      INF     INF     INF     INF     INF    INF
2020      INF     INF      INF      INF     INF     INF     INF     INF    INF
2030      INF     INF      INF      INF     INF     INF     INF     INF    INF
2040      INF     INF      INF      INF     INF     INF     INF     INF    INF
2050      INF     INF      INF      INF     INF     INF     INF     INF    INF

2060      INF     INF      INF      INF     INF     INF     INF     INF    INF
2070      INF     INF      INF      INF     INF     INF     INF     INF    INF
2080      INF     INF      INF      INF     INF     INF     INF     INF    INF
2090      INF     INF      INF      INF     INF     INF     INF     INF    INF
2100      INF     INF      INF      INF     INF     INF     INF     INF    INF

2110      INF     INF      INF      INF     INF     INF     INF     INF    INF
2120      INF     INF      INF      INF     INF     INF     INF     INF    INF
2130      INF     INF      INF      INF     INF     INF     INF     INF    INF
2140      INF     INF      INF      INF     INF     INF     INF     INF    INF
2150      INF     INF      INF      INF     INF     INF     INF     INF    INF

2160      INF      INF      INF      INF    INF     INF     INF     INF    INF
2170      INF      INF      INF      INF    INF     INF     INF     INF    INF
2180      INF      INF      INF      INF    INF     INF     INF     INF    INF
2190      INF      INF      INF      INF    INF     INF     INF     INF    INF
2200      INF      INF      INF      INF    INF     INF     INF     INF    INF
;


TABLE eisml(* , *) EIS import limits (billion dollars)

          usa     weur    japan    canz    eefsu   china   india   oilex  row
2000

2010      INF     INF      INF      INF     INF     INF     INF     INF    INF
2020      INF     INF      INF      INF     INF     INF     INF     INF    INF
2030      INF     INF      INF      INF     INF     INF     INF     INF    INF
2040      INF     INF      INF      INF     INF     INF     INF     INF    INF
2050      INF     INF      INF      INF     INF     INF     INF     INF    INF

2060      INF     INF      INF      INF     INF     INF     INF     INF    INF
2070      INF     INF      INF      INF     INF     INF     INF     INF    INF
2080      INF     INF      INF      INF     INF     INF     INF     INF    INF
2090      INF     INF      INF      INF     INF     INF     INF     INF    INF
2100      INF     INF      INF      INF     INF     INF     INF     INF    INF

2110      INF     INF      INF      INF     INF     INF     INF     INF    INF
2120      INF     INF      INF      INF     INF     INF     INF     INF    INF
2130      INF     INF      INF      INF     INF     INF     INF     INF    INF
2140      INF     INF      INF      INF     INF     INF     INF     INF    INF
2150      INF     INF      INF      INF     INF     INF     INF     INF    INF

2160      INF      INF      INF      INF    INF     INF     INF     INF    INF
2170      INF      INF      INF      INF    INF     INF     INF     INF    INF
2180      INF      INF      INF      INF    INF     INF     INF     INF    INF
2190      INF      INF      INF      INF    INF     INF     INF     INF    INF
2200      INF      INF      INF      INF    INF     INF     INF     INF    INF
;

DISPLAY eisxl, eisml;

PARAMETER cstexp(trd)  Unit export cost
    / nmr   0,
      oil   0.333333,
      gas   2.0
      crt   0.1 /

*==>$include "tables\FLEX.%flex%"
*-----------------------------  FLEX.REF -------------------------------*

*  This data file contains the "where" and "when" flexibility parameters.

TABLE carxl(* , *) Carbon export limits (billion tons)

          usa     weur    japan    canz    eefsu   china   india   oilex  row
2010
2020
2030
2040
2050

TABLE carml(* , *) Carbon import limits (billion tons)

          usa     weur    japan    canz    eefsu   china   india   oilex  row
2010
2020
2030
2040
2050

TABLE dclim(* , *) Annual limits on carbon delay-banking activities - billion tons

          usa     weur    japan    canz    eefsu   china   india   oilex  row

2010
2020
2030
2040
2050
*==>$include "tables\CTAX.TAB"
*-------------------------------- TAX.TAB ---------------------------------*

*TABLE CTAX(tp,rg) - CARBON TAX - DOLLARS PER TON
 TABLE CTAX(* ,rg) - CARBON TAX - DOLLARS PER TON

         usa    weur    japan   canz    eefsu   china   india   oilex   row

   2000
   ;

DISPLAY CTAX;

*==>$include "tables\CARBON.TAB"
*---------------------------- CARBON.TAB --------------------------------*

PARAMETER	rcl(tp)		Relax carbon limit - penalty - dollars per ton;
rcl(tp)       = 100000;

$ontext

Heat rates for coal-r, oil-r and gas-r based on 2000 statistics appearing in
World Energy Outlook, 2002, International Energy Agency.  See HTRT-WEO.XLS.

Outside the OECD, these heat rates may be affected by the use of combined
heat and power.  To avoid unrealistic heat rate improvements, we fix coal-r,
oil-r and gas-r in EEFSU and Non-Annex B.  See M5.BND.

$offtext

TABLE htrt(et,rg)  Heat rates - gj per kwh

               usa       weur    japan    canz    eefsu    china    india   oilex   row
coal-r         9.4       9.8     8.4      9.4     15.6     11.6     11.8    10.1    10.1
oil-r          9.7       9.0     7.7      9.7     20.0     13.9     16.0     9.3     9.3
gas-r          9.9       7.6     10.0     9.9     19.3     10.5     12.8     9.2     9.2

hydro          10.0      10.0    10.0     10.0    10.0     10.0     10.0    10.0    10.0
nuc-r          10.0      10.0    10.0     10.0    10.0     10.0     10.0    10.0    10.0

*  Revised values based upon SFA.XLS:

gas-n          6.3       6.3     6.3      6.3     6.3      6.3      6.3     6.3     6.3

coal-n         7.9       7.9     7.9      7.9     7.9      7.9      7.9     7.9     7.9
wind-lc       10.0      10.0    10.0     10.0    10.0     10.0     10.0    10.0    10.0

coal-ncs       9.5       9.5     9.5      9.5     9.5      9.5      9.5     9.5     9.5

wind-hc       10.0      10.0    10.0     10.0    10.0     10.0     10.0    10.0    10.0
nuc-n	       10.0      10.0    10.0     10.0    10.0     10.0     10.0    10.0    10.0
lbde           10.0      10.0    10.0     10.0    10.0     10.0     10.0    10.0    10.0;

*	Carbon capture derates the heat rate.  Citations:
*
*	See page 3 (year 2012), Jeremy David and Howard Herzog, 
*	"The Cost of Carbon Capture" (MIT Working Paper, 2000).
*
*	EPRI Spreadsheet from George Booras

HTRT("coal-rcs",rg) = HTRT("coal-r",rg) + 1.7;
HTRT("coal-ncs",rg) = HTRT("coal-n",rg) + 1.3;
HTRT("gas-ncs",rg) = HTRT("gas-n",rg) + 1.5;

$ontext
     The values of the following carbon emission coefficients are based upon
EMF-12 ground rules:

        oil:  .01994 billion metric tons/exaj
        gas:  .01374 "                      "
        coal: .02412 "                      "
        synf: .04000 "                      "

     Electric coefficients are expressed per TWH.

$offtext


TABLE cecn(*,rg)  Carbon emission coefficients - nele - billion tons per exaj

                usa       weur    japan    canz   eefsu    china   india    oilex     row
oil          .01994     .01994   .01994  .01994  .01994   .01994  .01994   .01994  .01994
gas          .01374     .01374   .01374  .01374  .01374   .01374  .01374   .01374  .01374
cldu         .02412     .02412   .02412  .02412  .02412   .02412  .02412   .02412  .02412
synf         .04000     .04000   .04000  .04000  .04000   .04000  .04000   .04000  .04000;

TABLE cece(et,rg)	Carbon emission coefficients - elec - billion tons per twh

               usa       weur     japan    canz  eefsu    china   india    oilex     row
gas-n        .0935      .0935     .0935   .0935  .0935    .0935   .0935    .0935   .0935
;

cece("oil-r " ,rg)    =   htrt("oil-r " ,rg) * cecn("oil ",rg);
cece("gas-r " ,rg)    =   htrt("gas-r " ,rg) * cecn("gas ",rg);
cece("gas-n"  ,rg)    =   htrt("gas-n"  ,rg) * cecn("gas",rg);
cece("gas-ncs",rg)    =   htrt("gas-ncs"  ,rg) * cecn("gas",rg) * .05;
cece("coal-r" ,rg)    =   htrt("coal-r" ,rg) * cecn("cldu",rg);
cece("coal-rcs",rg)   =   htrt("coal-r",rg) * cecn("cldu",rg) * .10;
cece("coal-n" ,rg)    =   htrt("coal-n" ,rg) * cecn("cldu",rg);
cece("coal-ncs",rg)   =   htrt("coal-ncs"   ,rg) * cecn("cldu",rg) * .05;

DISPLAY htrt, cecn, cece;

SCALAR   syntpe   Adjustment for synfuels in TPE report /.66/;

*==>$include "tables\CLIMATE.TAB"
*----------------------------  CLIMATE.TAB ----------------------------*



*  This data file contains the climate and impacts parameter values.

TABLE global(*,*)  Global greenhouse gas factors - billion tons of gas

*                       Proxy F-gases:     hfc-134a   sf6
                co2     ch4     n2o        slf        llf
gwp           1.000      21     310        1300       22200
basestock             4.850   1.510
pi                     .60     .12         1          1
nonem          .200
nonemgr        .010
rffac         5.35    0.0360   .12
odecay1               0.083    .0083       .069       .0003125;

* Parameters derived from WIGLEY.XLS:

global("basestock", "slf")      =   20.20 * 17.14/1000000;
global("basestock", "llf")      =   24.93 * 25.05/1000000;
global("rffac    ", "slf")      =     .15 * 17.14;
global("rffac    ", "llf")      =     .52 * 25.05;
option decimals = 6;
display global;

$ontext
pi		Percentage of ogg subject to decay, MIT model

first-tier rffac:  p.358, "Climate Change 2001"

odecay1:        parameter delt0, MIT model

Note: CO2, CH4, and N2O have a natural "equilibrium" level so we apply
the decay function only to the stock above that natural level; i.e.
the anthropogenic contribution beyond preindustrial.

Caveat: If you change gwp(ghg) horizon, you must move around the
asterisks immediately below.  Also change gwp in TABLE GLOBAL.

Following factors refer, respectively, to 20 and 500 years (expressed
in terms of co2). Table GLOBAL refers to 100 years - also in terms of
co2. Following conversions are needed in order to express weights in
terms of carbon.

gwp("ch4")      =  56*12/44;
gwp("n2o")      = 280*12/44;

gwp("ch4")      = 6.5*12/44;
gwp("n2o")      = 170*12/44;


According to IPCC, "Climate Change 2001", concentrations in 1998:  p. 38
co2    365  ppm
ch4   1745  ppb
n2o    314  ppb

CO2: 1997 cement production produced 200 million tons of carbon.

from EMF21.XLS:
CH4 total anthropogenic  268  million tons
CH4 from natural gas      45
CH4 from coal             22

CH4 - non-energy         201
Natural                  160
Non-energy + natural     361

N2O: value based on EMF21.XLS - and annual growth rate between 2000 and 2010.

odecay1 (for slf and llf): MIT GAMS model parameter "delta", single
year dissipation rate
$offtext


PARAMETERS

	gwp(ghg)	Global warming potential - carbon-equivalence factors
	basestock(ghg)  Base year stock of each greenhouse gas - billion tons
	pi(ghg)         Percentage of ghg subject to decay
	eqstock(ghg)    Equilibrium stock of ghg
	nonem(ghg,tp)   Non-energy emissions of each greenhouse gas - billion tons
	nonemgr(ghg)    Annual growth rate of non-energy emissions
	rffac(ghg)      Multiplicative factor for measuring radiative forcing
	decay1(box)     Yearly retention factor for each fraction of carbon (box)
	odecay1(ghg)    Yearly retention factor for the other (non-co2) greenhouse gases;

gwp(ghg) $ (ord(ghg) ge 2)      = global("gwp",ghg)*12/44;
gwp("co2")                      = 1.0;
basestock(ghg)                  = global("basestock",ghg);
pi(ghg)                         = global("pi",ghg);
eqstock(ghg)                    = (1 - pi(ghg))*basestock(ghg);
nonem(ghg,"2000")               = global("nonem",    ghg);
nonemgr(ghg)                    = global("nonemgr",  ghg);
rffac(ghg)                      = global("rffac",    ghg);
decay1("box1") = 1.0000       ;
decay1("box2") = exp(-1/313.8);
decay1("box3") = exp(-1/79.8) ;
decay1("box4") = exp(-1/18.8) ;
decay1("box5") = exp(-1/1.7)  ;

odecay1(ghg)$(not sameas(ghg,"co2"))  = 1 - global("odecay1",ghg);

DISPLAY gwp, pi, eqstock, decay1, odecay1;

SET
    nyr           Years
                 /1*10/


*TABLE NYRTP(tp,nyr) Multipliers for calculating DECAY2 and ODECAY2 - number of years in each time period
 TABLE NYRTP(* ,nyr) Multipliers for calculating DECAY2 and ODECAY2 - number of years in each time period

        1   2   3   4   5   6   7   8   9   10
2000    1   1   1   1   1   1   1   1   1   1
2005    1   1   1   1   1
2010    1   1   1   1   1   1   1   1   1   1
2015    1   1   1   1   1
2020    1   1   1   1   1   1   1   1   1   1
2030    1   1   1   1   1   1   1   1   1   1
2040    1   1   1   1   1   1   1   1   1   1
2050    1   1   1   1   1   1   1   1   1   1
2060    1   1   1   1   1   1   1   1   1   1
2070    1   1   1   1   1   1   1   1   1   1
2080    1   1   1   1   1   1   1   1   1   1
2090    1   1   1   1   1   1   1   1   1   1
2100    1   1   1   1   1   1   1   1   1   1
2110    1   1   1   1   1   1   1   1   1   1
2120    1   1   1   1   1   1   1   1   1   1
2130    1   1   1   1   1   1   1   1   1   1
2140    1   1   1   1   1   1   1   1   1   1
2150    1   1   1   1   1   1   1   1   1   1
2160    1   1   1   1   1   1   1   1   1   1
2170    1   1   1   1   1   1   1   1   1   1
2180    1   1   1   1   1   1   1   1   1   1
2190    1   1   1   1   1   1   1   1   1   1
2200    1   1   1   1   1   1   1   1   1   1
;

PARAMETERS	decay2(*,box)     One period retention factor for each co2 box
		odecay2(*,*)      One period retention factor for each non-co2 gas;

decay2(tp,box)                   = sum(nyr, nyrtp(tp,nyr)* decay1(box)**(ord(nyr)-1));
odecay2(tp,ghg)$(not sameas(ghg,"co2")) = sum(nyr, nyrtp(tp,nyr)*odecay1(ghg)**(ord(nyr)-1));
display decay1, odecay1, decay2, odecay2;


$ontext
For the units of measurement and the equations in which the following
parameters appear, see A. Manne, R. Mendelsohn and R. Richels, "MERGE:  a
Model for Evaluating Regional and Global Effects of GHG Reduction Policies",
pp.143-172 in N.  Nakicenovic, W.  Nordhaus, R.  Richels and F.  Toth (eds.),
"Integrative Assessment of Mitigation, Impacts, and Adaptation to Climate
Change", CP-94-9, International Institute for Applied Systems Analysis,
Laxenburg, Austria, May 1994.
$offtext


SCALARS
   nco2      Pre-industrial level of CO2 assumed never to decay    / 594/
   rfex      Exponential term in N2O&CH4 rad. forcing relation     / 0.5/
   rfbase    Base year term for converting rad. forcing to PT      / 2.2/
   lag1      Yearly lag used to calculate AT from PT               / 0.038  /;

DISPLAY lag1;

PARAMETERS
	frac(box)	Fraction of CO2 emissions decaying within a certain box
	co2base(box)    Base level of CO2 emissions within each box
	inter(ghg)	Term simulating interactive subtractive effects of CH4&N2O
	sm(ghg)         Stock multiplier term for CH4&N2O - used for rad. forcing;

LOOP(tp,
     nonem(ghg,tp+1)   = (1+nonemgr(ghg))**nyper(tp) * nonem(ghg,tp);
);
nonem("co2",tp)$(fyr(tp,"fy")>2100)   = nonem("co2","2100");
DISPLAY nonem;


frac("box1") =  0.142;
frac("box2") =  0.241;
frac("box3") =  0.323;
frac("box4") =  0.206;
frac("box5") =  0.088;

*  2000 values from \M4.5\DIST\REF.LST, 2-26-02.
co2base("box1") = 44.444;
co2base("box2") = 66.461;
co2base("box3") = 65.929;
co2base("box4") = 20.310;
co2base("box5") =  1.316;

basestock("co2") = sum(box, co2base(box)) + nco2;

* Values based on IPCC, "Climate Change 2001: The Scientific Basis", pp. 248,251

display basestock;

basestock(ghg) = basestock(ghg)*gwp(ghg);
display "The following stocks are expressed in terms of carbon equivalents.",basestock;

basestock(ghg) = basestock(ghg)/gwp(ghg);
display "The following stocks are expressed in terms of original units.",basestock;

PARAMETER lag2(tp)	One period temperature lag - compounded from lag1;
lag2(tp)       =    1 - (1-lag1)**nyper(tp);
display lag2;

inter("ch4")  =  0.85;
inter("n2o")  =  0.92;
sm("ch4")     =  351.0;
sm("n2o")     =  206.7;

* This section contains parameters related to the impacts of climate change.

PARAMETER mdam(rg)  Market damage multipliers - fractional GDP loss for TEMPREF
    / usa        0.0025
      weur       0.0025
      japan      0.0025
      canz       0.0025
      eefsu      0.0025
      china      0.005
      india      0.005
      oilex      0.005
      row        0.005  /

PARAMETER  mkt(rg)  Latitude factor - temperature multiplier for market damages
    / usa    1.0
      weur   1.0
      japan  1.0
      canz   1.0
      eefsu  1.0
      china  1.0
      india  0.5
      oilex  0.5
      row    0.5  /

SCALAR	tempref Reference temperature for the market damage multipiers /2.5/;

PARAMETER	wtptemp(*)  Reference temperature for willingness to pay function
          / sw1   2.5
            sw2   2.5/;

PARAMETER	wtploss(* )  Reference loss - fractional gdp loss for wtptemp at high incomes
        /  sw1  0.02
           sw2  0.02 /;


PARAMETER catt(rg,sw)  Catastrophic temperature for non-market effects;

* Quadratic extrapolation from wtploss and wtptemp.
CATT(rg,sw)  =  (WTPTEMP(sw)**2/WTPLOSS(sw)) ** .5;

PARAMETER
	rfconv(*)  Multiplicative term for converting radiative forcing to PT
        /  sw1   .618/;


$ontext
Sulfur emissions based on IIASA B-2 marker scenario through 2100.  See SRES
(2000).  "Special Report on Emissions Scenarios".  A Special Report of Working
Group III of the Intergovernmental Panel on Climate Change.  Intergovernmental
Panel on Climate Change.  Cambridge University Press.
Post-2100, freehand extrapolation.
$offtext

PARAMETERS
*sem(sw,tp)       world sox emissions - energy-related - million tons of sulfur;
 sem(sw, *)       world sox emissions - energy-related - million tons of sulfur;

sem(sw,"1990")   =   70.9;
sem(sw,"2000")    =  69.0;

sem(sw,"2010")    =  65.9;
sem(sw,"2020")    =  61.3;
sem(sw,"2030")    =  60.3;
sem(sw,"2040")    =  59.0;

sem(sw,"2050")    =  55.7;
sem(sw,"2060")    =  53.8;
sem(sw,"2070")    =  50.9;
sem(sw,"2080")    =  50.0;
sem(sw,"2090")    =  49.0;
sem(sw,"2100")    =  47.9;

sem(sw,"2110")    =.95*sem(sw,"2100")  ;
sem(sw,"2120")    =.90*sem(sw,"2100")  ;
sem(sw,"2130")    =.85*sem(sw,"2100")  ;
sem(sw,"2140")    =.80*sem(sw,"2100")  ;
sem(sw,"2150")    =.75*sem(sw,"2100")  ;
sem(sw,"2160")    =.75*sem(sw,"2100")  ;
sem(sw,"2170")    =.65*sem(sw,"2100")  ;
sem(sw,"2180")    =.65*sem(sw,"2100")  ;
sem(sw,"2190")    =.55*sem(sw,"2100")  ;
sem(sw,"2200")    =.50*sem(sw,"2100")  ;

Display "Electricity and other energy-related SO2 Emissions - million tons of sulfur" ;

Display sem;

$ontext
Sulfur impacts on potential temperature - based on IPCC Technical Paper II,
"An Introduction to Simple Climate Models used in the IPCC Second Assessment
Report", February 1997, Appendix 2.
$offtext

parameters
qdir        direct cooling effect of sulfur emissions - watts per square meter
enat        natural sulfur emissions - million tons per year
qindir      indirect cooling effect of sulfur emissions - watts per square meter
cpt(tp,sw)  cooling impact of sulfur on potential temperature - degrees C
cool(* ,sw) cooling impact of sulfur on potential temperature - degrees C;

qdir        =      .3;
qindir      =      .8;
enat        =      42;

cpt(tp,sw)     =   rfconv(sw) * qdir * sem(sw,tp)/69.0;

display "First we show the direct cooling effect of sulfur emissions."
display cpt;

display "Now we show the indirect plus direct cooling effects.";

cpt(tp,sw) = cpt(tp,sw) +  rfconv("sw1") * qindir *
             log(1 + sem(sw,tp)/enat)  / log(1 + 69.0/enat);

display cpt;

cool("1990",sw)  =  .629;

cool(tp,sw) = cpt(tp,sw);

display cool;


*==>$include "tables\FOREST.TAB"
*-----------------------------FOREST.TAB -------------------------------------*

SET	ps      Alternative price scenarios for afforestation /1*6/;

TABLE price(tp,tp,ps)   Carbon price vector for scenario ps - start year sy - dollars per ton

                1       2       3       4       5       6
2010.2010       5.0     10.0    10.0    20.0    100.0   75.0
2010.2020       8.1     16.3    13.4    26.9    100.0   125.0
2010.2030       13.3    26.5    18.1    36.1    100.0   175.0
2010.2040       21.6    43.2    24.3    48.5    100.0   225.0
2010.2050       35.2    70.4    32.6    65.2    100.0   275.0
2010.2060       57.3    114.7   43.8    87.7    100.0   275.0
2010.2070       93.4    186.8   58.9    117.8   100.0   275.0
2010.2080       152.1   304.3   79.2    158.4   100.0   275.0
2010.2090       247.8   495.6   106.4   212.8   100.0   275.0
2010.2100       403.7   807.3   143.0   286.0   100.0   275.0;

loop(sy,price(sy+1,tp+1,ps) = price(sy,tp,ps););
DISPLAY price;

TABLE cab(sy,tp,ps)	Annual gain from afforestation - billion tons of carbon

*  Based on GTM - Brent Sohngen's spreadsheet posted on EMF 21 website

                1       2       3       4       5       6
2010.2010       0.005   0.001   0.049   0.109   0.535   0.492
2010.2020      -0.013   0.037   0.119   0.251   1.071   1.171
2010.2030       0.042   0.082   0.146   0.305   0.851   1.661
2010.2040       0.092   0.214   0.206   0.428   0.834   2.108
2010.2050       0.198   0.226   0.295   0.525   0.720   2.087
2010.2060       0.279   0.630   0.368   0.708   0.599   1.807
2010.2070       0.758   1.504   0.550   1.146   0.522   1.383
2010.2080       1.671   2.811   0.872   1.736   0.547   1.230
2010.2090       2.951   4.099   1.409   2.364   0.529   1.129
2010.2100       3.333   4.287   1.632   2.322   0.463   1.937;

$ontext
*  Based on Willy Makundi and Jayant Sathaye - GCOMAP spreadsheet posted on EMF 21 website

             1       2       3       4       5       6

2010.2010    0.085   0.146   0.142   0.284   0.967   0.778
2010.2020    0.168   0.282   0.235   0.448   1.346   1.057
2010.2030    0.267   0.424   0.315   0.562   1.253   0.981
2010.2040    0.359   0.591   0.344   0.638   1.011   0.753
2010.2050    0.466   0.749   0.363   0.647   0.683   0.526
2010.2060    0.669   1.046   0.462   0.782   0.691   0.552
2010.2070    0.920   1.434   0.577   0.938   0.684   0.582
2010.2080    1.251   1.886   0.674   1.092   0.641   0.513
2010.2090    1.673   1.779   0.842   1.288   0.735   0.576
2010.2100    1.477   1.503   0.926   1.272   0.521   0.509
$offtext
loop(sy,cab(sy+1,tp+1,ps) = cab(sy,tp,ps););  display cab;

SCALAR	acf   average cost - fraction of marginal cost;  acf = .8;

PARAMETERS co2fac(ghg)    CO2 factor for equations totemit /co2   1, ch4   0/;

*==>$include "tables\BLNABC.TAB"
*-----------------------------BLNABC.TAB -------------------------------------*

*  This data file contains the emission baselines and abatement cost parameters.

$ontext
Except for the technical progress parameters, the following estimates are
derived from spreadsheets originally distributed by EMF21.  See ch4tot.xls,
n2otot.xls, slftot.xls, llftot.xls.  Also see imac*.xls.
$offtext


TABLE bline(ghg ,*, *) Emission baselines - non-energy related 

*	input in million TCE -  output in billion TCE

           usa     weur    japan   canz    eefsu   china   india   oilex     row    world
ch4.1990   107.7   160.7   7.7     55.5    202.1   209.6   100.9    83.8   384.5   1312.4
ch4.2000   100.3   131.3   6.6     65.8    170.8   253.1   114.4    85.8   446.1   1374.1
ch4.2010   105.2   128.3   6.1     72.5    189.2   296.5   128.1   104.1   525.6   1555.7
ch4.2020    99.7   131.7   5.8     80.1    208.7   338.2   144.2   124.0   637.3   1769.8

*          usa     weur    japan   canz    eefsu   china   india   oilex   row     world
n2o.1990   106.1   111.7   6.3     23.1    82.4    43.2     86.6   30.9    375.0    865.1
n2o.2000   116.2    96.2   7.4     26.5    64.2    46.9    112.1   33.7    446.3    949.5
n2o.2010   122.4    99.4   8.2     31.4    77.1    52.5    126.0   42.4    522.2   1081.7
n2o.2020   128.4   100.2   8.1     37.3    93.3    58.6    142.7   53.9    635.2   1257.8

*          usa     weur    japan   canz    eefsu   china   india   oilex   row     world
slf.2000   19.68   11.80    6.69   1.84     1.67    2.26    0.21    1.65    5.91    51.71
slf.2010   44.58   28.58   13.22   3.71     7.15   14.46    1.05    7.90   28.65   149.30
slf.2020   74.85   33.53   14.91   5.48    11.72   38.39    1.57   13.13   51.62   245.19

*          usa     weur    japan   canz    eefsu   china   india   oilex   row     world
llf.2000   17.44    8.48   8.39    3.83    5.55    11.97   0.57    1.29    11.54   69.06
llf.2010   10.44    6.11   4.23    4.45    5.03    20.25   0.55    1.82    10.52   63.39
llf.2020    7.63    4.50   3.02    3.15    3.40    21.43   0.53    1.71     9.94   55.32;

* Baseline emissions are extrapolated linearly from 2020 through 2100; no
* change thereafter. Equal time intervals: decades.

LOOP(tp,
     bline(ghg,tp,rg)$(year(tp) ge 2030) = 
	bline(ghg,tp-1,rg) + .5*(bline(ghg,"2020",rg) - bline(ghg,"2000",rg));
     bline(ghg,tp,rg) =  max(0, bline(ghg,tp,rg))
    );
bline(ghg,tp,rg)$(year(tp) > 2100) = bline(ghg,"2100",rg);

* Revised extrapolation procedure for n2o.

bline("n2o",pp,rg)    = bline("n2o","2000",rg);
bline(ghg,tp,"world") = sum(rg, bline(ghg,tp,rg));
DISPLAY bline;

DISPLAY "Now we convert from million tce to billion tce.";
bline(ghg,tp,rg)      =  .001  *  bline(ghg,tp,rg);
bline(ghg,tp,"world") =  .001  *  bline(ghg,tp,"world");
DISPLAY bline;

TABLE abcst(abx,ghg)  Abatement Costs - dollars per TCE

                  ch4     n2o     slf     llf
      1            10      10      10     10
      2            20      20      20     20
      3            30      30      30     30
      4            40      40      40     40
      5            50      50      50     50

      6            75      75      75     75
      7           100     100     100    100
      8           125     125     125    125
      9           150     150     150    150
     10           175     175     175    175
     11           200     200     200    200;

PARAMETER abmlt(*)   Abatement quantity multipliers - technical progress;

*  Multiplier of abatement potential in 2010.

abmlt("2000")  =  0.00;
abmlt("2010")  =  1.00;
abmlt("2020")  =  1.125;

abmlt("2030")  =  1.25;
abmlt("2040")  =  1.375;
abmlt("2050")  =  1.50;

abmlt("2060")  =  1.60;
abmlt("2070")  =  1.70;
abmlt("2080")  =  1.80;
abmlt("2090")  =  1.90;
abmlt("2100")  =  2.00;

abmlt("2110")  =  2.10;
abmlt("2120")  =  2.20;
abmlt("2130")  =  2.30;
abmlt("2140")  =  2.40;
abmlt("2150")  =  2.50;

abmlt("2160")  =  2.60;
abmlt("2170")  =  2.70;
abmlt("2180")  =  2.80;
abmlt("2190")  =  2.90;
abmlt("2200")  =  3.00;
;

TABLE ablim(ghg,abx, *, *) Abatement limits at alternative cost levels

*	Input in million TCE -  output in billion TCE

*  Revised values - adding enteric and rice to CH4 abatement; soil management to N2O

             usa    weur    japan    canz    eefsu   china   india   oilex   row     world
ch4.1.2010   36.74   12.85   1.11    11.03   33.64   72.25   9.93    9.07    47.54   234.16
ch4.2.2010   41.73   12.96   1.12    12.84   35.45   75.52   10.07   13.63   57.39   260.70
ch4.3.2010   55.14   14.66   1.21    14.16   37.29   84.57   10.07   15.32   62.91   295.32
ch4.4.2010   55.14   16.36   1.21    14.16   37.76   84.57   10.07   15.83   66.33   301.43
ch4.5.2010   63.03   16.36   1.21    14.64   37.76   91.10   10.76   15.83   73.02   323.71
ch4.6.2010   71.21   16.37   1.21    15.46   37.76   91.10   11.59   15.83   73.34   333.88
ch4.7.2010   75.14   17.47   1.27    16.04   40.09   99.75   11.80   17.13   86.63   365.31
ch4.8.2010   75.14   19.79   1.28    17.30   43.76   104.95  13.58   17.45   87.66   380.90
ch4.9.2010   75.14   22.05   1.28    17.89   48.11   109.88  14.05   17.45   89.88   395.73
ch4.10.2010  75.37   22.63   1.28    18.60   49.03   109.88  14.49   18.13   92.24   401.65
ch4.11.2010  76.06   22.63   1.52    18.60   49.03   117.47  14.49   18.77   106.47  425.05


*            usa    weur    japan    canz    eefsu   china   india   oilex   row     world
n2o.1.2010  10.95   14.35   2.72     1.45    2.94    13.17   13.24   0.54    11.32   70.68
n2o.2.2010  10.95   14.40   2.72     1.45    2.94    13.17   13.24   0.54    11.32   70.73
n2o.3.2010  10.95   14.40   2.72     1.45    2.94    13.17   13.24   0.70    12.29   71.86
n2o.4.2010  10.95   14.40   2.72     1.45    2.94    13.17   13.24   0.71    12.34   71.92
n2o.5.2010  10.95   14.40   2.72     1.45    2.94    18.65   13.24   0.71    12.43   77.50
n2o.6.2010  10.95   14.40   2.72     1.45    2.94    18.65   18.02   0.71    14.97   84.82
n2o.7.2010  12.61   14.40   2.72     1.66    2.94    18.65   18.02   0.71    15.00   86.71
n2o.8.2010  12.61   14.40   2.72     1.66    2.94    18.65   18.02   0.71    15.00   86.71
n2o.9.2010  15.24   14.40   2.72     1.98    2.94    20.24   18.02   0.74    15.24   91.53
n2o.10.2010 15.24   15.48   2.72     2.19    2.94    20.24   18.02   0.74    15.26   92.82
n2o.11.2010 15.24   15.48   2.72     2.19    2.94    20.24   18.02   0.74    15.26   92.82

*            usa    weur    japan    canz    eefsu   china   india   oilex   row     world

slf.1.2010    4.53   3.43    1.04    0.47    1.57    3.53    0.21    1.89    6.24    22.92
slf.2.2010    7.69   5.28    2.27    0.76    1.58    3.54    0.21    1.89    7.15    30.37
slf.3.2010    8.15   5.74    2.76    0.84    1.59    3.55    0.21    1.90    7.19    31.94
slf.4.2010    8.15   5.74    2.76    0.84    1.65    4.10    0.21    1.90    7.68    33.04
slf.5.2010    8.15   5.74    2.76    0.84    1.76    4.50    0.21    1.90    7.68    33.54
slf.6.2010   10.20   6.13    2.83    1.02    1.92    4.65    0.22    2.45    7.44    36.85
slf.7.2010   10.20   6.81    2.83    1.09    2.05    4.65    0.25    2.46    9.14    39.48
slf.8.2010   13.72   8.92    4.18    1.36    2.09    4.79    0.29    2.48    9.49    47.32
slf.9.2010   13.72   9.08    4.43    1.36    2.09    4.79    0.29    2.48    9.49    47.73
slf.10.2010  13.72   9.08    4.43    1.36    2.09    4.79    0.29    2.48    9.49    47.73
slf.11.2010  13.77   9.13    4.45    1.36    2.10    4.82    0.29    2.48    9.50    47.90

*            usa    weur    japan    canz    eefsu   china   india   oilex   row     world
llf.1.2010   4.23    1.31    1.47    1.84    1.93    16.41   0.15    1.06    4.50    32.91
llf.2.2010   4.26    1.47    1.47    1.88    1.97    16.41   0.15    1.06    4.50    33.18
llf.3.2010   4.37    1.47    1.48    1.88    2.15    16.57   0.17    1.06    4.50    33.65
llf.4.2010   4.39    1.51    1.48    1.88    2.15    16.57   0.17    1.06    4.54    33.75
llf.5.2010   4.39    1.51    1.48    1.88    2.15    16.57   0.17    1.06    4.54    33.75
llf.6.2010   4.42    1.51    1.48    1.90    2.18    16.57   0.17    1.06    4.54    33.83
llf.7.2010   4.49    1.54    1.53    1.90    2.18    16.60   0.17    1.06    4.63    34.11
llf.8.2010   4.49    1.54    1.53    1.90    2.18    16.60   0.17    1.06    4.63    34.11
llf.9.2010   4.55    1.57    1.58    1.90    2.18    16.61   0.17    1.06    4.71    34.34
llf.10.2010  4.55    1.57    1.58    1.90    2.18    16.61   0.17    1.06    4.71    34.34
llf.11.2010  4.55    1.57    1.58    1.90    2.18    16.61   0.17    1.06    4.71    34.34;

ablim("co2",abx,tp+4,rg) =  ablim("co2",abx,"2010",rg);
ablim(ogg,  abx,tp  ,rg) = ablim(ogg,abx,"2010",rg) * bline(ogg,tp,rg)/bline(ogg,"2010",rg);
display ablim;

*  Allow for technical progress in abatement for greenhouse gases other than co2.

ablim(ghg,abx,tp,rg)$(not sameas("co2",ghg))  =  abmlt(tp)*ablim(ghg,abx,tp,rg);
display ablim;

ablim(ghg,abx,tp,rg)$(not sameas("co2",ghg))  =  min(ablim(ghg,abx,tp,rg), 1000*bline(ghg,tp,rg));
display ablim;

parameter	pctabate(ghg,tp,rg)	Maximum percent abatement;

pctabate(ghg,tp,rg)$bline(ghg,tp,rg) =  .1*ablim(ghg,"11",tp,rg)/bline(ghg,tp,rg);
display pctabate;

ablim(ghg,abx,tp,rg)   =  .001 * ablim(ghg,abx,tp,rg);
ablim(ghg,abx,tp,rg)   =  ablim(ghg,abx,tp,rg)$(ablim(ghg,abx,tp,rg) ge .0001);
ablim(ghg,abx,tp,"world") =  0;
DISPLAY "Now ABLIM is measured in billion tce.", ablim;

ablim(ghg,abx+1,tp,rg) =  ablim(ghg,abx+1,tp,rg) - ablim(ghg,abx,  tp,rg);

*	To deal with rare cases of non-monotone cumulative costs:

ablim(ghg,abx+1,tp,rg) =  max (0, ablim(ghg,abx+1,tp,rg));
display "Now ABLIM is measured in billion tce", ablim;

*==>$include "tables\CONLIM.TAB"
*-----------------------------  CONLIM.TAB-------------------------------*

*  This data file contains the carbon concentration limits.

*TABLE CONLIM(tp,sw)  CARBON CONCENTRATION LIMITS - PPMV
 TABLE CONLIM(* , *)  CARBON CONCENTRATION LIMITS - PPMV

                   SW1      SW2

   1990            353      353
   2000            370      370

   2010            INF      INF
   2020            INF      INF
   2030            INF      INF
   2040            INF      INF
   2050            INF      INF

   2060            INF      INF
   2070            INF      INF
   2080            INF      INF
   2090            INF      INF
   2100            INF      INF

   2110            INF      INF
   2120            INF      INF
   2130            INF      INF
   2140            INF      INF
   2150            INF      INF

   2160            INF      INF
   2170            INF      INF
   2180            INF      INF
   2190            INF      INF
   2200            INF      INF
   ;

*==>$include "tables\GHGLIM.ref"

*-----------------------------  GHGLIM.REF-------------------------------*

*  This data file contains greenhouse gas limits.

PARAMETERS
	ptdlim(tp,sw)    Upper bound on potential temperature increase from 1750
	atdlim(tp,sw)    Upper bound on actual temperature increase from 2000
	atdinc(tp,sw)    Upper bound on actual temperature increments
	tygcl(sw)        Upper bound on world carbon emissions - last period;

ptdlim(tp,sw) =  inf;
atdlim(tp,sw) =  inf;
atdinc(tp,sw) =  inf;
tygcl(sw)     =  inf;

*  Sources of CARBIEO, CARLIM : ieo-2004.xls

TABLE carbieo(* , *) Carbon emissions - IEO 2004 - reference case - billion tons

         usa     weur   japan    canz   eefsu   china   india   oilex     row   world

1990    1.361   0.931   0.269   0.209   1.337   0.617   0.153   0.280   0.725   5.881
2000    1.578   0.939   0.310   0.264   0.844   0.780   0.249   0.393   1.061   6.419
2010    1.789   0.973   0.338   0.311   0.927   1.108   0.311   0.477   1.325   7.559
2020    2.055   1.045   0.354   0.359   1.092   1.553   0.429   0.591   1.669   9.148
;

OPTION DECIMALS = 3;
DISPLAY carbieo;

PARAMETERS	krf(rg)   Kyoto Protocol greenhouse gas reduction factor;
krf("usa")       =  .07;
krf("weur")      =  .08;
krf("japan")     =  .06;
krf("canz")      =  .00;
krf("eefsu")     =  .00;

$ontext

Dealing with the U.S. GHG intensity strategy.

"A new climate change strategy for the United States announced by
President Bush on February 14, 2002, sets a voluntary "greenhouse gas
intensity" target for the nation, expands existing programs
encouraging companies to voluntarily report and reduce their
greenhouse gas emissions, and proposes increased federal funding for
climate change science and technology development. Some elements of
the Administration's strategy may provide additional incentive to
companies to voluntarily reduce greenhouse gas emissions. However, the
Administration's target - an 18 percent reduction in emissions
intensity between now and 2012 - will allow actual emissions to
increase 12 percent over the same period. Emissions will continue to
grow at nearly the same rate as at present."

The GDP numbers from the current runs of the model for the U.S. are
9.817 in 2000 and 12.833 in 2010.  We want to do this analysis with
the recognition that cement plays a role in carbon emissions.  At the
same time, cement in the model is not broken out by country.  Hence,
for this run through, I am going to assume that these IEO numbers are
energy only and I will modify the carlim appropriately.  The carlim in
M5.BND is based on energy only: it is translated into to CLEV, which
is an energy only number.  So the treatment of cement here is not what
it should be, but this is a good enough approximation for now.

In addition, the full 18 percent is being applied to the 2000 number
to get the 2010 number, even though the constraint is intended to
apply to 2012. This is because 2002, the year off of which the target
was based, was ostensibly already working down in intensity.  So 18
percent from 2000 to 2010 should be on roughly the path of 18 percent
from 2002 to 2012.

$offtext

$ontext

First two rows below are taken from IEO 2004, reference case.  The
third row is adjusted for Kyoto and the U.S. greenhouse gas intensity
target

$offtext

TABLE CARLIM(*,  *, *)  ANNUAL CARBON LIMITS  - BILLION TONS

            usa     weur    japan   canz    eefsu   china   india   oilex   row     world
sw1.1990    1.361   0.931   0.269   0.209   1.337   0.617   0.153   0.280   0.725   5.881
sw1.2000    1.578   0.939   0.310   0.264   0.844   0.780   0.249   0.393   1.061   6.419
sw1.2010    1.691   0.858   0.253   0.209   1.337   1.108   0.311   0.477   1.325
;

*  Before changing this table, please discuss with Alan.

carlim(sw,tp20,     rg)  = inf;
carlim(sw,tp20,"world")  = inf;
OPTION DECIMALS = 3;
DISPLAY carlim;

TABLE ogglim(ogg, *, *)  Limit on other (non-carbon) greenhouse gases - non-energy emissions - by region - billion tons

                 usa        weur       japan        canz       eefsu       china       india       oilex         row       world
ch4.2000    0.037216    0.027589    0.002483    0.014389    0.030164    0.050062    0.034562    0.029350    0.135185    0.361000
n2o.2000    0.002467    0.001769    0.000137    0.000569    0.001182    0.003669    0.002377    0.001227    0.001303    0.014700
slf.2000    0.041113    0.023783    0.009151    0.005642    0.006622    0.004309    0.001240    0.000620    0.000620    0.093100
llf.2000    0.002650    0.001533    0.000590    0.000364    0.000427    0.000278    0.000080    0.000040    0.000040    0.006000;

*  Correction of decimal point error.
OGGLIM("slf","2000",rg) = OGGLIM("slf","2000",rg)/1000;
OGGLIM("llf","2000",rg) = OGGLIM("llf","2000",rg)/1000;

*  Ogglim based on 2000 emissions and extrapolation of Kyoto reduction factors for Annex B.

ogglim(ogg,pp,rg)       = inf;
ogglim(ogg,pp,"world")  = sum(rg, ogglim(ogg,pp,rg));
DISPLAY ogglim;


*==>$include "tables\SHARES.TAB"

$ontext
The 2000 shares are proportional to 2000 regional emissions.
The 2050 shares (and thereafter) are proportional to 2000 populations.
The shares between 2000 and 2050 are determined by linear interpolation.
Shares sum to unity in each period.
$offtext

PARAMETERS

*sh(tp,rg)            shares in global carbon emissions;
 sh( *, *)            shares in global carbon emissions;

sh("2000",rg)   =     carlim("sw1","2000",rg)/sum(r,carlim("sw1","2000",r));
sh("2050",rg)   =     pop("2000",rg)/sum(r,   pop("2000",r));

sh("2010",rg)   =  .8*sh("2000",rg)  +  .2*sh("2050",rg);
sh("2020",rg)   =  .6*sh("2000",rg)  +  .4*sh("2050",rg);
sh("2030",rg)   =  .4*sh("2000",rg)  +  .6*sh("2050",rg);
sh("2040",rg)   =  .2*sh("2000",rg)  +  .8*sh("2050",rg);

sh("2060",rg)   =     sh("2050",rg);
sh("2070",rg)   =     sh("2050",rg);
sh("2080",rg)   =     sh("2050",rg);
sh("2090",rg)   =     sh("2050",rg);
sh("2100",rg)   =     sh("2050",rg);

sh("2110",rg)   =     sh("2050",rg);
sh("2120",rg)   =     sh("2050",rg);
sh("2130",rg)   =     sh("2050",rg);
sh("2140",rg)   =     sh("2050",rg);
sh("2150",rg)   =     sh("2050",rg);

sh("2160",rg)   =     sh("2050",rg);
sh("2170",rg)   =     sh("2050",rg);
sh("2180",rg)   =     sh("2050",rg);
sh("2190",rg)   =     sh("2050",rg);
sh("2200",rg)   =     sh("2050",rg);

sh(tp,"world")  =     sum(rg, sh(tp,rg));

display sh;

*==>$include "tables\NELE.TAB"
*-----------------------------  NELE.TAB  ------------------------------*

*  This data file contains the nonelectric energy parameter values.

*TABLE FOS(nt,rg)  FOSSIL FUEL CONSUMPTION IN 2000 - QUADS AND EXAJ
 TABLE FOS(* , *)  FOSSIL FUEL CONSUMPTION IN 2000 - QUADS AND EXAJ

        usa     weur   japan   canz    eefsu   china  india    oilex     row    world

oil-1   43.3    30.4    12.2    6.8     11.5    10.6    4.7     14.7    35.2    169.2
gas-1   23.5    14.6     2.8    4.3     23.0     1.0    0.8      8.2    10.7     88.7
coal    22.8    11.7     3.4    4.4     17.0    26.9    7.5      0.6    13.0    107.4
;

FOS("carbcal",rg)  =  CECN("gas",rg)  *  FOS("gas-1",rg)
                   +  CECN("oil",rg)  *  FOS("oil-1",rg)
                   +  CECN("cldu",rg) *  FOS("coal ",rg);

FOS("carbcal","world")  =  SUM(rg, FOS("carbcal",rg));

FOS("carblim",rg)  =  CARLIM("sw1","2000",rg);
FOS("carblim","world")  =  SUM(rg, FOS("carblim",rg));

FOS("carbcor",rg)  =  FOS("carblim",rg)/FOS("carbcal",rg);
FOS("carbcor","world")  =  SUM(rg, FOS("carblim",rg))/
                           SUM(rg, FOS("carbcal",rg));

FOS("carbdif",rg)  =  FOS("carblim",rg)-FOS("carbcal",rg);
FOS("carbdif","world")  =  SUM(rg, FOS("carblim",rg)) -
                           SUM(rg, FOS("carbcal",rg));

DISPLAY "CARBCAL based on calculation from individual fuels; CARBLIM is total from ghg.tab."
DISPLAY "CARBCOR is ratio of total carbon to that based on individual fuels.";
DISPLAY "CARBDIF provides rough adjustment to CLEV for the inconsistency."

DISPLAY FOS;


$ontext
Costs for the CLDU activity (direct uses of coal) includes not only fuel,
but also the differential in utilization costs between coal and oil/gas-fired
units.

See bfuel.XLS.  Derived from 2050 and 2100 values specified in IIASA-WEC 1998
scenario B (base).  Commercial biomass only.  This is the lowest of the six
IIASA-WEC scenarios for commercial biomass.  Excludes traditional noncommercial
biomass.

The synf activity includes unconventional oils such as tar sands and heavy
oils.

$offtext

*TABLE NCAP(nt,tp,rg)   NONELECTRIC PRODUCTION CAPACITIES - EXAJ
 TABLE NCAP(nt,*,*)     NONELECTRIC PRODUCTION CAPACITIES - EXAJ

                    usa       weur       japan        canz       eefsu       china       india       oilex       row         world

bfuel.2050        2.610       5.370       1.235       1.525       2.710       5.570       4.090       0.190      24.060      47.360
bfuel.2100       20.763      16.390       3.235       5.542      31.340      13.400      16.960       0.710      48.750     157.090

*                   usa       weur       japan        canz       eefsu       china       india       oilex       row

lbdn.2010           INF       INF         INF          INF
lbdn.2020           INF       INF         INF          INF
lbdn.2030           INF       INF         INF          INF        INF         INF         INF         INF         INF
lbdn.2040           INF       INF         INF          INF        INF         INF         INF         INF         INF
lbdn.2050           INF       INF         INF          INF        INF         INF         INF         INF         INF

lbdn.2060           INF       INF         INF          INF        INF         INF         INF         INF         INF
lbdn.2070           INF       INF         INF          INF        INF         INF         INF         INF         INF
lbdn.2080           INF       INF         INF          INF        INF         INF         INF         INF         INF
lbdn.2090           INF       INF         INF          INF        INF         INF         INF         INF         INF
lbdn.2100           INF       INF         INF          INF        INF         INF         INF         INF         INF

lbdn.2110           INF       INF         INF          INF        INF         INF         INF         INF         INF
lbdn.2120           INF       INF         INF          INF        INF         INF         INF         INF         INF
lbdn.2130           INF       INF         INF          INF        INF         INF         INF         INF         INF
lbdn.2140           INF       INF         INF          INF        INF         INF         INF         INF         INF
lbdn.2150           INF       INF         INF          INF        INF         INF         INF         INF         INF

lbdn.2160           INF       INF         INF          INF        INF         INF         INF         INF         INF
lbdn.2170           INF       INF         INF          INF        INF         INF         INF         INF         INF
lbdn.2180           INF       INF         INF          INF        INF         INF         INF         INF         INF
lbdn.2190           INF       INF         INF          INF        INF         INF         INF         INF         INF
lbdn.2200           INF       INF         INF          INF        INF         INF         INF         INF         INF
;


*   To simulate IPCC SRES median scenario.
ncap("bfuel","2100",rg)=1.25*ncap("bfuel","2100",rg);

*  Fossil fuel production based on net exports + consumption.

NCAP("gas-1",tbase,rg) =  GASX(tbase,rg) +
                          FOS("gas-1",rg);

NCAP("gas-1",tbase,"japan") = 0;

NCAP("oil-1",tbase,rg) =  OILX(tbase,rg) +
                          FOS("oil-1",rg);

NCAP("oil-1",tbase,"japan") = 0;

NCAP("coal",tbase,rg)  =  FOS("coal", rg);

NCAP(x,pp,rg)        = inf;
NCAP("synf",pp,rg)   = inf;

NCAP("neb-hc",pp,rg) = inf;

* neb-lc not available until 2070.
* Actually, in these runs neb-hc is not available at all because it is taken out in LBD.NO
NCAP("neb-lc",tp,rg) = inf;
NCAP("neb-lc",tp,rg) $ (ord(tp) le 7)  = 0 ;

NCAP("bfuel","2010",rg) =  .2*NCAP("bfuel","2050",rg);
NCAP("bfuel","2020",rg) =  .4*NCAP("bfuel","2050",rg);
NCAP("bfuel","2030",rg) =  .6*NCAP("bfuel","2050",rg);
NCAP("bfuel","2040",rg) =  .8*NCAP("bfuel","2050",rg);

NCAP("bfuel","2060",rg) =  .8*NCAP("bfuel","2050",rg)  + .2*NCAP("bfuel","2100",rg);
NCAP("bfuel","2070",rg) =  .6*NCAP("bfuel","2050",rg)  + .4*NCAP("bfuel","2100",rg);
NCAP("bfuel","2080",rg) =  .4*NCAP("bfuel","2050",rg)  + .6*NCAP("bfuel","2100",rg);
NCAP("bfuel","2090",rg) =  .2*NCAP("bfuel","2050",rg)  + .8*NCAP("bfuel","2100",rg);

NCAP("bfuel","2110",rg) = 1.2*NCAP("bfuel","2100",rg)  - .2*NCAP("bfuel","2050",rg);
NCAP("bfuel","2120",rg) = 1.4*NCAP("bfuel","2100",rg)  - .4*NCAP("bfuel","2050",rg);
NCAP("bfuel","2130",rg) = 1.6*NCAP("bfuel","2100",rg)  - .6*NCAP("bfuel","2050",rg);
NCAP("bfuel","2140",rg) = 1.8*NCAP("bfuel","2100",rg)  - .8*NCAP("bfuel","2050",rg);
NCAP("bfuel","2150",rg) = 2.0*NCAP("bfuel","2100",rg)  -1.0*NCAP("bfuel","2050",rg);

NCAP("bfuel","2160",rg) = 2.2*NCAP("bfuel","2100",rg)  -1.2*NCAP("bfuel","2050",rg);
NCAP("bfuel","2170",rg) = 2.4*NCAP("bfuel","2100",rg)  -1.4*NCAP("bfuel","2050",rg);
NCAP("bfuel","2180",rg) = 2.6*NCAP("bfuel","2100",rg)  -1.6*NCAP("bfuel","2050",rg);
NCAP("bfuel","2190",rg) = 2.8*NCAP("bfuel","2100",rg)  -1.8*NCAP("bfuel","2050",rg);
NCAP("bfuel","2200",rg) = 3.0*NCAP("bfuel","2100",rg)  -2.0*NCAP("bfuel","2050",rg);

NCAP(nt,tp,"world")    =    SUM(rg, NCAP(nt,tp,rg));

DISPLAY NCAP;

*TABLE BCH4GAS(tp,rg) CH4 LEAKAGE PER TON OF NATURAL GAS CONSUMPTION - MILLIONS OF TONS PER EXAJOULE
 TABLE BCH4GAS(tp, *) CH4 LEAKAGE PER TON OF NATURAL GAS CONSUMPTION - MILLIONS OF TONS PER EXAJOULE

         usa    weur   japan    canz    eefsu   china   india   oilex    row    world

2000    5.54    1.53    0.08    1.44    19.14   0.07    1.16    10.24   3.44    42.64
;

* Compute actual coefficient in 2000; U.S. drops in half by 2050; other regions interpolated.

BCH4GAS("2000",rg)  =     BCH4GAS("2000", rg)/FOS("gas-1",rg);
BCH4GAS(pp,rg)      =     BCH4GAS("2000","usa")/2;
BCH4GAS("2010",rg)  =  .8*BCH4GAS("2000",rg) + .2*BCH4GAS("2050",rg);
BCH4GAS("2020",rg)  =  .6*BCH4GAS("2000",rg) + .4*BCH4GAS("2050",rg);
BCH4GAS("2030",rg)  =  .4*BCH4GAS("2000",rg) + .6*BCH4GAS("2050",rg);
BCH4GAS("2040",rg)  =  .2*BCH4GAS("2000",rg) + .8*BCH4GAS("2050",rg);

BCH4GAS("2000","world")  =   0;

DISPLAY BCH4GAS;

*  To convert coefficients to BILLION tons of CH4 per exajoule, have
*  modified equations wch4df in M5.VEQ.  Also M5.BND and CSE.LCE.


 TABLE NCST(nt,rg) NONELECTRIC COST COEFFICIENTS - $ PER GJ

           usa    weur   japan    canz   eefsu   china   india   oilex     row

CLDU      2.50    3.00    3.00    2.50    2.00    2.00    2.00    2.00    2.00

OIL-1     5.00    5.00    5.00    5.00    5.00    5.00    5.00    5.00    5.00
OIL-2     5.25    5.25    5.25    5.25    5.25    5.25    5.25    5.25    5.25
OIL-3     5.50    5.50    5.50    5.50    5.50    5.50    5.50    5.50    5.50
OIL-4     5.75    5.75    5.75    5.75    5.75    5.75    5.75    5.75    5.75
OIL-5     6.00    6.00    6.00    6.00    6.00    6.00    6.00    6.00    6.00
OIL-6     6.25    6.25    6.25    6.25    6.25    6.25    6.25    6.25    6.25
OIL-7     6.50    6.50    6.50    6.50    6.50    6.50    6.50    6.50    6.50
OIL-8     6.75    6.75    6.75    6.75    6.75    6.75    6.75    6.75    6.75
OIL-9     7.00    7.00    7.00    7.00    7.00    7.00    7.00    7.00    7.00
OIL-10    7.25    7.25    7.25    7.25    7.25    7.25    7.25    7.25    7.25

GAS-1     4.00    4.00    4.00    4.00    4.00    4.00    4.00    4.00    4.00
GAS-2     4.25    4.25    4.25    4.25    4.25    4.25    4.25    4.25    4.25
GAS-3     4.50    4.50    4.50    4.50    4.50    4.50    4.50    4.50    4.50
GAS-4     4.75    4.75    4.75    4.75    4.75    4.75    4.75    4.75    4.75
GAS-5     5.00    5.00    5.00    5.00    5.00    5.00    5.00    5.00    5.00
GAS-6     5.25    5.25    5.25    5.25    5.25    5.25    5.25    5.25    5.25
GAS-7     5.50    5.50    5.50    5.50    5.50    5.50    5.50    5.50    5.50
GAS-8     5.75    5.75    5.75    5.75    5.75    5.75    5.75    5.75    5.75
GAS-9     6.00    6.00    6.00    6.00    6.00    6.00    6.00    6.00    6.00
GAS-10    6.25    6.25    6.25    6.25    6.25    6.25    6.25    6.25    6.25

bfuel     10.0    10.0    10.0    10.0    10.0    10.0    10.0    10.0    8.0
synf      8.3     9.0     9.0     8.3     8.3     8.3     8.3     8.3     8.3

*  Non-electric backstop is set at roughly $100/barrel. As comparison, hydrogen from photovoltaics, priced
*  from National Academy 2004 study page 103, is $6.18 per KG of hydrogen with .12 GJ per KG:

neb-hc    16.7    16.7    16.7    16.7    16.7    16.7    16.7    16.7    16.7
neb-lc    8.0     8.0     8.0     8.0     8.0     8.0     8.0     8.0     8.0
LBDN      8.0     8.0     8.0     8.0     8.0     8.0     8.0     8.0     8.0    ;

DISPLAY NCST;

parameters cstred(*)  energy cost reduction factors;

cstred(tp)      = 1.0 ** te(tp);

display cstred;


TABLE FRNCST(nt,*) Fraction of nonelectric cost coefficients assigned to RA and PN

         frnra          frnpn

cldu

oil-1    .333
oil-2    .333
oil-3    .333
oil-4    .333
oil-5    .333
oil-6    .333
oil-7    .333
oil-8    .333
oil-9    .333
oil-10   .333

gas-1    .333
gas-2    .333
gas-3    .333
gas-4    .333
gas-5    .333
gas-6    .333
gas-7    .333
gas-8    .333
gas-9    .333
gas-10   .333

bfuel
synf
neb-hc
neb-lc
lbdn
;

FRNCST(nt , "frnpn") =  1 - FRNCST(nt , "frnra");
DISPLAY FRNCST;

$ontext

RSV and RSC are base year levels of low-cost reserves and resources (exaj).
RDF measures the maximum fraction of remaining resources depleted and
converted annually into proven reserves.

For details on oil and gas reserves, see RSV.XLS.  Reserves are based upon
values in BP "Statistical Review of World Energy", June 2000.

For details on oil and gas resources, see RSC.XLS and RSVGRO.XLS.
Undiscovered oil and gas resources are an optimistic scenario for the
thirty-year period 1995-2025, and are based upon F5 probability estimates,
USGS, "World Petroleum Assessment 2000".  In addition, they include mean
estimates of potential reserve growth.  These are split equally between the ten
resource cost categories.

$offtext


*TABLE RSV(x,rg) PROVEN RESERVES - EXAJ
 TABLE RSV(x, *) PROVEN RESERVES - EXAJ

                usa       weur       japan        canz       eefsu       china       india       oilex         row        world

oil-1         171.6       123.6                    58.2       392.4       144.0        28.8      4985.4       298.8       6202.8
gas-1         164.0       181.7                   108.50     2002.6        48.3        22.9      2388.4       255.4       5171.8
;

*TABLE RSC(x,rg)   UNDISCOVERED RESOURCES - EXAJ
 TABLE RSC(x, *)   UNDISCOVERED RESOURCES - EXAJ

               usa       weur       japan        canz       eefsu       china       india       oilex         row       world

oil-1        108.1        55.8                    20.9       231.3        30.1         5.5       793.6       287.9      1533.2
oil-2        108.1        55.8                    20.9       231.3        30.1         5.5       793.6       287.9      1533.2
oil-3        108.1        55.8                    20.9       231.3        30.1         5.5       793.6       287.9      1533.2
oil-4        108.1        55.8                    20.9       231.3        30.1         5.5       793.6       287.9      1533.2
oil-5        108.1        55.8                    20.9       231.3        30.1         5.5       793.6       287.9      1533.2

oil-6        108.1        55.8                    20.9       231.3        30.1         5.5       793.6       287.9      1533.2
oil-7        108.1        55.8                    20.9       231.3        30.1         5.5       793.6       287.9      1533.2
oil-8        108.1        55.8                    20.9       231.3        30.1         5.5       793.6       287.9      1533.2
oil-9        108.1        55.8                    20.9       231.3        30.1         5.5       793.6       287.9      1533.2
oil-10       108.1        55.8                    20.9       231.3        30.1         5.5       793.6       287.9      1533.2

*              usa       weur       japan        canz       eefsu       china       india       oilex         row       world

gas-1        108.7        89.0                    34.1       473.1        22.2         7.9       509.3       188.6      1432.9
gas-2        108.7        89.0                    34.1       473.1        22.2         7.9       509.3       188.6      1432.9
gas-3        108.7        89.0                    34.1       473.1        22.2         7.9       509.3       188.6      1432.9
gas-4        108.7        89.0                    34.1       473.1        22.2         7.9       509.3       188.6      1432.9
gas-5        108.7        89.0                    34.1       473.1        22.2         7.9       509.3       188.6      1432.9

gas-6        108.7        89.0                    34.1       473.1        22.2         7.9       509.3       188.6      1432.9
gas-7        108.7        89.0                    34.1       473.1        22.2         7.9       509.3       188.6      1432.9
gas-8        108.7        89.0                    34.1       473.1        22.2         7.9       509.3       188.6      1432.9
gas-9        108.7        89.0                    34.1       473.1        22.2         7.9       509.3       188.6      1432.9
gas-10       108.7        89.0                    34.1       473.1        22.2         7.9       509.3       188.6      1432.9
;

*  Source:  Vello Kuuskraa, June 28, 2001, Table 2B - high (F5 scenario):

rsv("oil-1", "usa") =     166;
rsv("gas-1", "usa") =     181;

rsc("oil-1", "usa") =   143.8;
rsc("oil-2", "usa") =   143.8;
rsc("oil-3", "usa") =   143.8;
rsc("oil-4", "usa") =   143.8;
rsc("oil-5", "usa") =   143.8;
rsc("oil-6", "usa") =   143.8;
rsc("oil-7", "usa") =   143.8;
rsc("oil-8", "usa") =   143.8;
rsc("oil-9", "usa") =   143.8;
rsc("oil-10","usa") =   143.8;

rsc("gas-1", "usa") =   223.3;
rsc("gas-2", "usa") =   223.3;
rsc("gas-3", "usa") =   223.3;
rsc("gas-4", "usa") =   223.3;
rsc("gas-5", "usa") =   223.3;
rsc("gas-6", "usa") =   223.3;
rsc("gas-7", "usa") =   223.3;
rsc("gas-8", "usa") =   223.3;
rsc("gas-9", "usa") =   223.3;
rsc("gas-10","usa") =   223.3;


*TABLE PRV(x,rg)  UPPER BOUNDS ON PRODUCTION-RESERVE RATIOS
 TABLE PRV(x, *)  UPPER BOUNDS ON PRODUCTION-RESERVE RATIOS

                  usa       weur       japan        canz       eefsu       china       india        oilex         row

coal            0.010       0.010       0.010       0.010       0.010       0.010       0.010       0.010       0.010

oil-1           0.100       0.100       0.100       0.100       0.050       0.050       0.050       0.050       0.050
oil-2           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050
oil-3           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050
oil-4           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050
oil-5           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050

oil-6           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050
oil-7           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050
oil-8           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050
oil-9           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050
oil-10          0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050

*                 usa       weur       japan        canz       eefsu       china       india       oilex         row

gas-1           0.100       0.100       0.100       0.100       0.050       0.050       0.050       0.050       0.050
gas-2           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050
gas-3           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050
gas-4           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050
gas-5           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050

gas-6           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050
gas-7           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050
gas-8           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050
gas-9           0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050
gas-10          0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050       0.050
;

TABLE RDF(x,rg)  UPPER BOUNDS ON RESOURCE DEPLETION FACTORS

                  usa       weur       japan        canz       eefsu       china       india       oilex         row

coal            0.100       0.100       0.100       0.100       0.100       0.100       0.100       0.100       0.100

oil-1           0.050       0.050       0.050       0.050       0.020       0.020       0.020       0.020       0.020
oil-2           0.050       0.050       0.050       0.050       0.020       0.020       0.020       0.020       0.020
oil-3           0.050       0.050       0.050       0.050       0.020       0.020       0.020       0.020       0.020
oil-4           0.050       0.050       0.050       0.050       0.020       0.020       0.020       0.020       0.020
oil-5           0.050       0.050       0.050       0.050       0.020       0.020       0.020       0.020       0.020

oil-6           0.050       0.050       0.050       0.050       0.020       0.020      0.020        0.020       0.020
oil-7           0.050       0.050       0.050       0.050       0.020       0.020      0.020        0.020       0.020
oil-8           0.050       0.050       0.050       0.050       0.020       0.020      0.020        0.020       0.020
oil-9           0.050       0.050       0.050       0.050       0.020       0.020      0.020        0.020       0.020
oil-10          0.050       0.050       0.050       0.050       0.020       0.020      0.020        0.020       0.020

*                 usa        weur       japan        canz       eefsu       china      india        oilex         row

gas-1           0.050       0.050       0.050       0.050       0.020       0.020      0.020        0.020       0.020
gas-2           0.050       0.050       0.050       0.050       0.020       0.020      0.020        0.020       0.020
gas-3           0.050       0.050       0.050       0.050       0.020       0.020      0.020        0.020       0.020
gas-4           0.050       0.050       0.050       0.050       0.020       0.020      0.020        0.020       0.020
gas-5           0.050       0.050       0.050       0.050       0.020       0.020      0.020        0.020       0.020

gas-6           0.050       0.050       0.050       0.050       0.020       0.020      0.020        0.020       0.020
gas-7           0.050       0.050       0.050       0.050       0.020       0.020      0.020        0.020       0.020
gas-8           0.050       0.050       0.050       0.050       0.020       0.020      0.020        0.020       0.020
gas-9           0.050       0.050       0.050       0.050       0.020       0.020      0.020        0.020       0.020
gas-10          0.050       0.050       0.050       0.050       0.020       0.020      0.020        0.020       0.020
;

$ontext
No distinction between coal production and consumption.  This implies
negligible interregional coal trade.

Regional distribution of coal reserves: proportional to 2000 consumption,
Coal reserves are equal to 100 years' worth of consumption in 2000.
Coal resources are also proportional to each region's consumption in 2000.

Total of 300,000 exajoules for coal RSV + RSC.

$offtext

RSV("coal", rg) =   100*FOS("coal",rg);

RSC("coal", rg) =   300*1000*RSV("coal", rg)/
                             SUM(r, RSV("coal", r));

RSC("coal", rg) =            RSC("coal", rg)
                          -  RSV("coal", RG);

RSV(x,"world")  =    SUM(rg, RSV(x, rg));
RSC(x,"world")  =    SUM(rg, RSC(x, rg));

OPTION DECIMALS = 3;
DISPLAY RSV, RSC, PRV, RDF;

$ontext

The following scalars are all related to the LBDN nonelectric technology.
Must make a thoughtful choice of cpn0.  Compare with CPN(t) results.  Adopted
IIASA "anchor value" for lrn = -.3219.  This implies 20% learning rate for each
doubling of CPN.

$offtext

SCALARS
        inlcn   initial learning cost - $ per GJ
        cpn0    initial cumulative production - GJ
        lrnn    learning parameter;

        inlcn   =        6.0;
        cpn0    =        1.0;
        lrnn    =        -.3219;

*==>$include "tables\ELEC.TAB"
*-----------------------------  ELEC.TAB  ------------------------------*

*  This data file contains the electric energy parameter values.
*  First, we estimate fossil fuel mix in 2000. Then derive cldu.

$ontext

Changes from June 23, 2006 -- Applied ban on introduction of NUC-N
in non-annexb until 2040.

Totelec and hydro from weo-2002.xls

nuc-r from ieo-2004.xls

From these quantities, we derive fossil.

coal-r, oil-r, and gas-r are 2000 shares in total electricity generation.
Source of percentages:  2002 World Energy Outlook, IEA, pp.  410-492

usa   based on US and Canada
canz  based on US and Canada
weur  based on OECD Europe
japan based on JANZ
eefsu based on Transition Economies
china based on China
india based on India
oilex based on Middle East
row   based on Developing Countries

cldu derived from total coal consumption and coal consumed in electricity
generation - exaj

$offtext

*TABLE ELGEN(*,rg)  ELECTRICITY GENERATION IN 2000 - TKWH
 TABLE ELGEN(*, *)  ELECTRICITY GENERATION IN 2000 - TKWH

                usa     weur    japan   canz    eefsu   china   india   oilex   row     world

totelec         4.087   3.164   1.101   .749    1.484   1.387   .542    .666    2.210   15.391
nuc-r           .754    .845    .294    .069    .270    .016    .014    .008    .165    2.434
hydro           .575    .538    .068    .094    .295    .222    .074    .049    .736    2.650
fossil
coal-r          48      30      31      48      23      78      77       5      44
oil-r           3       6       12       3       6       3       1      42      13
gas-r           14      16      21      14      34       1       5      49      15

fshr

check

cldu
;

*  For consistency with world value of "Selected Energy Indicators for 2000".

elgen("totelec",rg) =               elgen("totelec",rg) *  14.114 /
                                    elgen("totelec","world");

elgen("totelec","world") =  sum(rg, elgen("totelec",rg));

elgen("fossil",rg) =  elgen("totelec",rg)  - elgen("nuc-r",rg)   - elgen("hydro",rg);

elgen("fshr",rg)   =  elgen("coal-r",rg)   + elgen("oil-r",rg) + elgen("gas-r",rg);

elgen("coal-r",rg) =  elgen("coal-r",rg)*elgen("fossil",rg)/elgen("fshr",rg);
elgen("oil-r",rg)  =  elgen("oil-r" ,rg)*elgen("fossil",rg)/elgen("fshr",rg);
elgen("gas-r",rg)  =  elgen("gas-r" ,rg)*elgen("fossil",rg)/elgen("fshr",rg);

elgen("check", rg) =  sum(et, elgen(et,rg));

elgen("cldu",rg) =    fos("coal ",rg) - elgen("coal-r", rg) * htrt("coal-r ",rg);

DISPLAY "Now these values are ready to input into ECAP table."

DISPLAY ELGEN;


*TABLE ECAP(et,tp,rg)  ELECTRICITY GENERATION CAPACITIES - NET - TKWH
 TABLE ECAP(et, *, *)  ELECTRICITY GENERATION CAPACITIES - NET - TKWH

* gas-r, oil-r and coal-r taken directly from ELGEN.

* hydro based on weo-2002.xls. Constant after 2020.

                usa     weur    japan   canz    eefsu   china   india  oilex  row       world

hydro.2000      .575    .538    .068    .094    .295    .222    .074    .049   .736     2.650
hydro.2010      .596    .581    .078    .116    .324    .333    .129    .069   .962     3.188
hydro.2020      .589    .616    .078    .149    .367    .511    .171    .083  1.236     3.800

* nuc-r based on ieo-2004.xls.  Constant after 2020.

*               usa    weur   japan   canz    eefsu   china   india   oilex   row    world

nuc-r.2000     .754   .845    .294    .069    .270    .016    .014    .008    .165   2.434
nuc-r.2010     .794   .906    .369    .108    .312    .066    .046    .015    .222   2.838
nuc-r.2020     .816   .855    .426    .118    .288    .142    .066    .024    .296   3.032

*               usa     weur   japan   canz    eefsu   china   india   oilex   row

gas-n.2010      1.0     INF     INF     INF     INF     INF     INF     INF    INF
gas-n.2020      2.0     INF     INF     INF     INF     INF     INF     INF    INF

*               usa     weur    japan   canz    eefsu   china   india   oilex   row

wind-lc.2010    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2020    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2030    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2040    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2050    INF     INF     INF     INF     INF     INF     INF     INF     INF

wind-lc.2060    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2070    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2080    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2090    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2100    INF     INF     INF     INF     INF     INF     INF     INF     INF

wind-lc.2110    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2120    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2130    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2140    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2150    INF     INF     INF     INF     INF     INF     INF     INF     INF

wind-lc.2160    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2170    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2180    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2190    INF     INF     INF     INF     INF     INF     INF     INF     INF
wind-lc.2200    INF     INF     INF     INF     INF     INF     INF     INF     INF

*               usa     weur    japan   canz    eefsu   china   india   oilex   row

coal-ncs.2010
coal-ncs.2020   INF     INF     INF     INF     INF     INF     INF     INF     INF
coal-ncs.2030   INF     INF     INF     INF     INF     INF     INF     INF     INF
coal-ncs.2040   INF     INF     INF     INF     INF     INF     INF     INF     INF
coal-ncs.2050   INF     INF     INF     INF     INF     INF     INF     INF     INF

coal-ncs.2060   INF     INF     INF     INF     INF     INF     INF     INF     INF
coal-ncs.2070   INF     INF     INF     INF     INF     INF     INF     INF     INF
coal-ncs.2080   INF     INF     INF     INF     INF     INF     INF     INF     INF
coal-ncs.2090   INF     INF     INF     INF     INF     INF     INF     INF     INF
coal-ncs.2100   INF     INF     INF     INF     INF     INF     INF     INF     INF

coal-ncs.2110   INF     INF     INF     INF     INF     INF     INF     INF     INF
coal-ncs.2120   INF     INF     INF     INF     INF     INF     INF     INF     INF
coal-ncs.2130   INF     INF     INF     INF     INF     INF     INF     INF     INF
coal-ncs.2140   INF     INF     INF     INF     INF     INF     INF     INF     INF
coal-ncs.2150   INF     INF     INF     INF     INF     INF     INF     INF     INF

coal-ncs.2160   INF     INF     INF     INF     INF     INF     INF     INF     INF
coal-ncs.2170   INF     INF     INF     INF     INF     INF     INF     INF     INF
coal-ncs.2180   INF     INF     INF     INF     INF     INF     INF     INF     INF
coal-ncs.2190   INF     INF     INF     INF     INF     INF     INF     INF     INF
coal-ncs.2200   INF     INF     INF     INF     INF     INF     INF     INF     INF

*               usa     weur    japan   canz    eefsu   china   india   oilex   row

nuc-n.2010
nuc-n.2020      INF     INF     INF     INF     INF
nuc-n.2030      INF     INF     INF     INF     INF
nuc-n.2040      INF     INF     INF     INF     INF     INF     INF     INF     INF
nuc-n.2050      INF     INF     INF     INF     INF     INF     INF     INF     INF

nuc-n.2060      INF     INF     INF     INF     INF     INF     INF     INF     INF
nuc-n.2070      INF     INF     INF     INF     INF     INF     INF     INF     INF
nuc-n.2080      INF     INF     INF     INF     INF     INF     INF     INF     INF
nuc-n.2090      INF     INF     INF     INF     INF     INF     INF     INF     INF
nuc-n.2100      INF     INF     INF     INF     INF     INF     INF     INF     INF

nuc-n.2110      INF     INF     INF     INF     INF     INF     INF     INF     INF
nuc-n.2120      INF     INF     INF     INF     INF     INF     INF     INF     INF
nuc-n.2130      INF     INF     INF     INF     INF     INF     INF     INF     INF
nuc-n.2140      INF     INF     INF     INF     INF     INF     INF     INF     INF
nuc-n.2150      INF     INF     INF     INF     INF     INF     INF     INF     INF

nuc-n.2160      INF     INF     INF     INF     INF     INF     INF     INF     INF
nuc-n.2170      INF     INF     INF     INF     INF     INF     INF     INF     INF
nuc-n.2180      INF     INF     INF     INF     INF     INF     INF     INF     INF
nuc-n.2190      INF     INF     INF     INF     INF     INF     INF     INF     INF
nuc-n.2200      INF     INF     INF     INF     INF     INF     INF     INF     INF

*               usa     weur    japan   canz    eefsu   china   india   oilex   row

lbde.2010       INF     INF     INF     INF
lbde.2020       INF     INF     INF     INF
lbde.2030       INF     INF     INF     INF     INF     INF     INF     INF     INF
lbde.2040       INF     INF     INF     INF     INF     INF     INF     INF     INF
lbde.2050       INF     INF     INF     INF     INF     INF     INF     INF     INF

lbde.2060       INF     INF     INF     INF     INF     INF     INF     INF     INF
lbde.2070       INF     INF     INF     INF     INF     INF     INF     INF     INF
lbde.2080       INF     INF     INF     INF     INF     INF     INF     INF     INF
lbde.2090       INF     INF     INF     INF     INF     INF     INF     INF     INF
lbde.2100       INF     INF     INF     INF     INF     INF     INF     INF     INF

lbde.2110       INF     INF     INF     INF     INF     INF     INF     INF     INF
lbde.2120       INF     INF     INF     INF     INF     INF     INF     INF     INF
lbde.2130       INF     INF     INF     INF     INF     INF     INF     INF     INF
lbde.2140       INF     INF     INF     INF     INF     INF     INF     INF     INF
lbde.2150       INF     INF     INF     INF     INF     INF     INF     INF     INF

lbde.2160       INF     INF     INF     INF     INF     INF     INF     INF     INF
lbde.2170       INF     INF     INF     INF     INF     INF     INF     INF     INF
lbde.2180       INF     INF     INF     INF     INF     INF     INF     INF     INF
lbde.2190       INF     INF     INF     INF     INF     INF     INF     INF     INF
lbde.2200       INF     INF     INF     INF     INF     INF     INF     INF     INF
;

* Include a decline constraint, in essence, on remaining coal electricity.
* Question LEC 050706: What happens to coal-r after 2040?  Why can't you add more?  Perhaps an expansion constraint somewhere.

ECAP("coal-r",tbase,rg)   =       ELGEN("coal-r",rg);
ECAP("coal-r","2010",rg)  = 1.0 * ELGEN("coal-r",rg);
ECAP("coal-r","2020",rg)  = 1.0 * ELGEN("coal-r",rg);
ECAP("coal-r","2030",rg)  = 0.5 * ELGEN("coal-r",rg);
ECAP("coal-r","2040",rg)  = 0.25* ELGEN("coal-r",rg);

* Assume that retrofit of existing electric w/CCS is paced.
* No coal-rcsin the base year (2000).

ECAP("coal-rcs",tbase,rg)   = 0;
ECAP("coal-rcs","2010",rg)  = 0;
ECAP("coal-rcs","2020",rg)  = 0.50 * ECAP("coal-r","2020",rg);
ECAP("coal-rcs","2030",rg)  = ECAP("coal-r","2030",rg);
ECAP("coal-rcs","2040",rg)  = ECAP("coal-r","2040",rg);

ECAP("oil-r " ,tbase,rg)  =       ELGEN("oil-r ",rg);

ECAP("gas-r " ,tbase,rg)  =       ELGEN("gas-r ",rg);
ECAP("gas-r " ,"2010",rg) =       ELGEN("gas-r ",rg);
ECAP("gas-r " ,"2020",rg) = 0.5 * ELGEN("gas-r ",rg);

ECAP("hydro",tp20,rg) = ECAP("hydro",  "2020",RG);
ECAP("nuc-r",tp20,rg) = ECAP("nuc-r",  "2020",RG);

ECAP("gas-n",tp30,rg) =   INF;
ECAP("gas-ncs",tp20,rg) =   INF;

ECAP("coal-n",pp,rg)       =   INF;
ECAP("coal-n",pp,"weur")   =   .400;

ECAP("wind-hc",tp10,rg)     =   INF;

DISPLAY ECAP;

NCAP("cldu",tbase,rg) =     FOS("coal ",rg)
             - ECAP("coal-r", tbase, rg) * HTRT("coal-r ",rg);

NCAP("cldu",tbase,rg) =     max(0, NCAP("cldu",tbase,rg));


$ontext
Costs of gas-r and coal-r are half those of gas-n and coal-n.
Costs of oil-r identical to those of gas-r.
Checked costs of other technologies against those of SFA.XLS.
RGR specified costs of coal-n and lbde.
$offtext

*TABLE ECST(et,rg)  ELECTRICITY COST COEFFICIENTS - MILLS PER KWH
 TABLE ECST(et, *)  ELECTRICITY COST COEFFICIENTS - MILLS PER KWH

             usa     weur    japan  canz    eefsu   china   india   oilex   row

hydro        40.0    40.0    40.0   40.0    40.0    40.0    40.0    40.0    40.0
nuc-r        50.0    50.0    50.0   50.0    50.0    50.0    50.0    50.0    50.0
gas-r         6.0     6.0     6.0    6.0     6.0     6.0     6.0     6.0     6.0
gas-n        12.0    12.0    12.0   12.0    12.0    12.0    12.0    12.0    12.0
gas-ncs      22.0    22.0    22.0   22.0    22.0    22.0    22.0    22.0    22.0
oil-r         6.0     6.0     6.0    6.0     6.0     6.0     6.0     6.0     6.0
coal-r       20.0    27.5    27.5   20.0    20.0    20.0    20.0    20.0    20.0
coal-n       40.0    47.5    47.5   40.0    40.0    40.0    40.0    40.0    40.0
coal-ncs     55.0    62.5    62.5   55.0    55.0    55.0    55.0    55.0    55.0
wind-lc      60.0    60.0    60.0   60.0    60.0    60.0    60.0    60.0    60.0
wind-hc     150.0   150.0   150.0  150.0   150.0   150.0   150.0   150.0   150.0
nuc-n        50.0    50.0    50.0   50.0    50.0    50.0    50.0    50.0    50.0
lbde         50.0    50.0    50.0   50.0    50.0    50.0    50.0    50.0    50.0
;

*  Assume a levelized cost for coal-rcsthat is based on coal-r.

ECST("coal-rcs",RG) = ECST("coal-r",RG) + 15;

TABLE QECST(et,rg)  QUADRATIC ELECTRICITY COST COEFFICIENTS - MILLS PER KWH

*  Denotes additional cost of PE variables when PE is at ECAP bound.
*  Reduces likelihood of penny-switching behavior.

         usa    weur   japan   canz    eefsu   china   india   oilex   row

gas-n    10

$ontext

    gas-r and oil-r refer, respectively, to remaining oil and gas-fired
plants.  To avoid double counting of fuel inputs, their cost coefficients
include only O&M and a portion of capital costs .  Other activities include
fuel, O&M and levelized capital costs.

The following scalars are all related to the lbde electric technology.
Must make a thoughtful choice of cpe0.  Compare with CPE(t) results.  Adopted
IIASA "anchor value" for lrn = -.3219.  This implies 20% learning rate for each
doubling of CPE.

$offtext

SCALARS
        inlce   initial learning cost - $ per thousand kwh
        cpe0    initial cumulative production - tkwh
        lrne    learning parameter;

        inlce   =       50;
        cpe0    =        1;
        lrne    =      -.3219;

*==>$include "tables\NUC.TAB"

parameter       sigma_wtp       Elasticity of NM cost to nuclear share /1.0/,
                wtp0            Referece non-market cost of nuclear /10/,
                refshr(rg)      Reference nuclear share;

*       Calibrate external cost of nuclear power to base year
*       nuclear share in the Annex-B countries.  Assume that
*       wtp in non-annexb is lower initially but will be idential
*       to that of the US when nuclear share reaches equivalent
*       levels.

refshr(anb) = ecap("nuc-r","2000",anb)/sum(et,ecap(et,"2000",anb));
refshr(nanb) = refshr("usa");

*==>$include "M5.PAR"
*-------------------------------  M5.PAR  ------------------------------*



*  This section of the code contains the parameter definitions and
*  assignments.

SCALARS
    LOTOL     TOLERANCE FACTOR FOR LOWER BOUNDS ON MACRO VARIABLES  / 0.1/
    EXAJTOMT  CONVERSION FACTOR FROM EXAJ TO MTOE                   /22.3/;

PARAMETERS
    I0(RG)        INITIAL INVESTMENT
    C0(RG)        INITIAL CONSUMPTION
    K0(RG)        INITIAL CAPITAL
    E0(RG)        INITIAL ELECTRIC ENERGY
    N0(RG)        INITIAL NON-ELECTRIC ENERGY
    Y0(RG)        INITIAL OUTPUT
    RHO(RG)       ESUB MINUS ONE DIVIDED BY ESUB
    ACONST(TP,RG) CONSTANT FOR CAPITAL-LABOR INDEX
    BCONST(TP,RG) CONSTANT FOR ELECTRIC-NON-ELECTRIC ENERGY INDEX
    WTP(RG,TP,SW) FRACTIONAL GDP LOSS FOR WTPTEMP AT ALL INCOMES
    HSX(RG,TP,SW) HOCKEY-STICK EXPONENT
    KGDP(RG)      INITIAL CAPITAL-GDP RATIO
    DEPR(RG)      ANNUAL PERCENT DEPRECIATION
    SPDA(RG)      SPEED OF ADJUSTMENT
    SPEED(TP,RG)  PERIOD ADJUSTMENT SPEED
    PNREF(RG)     REFERENCE PRICE OF NON-ELECTRIC ENERGY - DOLLARS PER GJ
    PEREF(RG)     REFERENCE PRICE OF ELECTRIC ENERGY - MILLS PER KWH
    ESUB(RG)      ELASTICITY BETWEEN K-L AND E-N
    KPVS(RG)      CAPITAL VALUE SHARE PARAMETER
    ELVS(RG)      ELECTRIC VALUE SHARE PARAMETER

    XNTAX(RG)     EXISTING TAX RATE ON NONELECTRIC ENERGY
    XETAX(RG)     EXISTING TAX RATE ON ELECTRIC ENERGY

    DECF(RG)      MAX DECLINE FACTOR (ANNUAL) FOR PE-DL -  SYNF -  NE-BAK
    NSHF(RG)      MAX MARKET SHARE FACTOR FOR EX AND NX TECHNOLOGIES
    EXPF(RG)      MAX EXPANSION FACTOR (ANNUAL) FOR XLE TECHNOLOGIES
    NXPF(RG)      MAX EXPANSION FACTOR (ANNUAL) FOR XLN TECHNOLOGIES

    OGPD(RG)      OIL-GAS PRICE DIFFERENTIAL - DOLLARS PER GJ
    CLGDP(RG)     COAL-GNP GROWTH ELASTICITY

    DFACTCURR(TP,RG)   CURRENT ANNUAL UTILITY DISCOUNT FACTOR
    UDF(TP,RG)         UTILITY DISCOUNT FACTOR FOR PERIOD TP
    UDFSUM(RG)         UDF NORMALIZING CONSTANT
    L(TP,RG)           CURRENT LABOR FORCE (EFFICIENCY UNITS)
    LN(TP,RG)          LABOR FORCE - NEW VINTAGE
    KL(TP,RG)          CAPITAL-LABOR INDEX

    YREF(TP,RG)        REFERENCE VALUE OF GROSS OUTPUT
    KREF(TP,RG)        REFERENCE VALUE OF CAPITAL
    YCHK(TP,RG)        CHECK VALUE OF GROSS OUTPUT
    EREF(TP,RG)        REFERENCE QUANTITY OF ELECTRICITY - TKWH
    NREF(TP,RG)        REFERENCE QUANTITY OF NONELECTRIC ENERGY

    AEEIFAC(TP,RG)     AEEI FACTOR

    PVPI(TRD,TP,SW)        PRESENT VALUE PRICES OF TRADEABLES
    FTPI(SW,TRD,TP)        FUTURE VALUE PRICES OF TRADEABLES
    NWT(RG)                NEGISHI WEIGHTS
    NWTITR(ITER,RG)        NEGISHI WEIGHTS AT EACH ITERATION
    TAXREV(RG,TP,SW)       ENERGY TAX REVENUES FOR EACH REGION
    TAXITR(RG,TP,ITER,SW)  TAX REVENUES AT EACH ITERATION;


$ontext
Willing to pay 1% of GDP to avoid WTPTEMP at $25 K per capita.
            .1842 = - ln (.01)/25.
$offtext

WTP(RG,TP,SW) =
            WTPLOSS(SW)/ ( 1 + 100*EXP(-0.1842*PCGDP(TP,RG)));

HSX(RG,TP,SW)$(CATT(RG,SW) LT INF) = LOG(1-  WTP(RG,TP,SW))/
                                     LOG(1- (WTPTEMP(SW)/CATT(RG,SW))**2);

* UPPER BOUND ON HOCKEY STICK EXPONENTIAL TO AVOID POTENTIAL NON-CONVEXITIES
HSX(RG,TP,SW) = MIN(HSX(RG,TP,SW),1.000);

DISPLAY CATT, WTP, HSX;


NWT(RG)   = POTGDP("2000",RG) / SUM(R, POTGDP("2000",R));
NWT(RG)   = MACRO("NW",RG);

DISPLAY NWT;

NWTITR("IT0",RG) = NWT(RG);

DISPLAY NWTITR;

KGDP(RG)  = MACRO("KGDP", RG);
DEPR(RG)  = MACRO("DEPR", RG);
PNREF(RG) = MACRO("PNREF", RG);
ESUB(RG)  = MACRO("ESUB", RG);
KPVS(RG)  = MACRO("KPVS", RG);
ELVS(RG)  = MACRO("ELVS", RG);
XNTAX(RG) = MACRO("XNTAX", RG);
XETAX(RG) = MACRO("XETAX", RG);
DECF(RG)  = MACRO("DECF", RG);
NSHF(RG)  = MACRO("NSHF",RG);
EXPF(RG)  = MACRO("EXPF", RG);
NXPF(RG)  = MACRO("NXPF", RG);
CLGDP(RG) = MACRO("CLGDP", RG);
OGPD(RG)  = MACRO("OGPD", RG);

AEEIFAC("2000",RG) = 1;
LOOP(TP,
     AEEIFAC(TP+1,RG) = ( (1 - AEEI(TP,RG)) ** NYPER(TP) ) * AEEIFAC(TP,RG)
    );

DISPLAY AEEIFAC;

* Intertemporal optimality condition is applied to calculate each period's
* annual utility discount factor individually.

DFACTCURR(TP,RG)  =  1 - MPC(TP) + GROW(TP,RG);

K0(RG)  =  KGDP(RG)*POTGDP("2000",RG);

SPDA(RG)      =  1 - DEPR(RG)/100;
SPEED(TP,RG)  =  SPDA(RG)**NYPER(TP);

RHO(RG) = (ESUB(RG) - 1)/ESUB(RG);

TAXREV(RG,TP,SW) = 0;

LOOP(TBASE,

     E0(RG) = SUM(ET, ECAP(ET,TBASE,RG));

     N0(RG) = SUM(NT, NCAP(NT,TBASE,RG))
              - NCAP("COAL",TBASE, RG)
              - HTRT("OIL-R",RG)*ECAP("OIL-R",TBASE,RG)
              - HTRT("GAS-R",RG)*ECAP("GAS-R",TBASE,RG)
              - HTRT("GAS-N",RG)*ECAP("GAS-N",TBASE,RG)
              - OILX(TBASE,RG) - GASX(TBASE,RG);

     I0(RG) = POTGDP(TBASE,RG) * KGDP(RG) * (GROW(TBASE,RG) + (DEPR(RG)/100));

     C0(RG) = POTGDP(TBASE,RG) - I0(RG) ;

     Y0(RG) = I0(RG) + C0(RG)
            + ( SUM(ET, ECAP(ET,TBASE,RG)*ECST(ET,RG))
                - OILX(TBASE,RG) *  MACRO("INTPR",RG)
                - GASX(TBASE,RG) *  MACRO("INTPR",RG)
                + SUM(NT, NCAP(NT,TBASE,RG)*NCST(NT,RG))
              )/1000;
    );

PEREF(RG) =     ELVS(RG) * PNREF(RG) * N0(RG)/((1-ELVS(RG))*E0(RG));

DISPLAY Y0, PEREF;
LOOP(TP,NCAP("CLDU",TP+1,RG) =
            NCAP("CLDU",TP,RG)*(( 1 + (GROW(TP,RG)*CLGDP(RG)) )**NYPER(TP))
    );
        NCAP("CLDU",TP50,RG)  = NCAP("CLDU","2050",RG);

DISPLAY ECAP, NCAP;

UDF(TBASE,RG)  =  1;
L(TBASE,RG)    =  1;

LOOP(TP,
      L(TP+1,RG)    =  L(TP,RG)*(1 + GROW(TP,RG))**NYPER(TP) ;
      LN(TP+1,RG)   =  L(TP+1,RG) - L(TP,RG)*SPDA(RG)**NYPER(TP) ;

      UDF(TP+1,RG)  =  UDF(TP,RG)*DFACTCURR(TP,RG)**NYPER(TP)
    );

      KREF(TP,RG)   =  L(TP,RG) * K0(RG);
      EREF(TP,RG)   =  L(TP,RG) * E0(RG) * AEEIFAC(TP,RG);
      NREF(TP,RG)   =  L(TP,RG) * N0(RG) * AEEIFAC(TP,RG);

display L, POTGDP, PEREF, EREF, PNREF, NREF;

      YREF(TP,RG)   =  L(TP,RG) * POTGDP("2000",RG)
                                    + (PEREF(RG)*EREF(TP,RG)
                                    +  PNREF(RG)*NREF(TP,RG))/1000;

DISPLAY E0, N0, EREF, NREF, YREF;

*   Implied by first-order optimality conditions.

BCONST(TP,RG)   = (PNREF(RG)/1000)*YREF(TP,RG)**(RHO(RG) - 1) /
                        ((1 - ELVS(RG))*(EREF(TP,RG)**(RHO(RG)*ELVS(RG)))
                        *(NREF(TP,RG)**(RHO(RG)*(1 - ELVS(RG)) - 1)));

*   Implied by exhaustion-of-product conditions.

ACONST(TP,RG)  =    (EREF(TP,RG)**ELVS(RG)) * (NREF(TP,RG)**(1-ELVS(RG)));

ACONST(TP,RG)  =    YREF(TP,RG)**RHO(RG)
                  - BCONST(TP,RG)*ACONST(TP,RG)**RHO(RG);

KL(TP,RG) = KREF(TP,RG)**(rho(rg)*kpvs(rg))*L(tp,rg)**(rho(rg)*(1 - kpvs(rg)));

ACONST(TP,RG)   = ACONST(TP,RG)/KL(TP,RG);

YCHK(TP,RG)   = (EREF(TP,RG)**ELVS(RG)) * (NREF(TP,RG)**(1-ELVS(RG)));

YCHK(TP,RG)   = BCONST(TP,RG) *  YCHK(TP,RG)**RHO(RG);

YCHK(TP,RG)   = ACONST(TP,RG)*KL(TP,RG) + YCHK(TP,RG);

YCHK(TP,RG)  =  YCHK(TP,RG)**(1/RHO(RG));

OPTION DECIMALS = 6;
DISPLAY KL, ACONST, BCONST, YREF, YCHK;

*  Arbitrary multiplier on utility in last time period.

UDF(TLAST,RG) = UDF(TLAST,RG) * ARBM;
OPTION DECIMALS = 3;
DISPLAY UDF;

*UDF("2005",RG)     =  .5 * UDF("2005",RG);
*UDF("2010",RG)     =  .5 * UDF("2010",RG);
*UDF("2015",RG)     =  .5 * UDF("2015",RG);

UDFSUM(RG)     =  SUM(PP, UDF(PP,RG));
UDF(TBASE,RG)  =  0.0;
UDF(PP,RG)     =  UDF(PP,RG)/UDFSUM(RG);

DISPLAY "UDF VALUES - AFTER NORMALIZATION AND CORRECTION FOR PERIOD LENGTH";
DISPLAY UDF, L;


*==>$include "M5.VEQ"
*----------------------------------- M5.VEQ -------------------------------*



*  This section of the code contains the variable and equation definitions.

*  Upper case letters denote decision variables.  Except for stock variables,

*  these represent annual rates.  Unit: trillion 2000 dollars unless indicated

*  otherwise.

*  This version of MERGE includes "sw" (state of world) indexes, but excludes

*  "locking" constraints for hedging strategies.

POSITIVE VARIABLES

    K(rg,tp,sw)           capital stock

    KN(rg,tp,sw)          new capital stock

    Y(rg,tp,sw)           production

    YN(rg,tp,sw)          new production

    E(rg,tp,sw)           electric energy

    EN(rg,tp,sw)          new electric energy

    N(rg,tp,sw)           non-electric energy

    NN(rg,tp,sw)          new non-electric energy

    PE(et,*,rg,sw)        production of electric energy - tkwh

    CPE(tp,sw)            cumulative global production of lbde - electric energy - tkwh

    CPN(tp,sw)            cumulative global production of lbdn - nonelectric energy - exaj

    PN(nt,tp,rg,sw)       production of nonelectric energy - exaj


    GASNON(tp,rg,sw)      gas consumed to meet nonelectric demands

    OILNON(tp,rg,sw)      oil consumed to meet nonelectric demands



    URSC(rg,x,tp,sw)      undiscovered resources

    PRSV(rg,x,tp,sw)      proven reserves

    RA(rg,x,tp,sw)        reserve additions

    C(rg,tp,sw)           consumption - trillion dollars

    I(rg,tp,sw)           investment - trillion dollars


    CLEV(tp,rg,sw)        carbon emissions level - billion tons

    DC(rg,tp,sw)          delay carbon utilization - billion tons

    CRLX(tp,rg,sw)        carbon limit relaxation - billion tons

    ORLX(ogg,tp,rg,sw)    ogg limit relaxation - billion tce

    ABATE(ghg,abx,tp,rg,sw)
                          greenhouse gas abatement - billion tce

    AFF(sy,ps,sw)         afforestation scenario - fraction adopted

    EXPRT(trd,tp,rg,sw)   exports

    EM(ghg,tp,sw)         world energy-related emissions - billion tons

    TOTEM(ghg,tp,sw)      total world emissions (energy and non-energy less abatement)

    CO2(box,tp,sw)        stock of CO2 in each box at time tp

    S(ghg,tp,sw)          atmospheric stock of each greenhouse gas

    SMINUS(ghg,tp,sw)     atmospheric stock of each greenhouse gas minus equilibrium stock

    PT(tp,sw)             potential temperature increase from 1750

    ATP(tp,sw)            actual temperature increase from 2000

    ELF(rg,tp,sw)         economic loss factor

    MD(rg,tp,sw)          market damages - trillion dollars;

VARIABLES

    NWEL                  negishi welfare

    EC(rg,tp,sw)          energy cost - trillion dollars

    NTX(trd,tp,rg,sw)     net exports;



$ontext



Global Negishi welfare is a weighted sum of the discounted logarithm of

macroeconomic consumption, adjusted for the economic losses generated by non-

market damages.  The parameter catt defines the region-specific value of

the catastrophic level of temperature.  The parameter hsx modifies the

quadratic loss function so as to allow for a hockey-stick shape.



In the Pareto-optimal case, nonmarket damages enter the Negishi welfare

definition, and market damages represent one of the competing claims on the

allocation of total production resources.  In all other cases, nonmarket

and market damages are excluded from the determination of the equilibrium,

but are determined in a post-optimization step.  In this way, we allow for

the possibility of non-cooperation or of non-optimal international control

agreements.


$offtext

EQUATIONS

*   Locking constraints:

   LKK(rg,tp,sw)         locking constraints for K
   LKKN(rg,tp,sw)        locking constraints for KN
   LKY(rg,tp,sw)         locking constraints for Y
   LKYN(rg,tp,sw)        locking constraints for YN
   LKE(rg,tp,sw)         locking constraints for E
   LKEN(rg,tp,sw)        locking constraints for EN
   LKN(rg,tp,sw)         locking constraints for N
   LKNN(rg,tp,sw)        locking constraints for NN
   LKPE(et,tp,rg,sw)     locking constraints for PE
   LKCPE(tp,sw)          locking constraints for CPE
   LKCPN(tp,sw)          locking constraints for CPN
   LKPN(nt,tp,rg,sw)     locking constraints for PN
   LKGASNON(tp,rg,sw)    locking constraints for GASNON
   LKOILNON(tp,rg,sw)    locking constraints for OILNON
   LKURSC(rg,x,tp,sw)    locking constraints for URSC
   LKPRSV(rg,x,tp,sw)    locking constraints for PRSV
   LKRA(rg,x,tp,sw)      locking constraints for RA
   LKC(rg,tp,sw)         locking constraints for C
   LKI(rg,tp,sw)         locking constraints for I
   LKCLEV(tp,rg,sw)      locking constraints for CLEV
   LKDC(rg,tp,sw)        locking constraints for DC
   LKCRLX(tp,rg,sw)      locking constraints for CRLX
   LKABATE(ghg,abx,tp,rg,sw)     locking constraints for ABATE
   LKAFF(sy,ps,sw)       locking constraints for AFF
   LKEXPRT(trd,tp,rg,sw) locking constraints for EXPRT
   LKATP(tp,sw)          locking constraints for ATP
   LKELF(rg,tp,sw)       locking constraints for ELF
   LKMD(rg,tp,sw)        locking constraints for MD
   LKEC(rg,tp,sw)        locking constraints for EC
   LKNTX(trd,tp,rg,sw)   locking constraints for NTX

   LKEM(ghg,tp,sw)       locking constraints for EM
   LKTOTEM(ghg,tp,sw)    locking constraints for TOTEM
   LKCO2(box,tp,sw)      locking constraints for CO2
   LKS(ghg,tp,sw)        locking constraints for S
   LKSM(ghg,tp,sw)       locking constraints for SMINUS

   LKPT(tp,sw)           locking constraints for PT

*   MACRO submodel:

    nweldf                negishi welfare definition

    newcap(rg,tp,sw)      new capital

    newprod(rg,tp,sw)     new production

    newelec(rg,tp,sw)     new electric energy

    newnon(rg,tp,sw)      new non-electric energy

    totalcap(rg,tp,sw)    total capital stock

    totalprod(rg,tp,sw)   total production

    tc(rg,tp,sw)      terminal condition on investment and capital stock



*   ETA submodel:

    supelec(*,*,sw)        supply of electricity

    supnon(*,*,sw)         supply of non-electric energy

    supgas(*,*,sw)         supply of gas

    supoil(*,*,sw)         supply of oil

    supcoal(*,*,sw)        supply of coal

    supcoal_r(*,*,sw)      supply of coal-r and coal-rcs

    bfuelfrac(rg,tp,sw)     bfuel fraction of nonelectric energy - biomass

    synffrac(rg,tp,sw)     synf  fraction of nonelectric energy

    gfrac(rg,tp,sw)        gas fraction of nonelectric energy

    egfrac(rg,tp,sw)       gas fraction of electric energy

    ecfrac(rg,tp,sw)       coal-n  fraction of electric energy

    ecfrac2(rg,tp,sw)      coal-n and coal-ncs combined cannot exceed any coal-n caps

    coalafrac(rg,tp,sw)    wind-lc fraction of electric energy

*.    advfrac(rg,tp,sw)      nuc-n - fraction of electric energy supplied by nuc-rlear

    ccsfrac(rg,tp,sw)      ccs - fraction of electric energy supplied by coal-ncs

    costnrg(rg,tp,sw)      cost of energy

    cc(rg,tp,sw)          capacity constraint

    trdbal(tp,trd,sw)     global trade balance

    ntdef(trd,tp,rg,sw)   triggers definition of positive exports

    dece(rg,tp,dle,sw)    decline rate of dle technologies

    decn(rg,tp,dln,sw)    decline rate of dln technologies

    deco(rg,tp,sw)        decline rate of oilnon

    decg(rg,tp,sw)        decline rate of gasnon

    expe(rg,tp,xle,sw)    expansion rate of xle technologies

    expg(rg,tp,sw)        expansion rate of xlg technologies

    expn(rg,tp,xln,sw)    expansion rate of xln technologies

    cpedf(tp,sw)          cumulative global production of lbde - electric energy

    cpndf(tp,sw)          cumulative global production of lbdn - nonelectric energy

    rscav(rg,tp,x,sw)     undiscovered resources available

    rsvav(rg,tp,x,sw)     proven reserves available

    rdflim(rg,tp,x,sw)    resource depletion limit

    prvlim(rg,tp,x,sw)    production-reserve limit

    carlev(rg,tp,sw)      carbon emissions level - billion tons

    clevbd(tp,rg,sw)      upper bound on annual carbon emissions

    oggbd(ogg,tp,rg,sw)   upper bound on annual ogg emissions

    wcardf(tp,sw)         definition of world energy-related co2 emissions

    fracsum(sw)           sum of fractional aforestation programs
    
    nucdec(rg,tp,sw)      New nuclear decline constraints

*   CLIMATE submodel:

    wch4df(tp,sw)         definition of world energy-related ch4 emissions

    totemit(ghg,tp,sw)    total world emissions for each greenhouse gas

    co2box(box,tp,sw)     CO2 accumulation in each box

    co2stock(tp,sw)       atmospheric CO2 stock accumulation

    ostock(ghg,tp,sw)     other greenhouse gases stock accumulation

    ostockm(ghg,tp,sw)    other greenhouse gases stock accumulation minus equilibrium stock

    ptdf(tp,sw)           potential temperature definition

    atdf(tp,sw)           actual temperature definition

    atin(tp,sw)           decadal increment in actual temperature

*   IMPACTS submodel:

    marketd(rg,tp,sw)     market damages from temperature increase

    elfdf(rg,tp,sw)       nonmarket damages from temperature increase;


*   Locking constraints:

LKK(rg,tp,sw)$lk(tp)..      K(rg,tp,"sw1")         =e=    K(rg,tp,sw);
LKKN(rg,tp,sw)$lk(tp)..     KN(rg,tp,"sw1")        =e=    KN(rg,tp,sw);
LKY(rg,tp,sw)$lk(tp)..      Y(rg,tp,"sw1")         =e=    Y(rg,tp,sw);
LKYN(rg,tp,sw)$lk(tp)..     YN(rg,tp,"sw1")        =e=    YN(rg,tp,sw);
LKE(rg,tp,sw)$lk(tp)..      E(rg,tp,"sw1")         =e=    E(rg,tp,sw);
LKEN(rg,tp,sw)$lk(tp)..     EN(rg,tp,"sw1")        =e=    EN(rg,tp,sw);
LKN(rg,tp,sw)$lk(tp)..      N(rg,tp,"sw1")         =e=    N(rg,tp,sw);
LKNN(rg,tp,sw)$lk(tp)..     NN(rg,tp,"sw1")        =e=    NN(rg,tp,sw);
LKPE(et,tp,rg,sw)$lk(tp)..  PE(et,tp,rg,"sw1")     =e=    PE(et,tp,rg,sw);
LKCPE(tp,sw)$lk(tp)..       CPE(tp,"sw1")          =e=    CPE(tp,sw);
LKCPN(tp,sw)$lk(tp)..       CPN(tp,"sw1")          =e=    CPN(tp,sw);
LKPN(nt,tp,rg,sw)$lk(tp)..  PN(nt,tp,rg,"sw1")     =e=    PN(nt,tp,rg,sw);
LKGASNON(tp,rg,sw)$lk(tp).. GASNON(tp,rg,"sw1")    =e=    GASNON(tp,rg,sw);
LKOILNON(tp,rg,sw)$lk(tp).. OILNON(tp,rg,"sw1")    =e=    OILNON(tp,rg,sw);
LKURSC(rg,x,tp,sw)$lk(tp).. URSC(rg,x,tp,"sw1")    =e=    URSC(rg,x,tp,sw);
LKPRSV(rg,x,tp,sw)$lk(tp).. PRSV(rg,x,tp,"sw1")    =e=    PRSV(rg,x,tp,sw);
LKRA(rg,x,tp,sw)$lk(tp)..   RA(rg,x,tp,"sw1")      =e=    RA(rg,x,tp,sw);
LKC(rg,tp,sw)$lk(tp)..      C(rg,tp,"sw1")         =e=    C(rg,tp,sw);
LKI(rg,tp,sw)$lk(tp)..      I(rg,tp,"sw1")         =e=    I(rg,tp,sw);
LKCLEV(tp,rg,sw)$lk(tp)..   CLEV(tp,rg,"sw1")      =e=    CLEV(tp,rg,sw);
LKDC(rg,tp,sw)$lk(tp)..     DC(rg,tp,"sw1")        =e=    DC(rg,tp,sw);
LKCRLX(tp,rg,sw)$lk(tp)..   CRLX(tp,rg,"sw1")      =e=    CRLX(tp,rg,sw);
LKABATE(ghg,abx,tp,rg,sw)$lk(tp)..
                        ABATE(ghg,abx,tp,rg,"sw1") =e= ABATE(ghg,abx,tp,rg,sw);
LKAFF(sy,ps,sw)$lk(sy)..    AFF(sy,ps,"sw1")       =e=    AFF(sy,ps,sw);
LKEXPRT(trd,tp,rg,sw)$lk(tp)..
                            EXPRT(trd,tp,rg,"sw1")  =e=   EXPRT(trd,tp,rg,sw);
LKATP(tp,sw)$lk(tp)..       ATP(tp,"sw1")           =e=   ATP(tp,sw);
LKELF(rg,tp,sw)$lk(tp)..    ELF(rg,tp,"sw1")        =e=   ELF(rg,tp,sw);
LKMD(rg,tp,sw)$lk(tp)..     MD(rg,tp,"sw1")         =e=   MD(rg,tp,sw);
LKEC(rg,tp,sw)$lk(tp)..     EC(rg,tp,"sw1")         =e=   EC(rg,tp,sw);
LKNTX(trd,tp,rg,sw)$lk(tp)..
                            NTX(trd,tp,rg,"sw1")    =e=   NTX(trd,tp,rg,sw);

LKEM(ghg,tp,sw)$lk(tp)..    EM(ghg,tp,"sw1")        =e=   EM(ghg,tp,sw);
LKTOTEM(ghg,tp,sw)$lk(tp).. TOTEM(ghg,tp,"sw1")     =e=   TOTEM(ghg,tp,sw);
LKCO2(box,tp,sw)$lk(tp)..   CO2(box,tp,"sw1")       =e=   CO2(box,tp,sw);
LKS(ghg,tp,sw)$lk(tp)..     S(ghg,tp,"sw1")         =e=   S(ghg,tp,sw);
LKSM(ghg,tp,sw)$lk(tp)..    SMINUS(ghg,tp,"sw1")    =e=   SMINUS(ghg,tp,sw);
LKPT(tp,sw)$lk(tp)..        PT(tp,"sw1")            =e=   PT(tp,sw);

$ontext



There is a putty-clay (nested CES) formulation of substitution between new

capital, labor, electric and nonelectric energy in the production of the

composite output good. In the case of old vintages, there is no substitution.

New capital at time tp+1 is a distributed lag function of the investments made

in year tp and tp+1.  This equation allows for varying the length of each period.

In most periods, nyper(tp) = 10.

$offtext

newcap(rg,tp+1,sw) $(tperly(tp) and st(tp+1,sw))..

                KN(rg,tp+1,sw)-.5*nyper(tp)*I(rg,tp+1,sw) =e=

                .5*nyper(tp) * speed(tp,rg)*I(rg,tp  ,sw);


newprod(rg,pp,sw)$st(pp,sw)..              YN(rg,pp,sw) =l=

 (aconst(pp,rg)*KN(rg,pp,sw)**(rho(rg)*kpvs(rg))

               *ln(pp,rg)**(rho(rg)*(1 - kpvs(rg)))

+ bconst(pp,rg)*EN(rg,pp,sw)**(rho(rg)*elvs(rg))

            *NN(rg,pp,sw)**(rho(rg)*(1 - elvs(rg))))**(1/rho(rg));


newelec(rg,tp+1,sw) $(tperly(tp) and st(tp+1,sw))..

                EN(rg,tp+1,sw) - E(rg,tp+1,sw) =e= - E(rg,tp,sw)*speed(tp,rg);


newnon(rg,tp+1,sw) $(tperly(tp) and st(tp+1,sw))..

                NN(rg,tp+1,sw) - N(rg,tp+1,sw) =e= - N(rg,tp,sw)*speed(tp,rg);


totalcap(rg,tp+1,sw) $ (tperly(tp) and st(tp+1,sw))..

                K(rg,tp+1,sw) - KN(rg,tp+1,sw)  =e= K(rg,tp,sw)*speed(tp,rg);


totalprod(rg,tp+1,sw) $(tperly(tp) and st(tp+1,sw))..

                Y(rg,tp+1,sw) - YN(rg,tp+1,sw)  =e= Y(rg,tp,sw)*speed(tp,rg);


tc(rg,tlast,sw)..

                      I(rg,tlast,sw) =g=

                     (K(rg,tlast,sw) * (grow(tlast,rg) + (1 - spda(rg))));


$ontext



The following equations provide one set of links between the MACRO and the ETA

submodels.  The left-hand side defines the supplies, and the right-hand

side the demands for electricity, nonelectric energy, natural gas, oil and

coal, respectively.

$offtext



supelec(rg,pp,sw)$st(pp,sw)..

                sum(et, PE(et,pp,rg,sw)) =g=

                E(rg,pp,sw);

supnon(rg,pp,sw)$st(pp,sw)..

                PN("cldu",pp,rg,sw)

              + PN("synf",pp,rg,sw)

              + PN("bfuel",pp,rg,sw)

              + PN("neb-hc",pp,rg,sw)

              + PN("neb-lc",pp,rg,sw)

              + PN("lbdn",pp,rg,sw)

              + OILNON(pp,rg,sw)

              + GASNON(pp,rg,sw) =g=

                N(rg,pp,sw);


$ontext

The demands for gas and oil include an allowance for net exports.  They also

include an allowance for fuel consumption (the heat rate coefficients) in the

electric power sector.

$offtext



supgas(rg,pp,sw)$st(pp,sw)..

                sum(gasc, PN(gasc,pp,rg,sw))  =g=

                htrt("gas-r",rg) * PE("gas-r",pp,rg,sw)

              + htrt("gas-n",rg) * PE("gas-n",pp,rg,sw)

              + htrt("gas-ncs",rg) * PE("gas-ncs",pp,rg,sw)

                                 + GASNON(pp,rg,sw)

                                 + NTX("gas",pp,rg,sw);



supoil(rg,pp,sw)$st(pp,sw)..



                sum(oilc, PN(oilc,pp,rg,sw))  =g=



                htrt("oil-r",rg) * PE("oil-r",pp,rg,sw)

                                 + OILNON(pp,rg,sw)

                                 + NTX("oil",pp,rg,sw);



supcoal(rg,pp,sw)$st(pp,sw)..

                PN("coal",pp,rg,sw)  =e=

                htrt("coal-r",rg) * PE("coal-r",pp,rg,sw)

              + htrt("coal-rcs",rg) * PE("coal-rcs",pp,rg,sw)

              + htrt("coal-n",rg) * PE("coal-n",pp,rg,sw)

              + htrt("coal-ncs  ",rg) * PE("coal-ncs  ",pp,rg,sw)

                                  + PN("cldu",pp,rg,sw)

                   + (1 + syntpe) * PN("synf",pp,rg,sw);


*   Natural gas is limited to supplying 50% of the nonelectric energy market.

gfrac(rg,pp,sw)$st(pp,sw)..


                GASNON(pp,rg,sw) =l= .5 * N(rg,pp,sw);



*  bfuel is limited to supplying 50% of the non electric energy market.


bfuelfrac(rg,pp,sw)$st(pp,sw)..


                PN("bfuel",pp,rg,sw) =l=

                .5 * N(rg,pp,sw);


*  synf  is limited to supplying 50% of the non electric energy market.


synffrac(rg,pp,sw)$st(pp,sw)..


                PN("synf",pp,rg,sw) =l=

                .5 * N(rg,pp,sw);


*  coal-r and coal-rcscannot exceed the total cap on coal-r.  This allows for some retrofit with CCS.


supcoal_r(rg,pp,sw)$st(pp,sw)..

                PE("coal-r",pp,rg,sw) + PE("coal-rcs",pp,rg,sw) =L=

                ECAP("coal-r",pp,rg);


*   New GAS is limited to supplying 50% of the electric energy market.


egfrac(rg,pp,sw)$st(pp,sw)..


                PE("gas-n",pp,rg,sw) + PE("gas-ncs",pp,rg,sw) =l=

                .5 * E(rg,pp,sw);


*   New COAL is limited to supplying 50% of the electric energy market.


ecfrac(rg,pp,sw)$st(pp,sw)..


                PE("coal-n",pp,rg,sw) + PE("coal-ncs",pp,rg,sw) =l=

                .5 * E(rg,pp,sw);



*  coal-n and coal-ncs cannot exceed the total cap on coal-n.  This keeps coal-ncs from appearing in
*  places like Western Europe that have a cap on total coal-n.


ecfrac2(rg,pp,sw)$st(pp,sw)..


                PE("coal-n",pp,rg,sw) + PE("coal-ncs",pp,rg,sw) =L=

                ECAP("coal-n",pp,rg);



*   wind-lc is limited to supplying 20% of the electric energy market.


coalafrac(rg,pp,sw)$st(pp,sw)..


                PE("wind-lc",pp,rg,sw) =l=

                .2 * E(rg,pp,sw);


*   Nuclear, including both existing and new, is limited to supplying 33% of the electric energy market.


*.advfrac(rg,pp,sw)$st(pp,sw)..


*.                PE("nuc-n",pp,rg,sw) + PE("nuc-r",pp,rg,sw) =l=

*.                .33 * E(rg,pp,sw);


*  New nuclear can either stay constant or increase, but it cannot decline.

	
nucdec(rg,tp+1,sw)$st(tp+1,sw)..
		
		PE("nuc-n",tp+1,rg,sw) =g= PE("nuc-n",tp,rg,sw);



*   CCS is limited to supplying 100% of the electric energy market.

ccsfrac(rg,pp,sw)$st(pp,sw)..


                PE("coal-ncs",pp,rg,sw) + PE("gas-ncs",pp,rg,sw) + PE("coal-rcs",pp,rg,sw) =l=

                1   * E(rg,pp,sw);


*   The final equation in the ETA submodel defines EC, the aggregate costs

*   incurred within the energy sector.  This is one of the competing claims on

*   aggregate output.


costnrg(rg,tp,sw)$(pp(tp) and st(tp,sw))..    EC(rg,tp,sw) =g= .001 * (



*   Costs for electric and nonelectric energy supplies.

        sum(et, PE(et,tp,rg,sw)*ecst(et,rg)* cstred(tp))

      + sum(nt, PN(nt,tp,rg,sw)*ncst(nt,rg)* cstred(tp)* frncst(nt , "frnpn"))

      + sum(x,  RA(rg,x,tp,sw) *ncst(x ,rg)* cstred(tp)* frncst(x  , "frnra"))

*   Cost of high reliance on specific electricity technologies.

                    + .5 * sum (et, (qecst(et,rg)  *

    PE(et,tp,rg,sw)  *   PE(et,tp,rg,sw) / ecap(et,tp,rg)) $

                         ( ecap(et,tp,rg) gt 0 and ecap(et,tp,rg) lt Inf ) )

*   Electric lbde learning costs.

                + inlce * PE("lbde",tp,rg,sw) * (CPE(tp,sw) /cpe0 )**lrne

*   Nonelectric lbdn learning costs.

                + inlcn * PN("lbdn",tp,rg,sw) * (CPN(tp,sw) /cpn0 )**lrnn

*   Allowance for oil-gas price differential

                    + ogpd(rg)*GASNON(tp,rg,sw)

*   Taxes on electricity, nonelectric energy and carbon.

                    + xntax(rg)*N(rg,tp,sw)

                    + xetax(rg)*E(rg,tp,sw)

                    + ctax(tp,rg)*CLEV(tp,rg,sw)

*   Credit for lump-sum rebate of tax revenues.

                    - taxrev(rg,tp,sw)

*   Cost of relaxing carbon limit.

                    + rcl(tp)*CRLX(tp,rg,sw)

*   Cost of relaxing ogglim.

                    + rcl(tp)*sum(ogg, ORLX(ogg,tp,rg,sw))

*   Regional cost of global afforestation - based on SHARES.TAB

                    + sh(tp,rg) *  acf *
               SUM((sy,ps), price(sy,tp,ps)*cab(sy,tp,ps)*AFF(sy,ps,sw))

*   Cost of providing abatement of GHG.

                    + sum ((ghg,abx), abcst(abx,ghg)*ABATE(ghg,abx,tp,rg,sw))

*   Transportation costs for interregional trade.

                    + sum(trd, cstexp(trd)*EXPRT(trd,tp,rg,sw))

                                              );



*   Competing claims on resources include consumption, investment, energy

*   costs, market damages and net exports of the composite numeraire good.



cc(rg,pp,sw)$st(pp,sw)..     Y(rg,pp,sw) =e=

                      C(rg,pp,sw) + I(rg,pp,sw) + EC(rg,pp,sw) + MD(rg,pp,sw)

                                                       + NTX("nmr",pp,rg,sw);


*   Net exports of interregionally tradeable goods must be balanced with net

*   imports.


trdbal(pp,trd,sw)$st(pp,sw)..

                 sum(rg, NTX(trd, pp, rg,sw)) =e= 0;



*   In accounting for total energy costs, interregional transport costs are

*   proportional to net exports. It will be optimal for EXPRT variables to be

*   zero when NTX < 0.

ntdef(trd,tp,rg,sw) $ (cstexp(trd) and st(tp,sw))..

                 NTX(trd,tp,rg,sw) =l= EXPRT(trd,tp,rg,sw);


*   There are limits on the decline rates of specific technologies.

dece(rg,tp+1,dle,sw)$st(tp+1,sw)..

                 PE(dle,tp+1,rg,sw) =g=

                 PE(dle,tp,rg,sw)*(decf(rg)**nyper(tp));



decn(rg,tp+1,dln,sw)$st(tp+1,sw)..

                 PN(dln,tp+1,rg,sw) =g=

                 PN(dln,tp,rg,sw)*(decf(rg)**nyper(tp));


deco(rg,tp+1,sw)$st(tp+1,sw)..

                 OILNON(tp+1,rg,sw) =g=

                 OILNON(tp,rg,sw)*(decf(rg)**nyper(tp));


decg(rg,tp+1,sw)$st(tp+1,sw)..

                 GASNON(tp+1,rg,sw) =g=

                 GASNON(tp,rg,sw)*(decf(rg)**nyper(tp));


*   There are limits on the expansion rates of specific technologies.

expe(rg,tp+1,xle,sw)$st(tp+1,sw)..

             PE(xle,tp+1,rg,sw)  - nshf(rg) * E(rg,tp+1,sw)

       =l=            (expf(rg)**nyper(tp)) * PE(xle,tp,rg,sw);

expg(rg,tp+1,sw)$st(tp+1,sw)..

    sum(xlg, PE(xlg,tp+1,rg,sw)) - nshf(rg) * E(rg,tp+1,sw)

       =l=   (expf(rg)**nyper(tp)) * sum(xlg, PE(xlg,tp,rg,sw));

expn(rg,tp+1,xln,sw)$st(tp+1,sw)..

             PN(xln,tp+1,rg,sw)  - nshf(rg) * N(rg,tp+1,sw)

       =l=            (nxpf(rg)**nyper(tp)) * PN(xln,tp,rg,sw);


cpedf(tp+1,sw)$st(tp+1,sw)..
                         CPE(tp+1,sw) =e=

         .5*nyper(tp) *  sum(rg, PE("lbde",tp+1,rg,sw) + PE("lbde",tp,rg,sw))

                      +  CPE(tp,sw);

cpndf(tp+1,sw)$st(tp+1,sw)..
                         CPN(tp+1,sw) =e=

         .5*nyper(tp) *  sum(rg, PN("lbdn",tp+1,rg,sw) + PN("lbdn",tp,rg,sw))

                      +  CPN(tp,sw);


*   Changes in remaining undiscovered exhaustible resources are determined by a

*   distributed lag function of reserve additions.

rscav(rg,tp+1,x,sw)$st(tp+1,sw)..

                 URSC(rg,x,tp+1,sw) + .5*nyper(tp) * RA(rg,x,tp+1,sw) =e=

                 URSC(rg,x,tp,sw)    -.5*nyper(tp) * RA(rg,x,tp,  sw);


*   Changes in remaining proven reserves are determined by a distributed lag

*   function of reserve additions less production of exhaustible resources.


rsvav(rg,tp+1,x,sw)$st(tp+1,sw)..

   PRSV(rg,x,tp+1,sw) - .5*nyper(tp) * (RA(rg,x,tp+1,sw) - PN(x,tp+1,rg,sw)) =e=

   PRSV(rg,x,tp,sw)   + .5*nyper(tp) * (RA(rg,x,tp,sw) -   PN(x,tp,rg,sw));


*   Reserve additions cannot exceed a fixed fraction of remaining resources.


rdflim(rg,pp,x,sw)$st(pp,sw)..

                 RA(rg,x,pp,sw)    =l=

                 rdf(x,rg) * URSC(rg,x,pp,sw);



*   Production cannot exceed a fixed fraction of proven reserves.

prvlim(rg,pp,x,sw)$st(pp,sw)..

                 PN(x,pp,rg,sw)    =l=

                 prv(x,rg) * PRSV(rg,x,pp,sw);


$ontext


Carbon emissions are determined by the carbon coefficients and the production

levels for each electric and nonelectric technology. Emissions may

be reduced by high-cost carbon limit relaxation activities.

$offtext


carlev(rg,pp,sw)$st(pp,sw)..

              sum(et, cece(et,rg)*PE(et,pp,rg,sw))

                    + cecn("oil",rg)  *  OILNON(pp,rg,sw)

                    + cecn("gas",rg)  *  GASNON(pp,rg,sw)

                    + cecn("cldu",rg) *  PN("cldu",pp,rg,sw)

                    + cecn("synf",rg) *  PN("synf",pp,rg,sw)

* Adjustment for base year inconsistency of IEO.

                    + fos("carbdif",rg)

                    =e=  CLEV(pp,rg,sw) + CRLX(pp,rg,sw);

* Fractions of alternative aforestation scenarios.

fracsum(sw)..    SUM((sy,ps) , AFF(sy,ps,sw)) =l=  1;

*   GLOBAL carbon emissions are a jointly determined decision variable.  Each

*   region's shares in this public "good" are determined exogenously.


$include "tables\CSE.%cse%"

*   Global totals for energy-related ch4 emissions.

wch4df(pp,sw)$st(pp,sw)..

         1000 * EM("ch4",pp,sw) =e=

                sum(rg,

                    bch4gas(pp,rg) * sum(gasc, PN(gasc, pp,rg,sw)));


$ontext

The global total of each greenhouse gas is given by the energy-related

emissions (endogenous) and non-energy emissions (exogenous) less abatement.

This provides the link between regional emissions and global concentrations.

$offtext



totemit(ghg,pp,sw)$st(pp,sw)..

      TOTEM(ghg,pp,sw)  =e=

                  EM(ghg,pp,sw)    + nonem(ghg,pp)

                  + sum(rg, bline(ghg,pp,rg))/gwp(ghg)

                  - SUM((sy,ps) , cab(sy,pp,ps) * AFF(sy,ps,sw)) * co2fac(ghg)

                  - sum((abx,rg), ABATE(ghg,abx,pp,rg,sw))/gwp(ghg);


*   The carbon stock in each "box" is determined by a distributed lag process.



co2box(box,tp+1,sw)$st(tp+1,sw)..

   CO2(box,tp+1,sw) - decay2(tp,box)*frac(box)*.5*TOTEM("co2",tp+1,sw)  =e=

   CO2(box,tp,sw) * decay1(box)**nyper(tp) +

                      decay2(tp,box)*frac(box)*.5*TOTEM("co2",tp,sw);


*   The total stock of CO2 is determined by summing over all boxes.

co2stock(tp,sw)$st(tp,sw)..

                 S("co2",tp,sw)  =e=

                 sum(box, CO2(box,tp,sw)) + nco2;

*   The total stock of other greenhouse gases is determined by a distributed

*   lag process.

ostockm(ghg,tp,sw)$((ord(ghg) ne 1) and st(tp,sw))..

     SMINUS(ghg,tp,sw)  =e=  S(ghg,tp,sw) - eqstock(ghg);

ostock(ghg,tp+1,sw)$((ord(ghg) ne 1) and st(tp+1,sw))..

     SMINUS(ghg,tp+1,sw) - odecay2(tp,ghg) * .5 * TOTEM(ghg,tp+1,sw) =e=

     SMINUS(ghg,tp,sw)  *  odecay1(ghg)**nyper(tp)

                        +  odecay2(tp,ghg) * .5 * TOTEM(ghg,tp,sw);


$ontext

Potential temperature increase (from the base year) is determined by the

accumulation of greenhouse gases.  It is proportional to the aggregate

radiative forcing induced by each of these gases.  For CO2, the radiative

forcing is proportional to the logarithm of the ratio of the current to the

initial level.  There are similar but more complex forcing terms for N2O and

CH4.  The inter(ghg) term approximates interaction effects between these two

gases.

$offtext

ptdf(pp,sw)$st(pp,sw)..

                  PT(pp,sw) =e=

  rfconv(sw) * ( rfbase


             + (rffac("co2") * log(S("co2",pp,sw)/basestock("co2")))


             + sum(ghg$(ord(ghg) ge 2),

                   inter(ghg) * rffac(ghg)* (

                                             (sm(ghg)*S(ghg,pp,sw))**rfex

                                           - (sm(ghg)*basestock(ghg))**rfex))

             + sum(ghg$(ord(ghg) ge 4),
                rffac(ghg)  *  (S(ghg,pp,sw) - basestock(ghg)))

           )
           ;


*   Temperature is measured so that ATP = 0 in 2000.

*   Actual temperature increase (from the base year) is determined by a

*   distributed lag process.  Two lag constants are used in order to perform

*   calculations for multi-year time periods.


atdf(tp+1,sw)$st(tp+1,sw)..

           ATP(tp+1,sw) - lag2(tp) * .5 * PT(tp+1,sw) =e=

           ATP(tp,sw) * (1-lag1)**nyper(tp)

                        + lag2(tp) * .5 * PT(tp,sw)

   - rfconv(sw) * cool(tp+1,sw) + rfconv(sw) * cool("2000",sw) ;

*  Constraint on decadal increment in actual temperature after 2020.

atin(tp20+1,sw) $ st(tp20+1,sw) ..

           ATP(tp20+1,sw) =l=  ATP(tp20,sw) + atdinc(tp20,sw);


$include "tables\DAMAGES.%damages%"


nweldf..    NWEL =E=

     100 * 1000 * sum(rg, nwt(rg) *
                                    sum((sw,pp),

                                    prob(sw)*udf(pp,rg)

                                    *log( ELF(rg,pp,sw)*C(rg,pp,sw)

*       Calibrate a disutility of nuclear power such that when
*       nuclear output represents benchmark share of electric supply, the
*       marginal risk premium is wtp0 (20 mills per kwh):

            - ( 0.001 * wtp0/(1+sigma_wtp) *
            (PE("nuc-n",pp,rg,sw)+PE("nuc-r",pp,rg,sw)) *
            ((PE("nuc-n",pp,rg,sw) + PE("nuc-r",pp,rg,sw)) /
                (refshr(rg)*E(rg,pp,sw)))**sigma_wtp))));


*==>$include "M5.BND"
*-------------------------------  M5.BND  ------------------------------*

*  This section of the code contains the base year benchmarks of
*  variables and other variable bounds.

* These data are computed in M5.PAR with data from MACRO.TAB.

E.FX(RG,TBASE,SW) = E0(RG);
N.FX(RG,TBASE,SW) = N0(RG);
Y.FX(RG,TBASE,SW) = Y0(RG);
K.FX(RG,TBASE,SW) = K0(RG);
C.FX(RG,TBASE,SW) = C0(RG);
I.FX(RG,TBASE,SW) = I0(RG);

* The following bounds help to avoid nasty program calls.

K.LO(RG,PP,SW)   =  LOTOL*K0(RG);
KN.LO(RG,PP,SW)  =  LOTOL*I0(RG)*10;

Y.LO(RG,PP,SW)   =  LOTOL*Y0(RG)*L(PP,RG);
YN.LO(RG,PP,SW)  =  LOTOL*Y0(RG)*LN(PP,RG);

C.LO(RG,PP,SW)   =  LOTOL*C0(RG)*L(PP,RG);
C.LO(RG,PP,SW)   =  MAX(.1, C.LO(RG,PP,SW));

C.UP(RG,PP,SW)   =        C0(RG)*L(PP,RG)/LOTOL;

ELF.LO(RG,TP,SW)           = .90;
ELF.UP(RG,TP,SW)           = 1.0;

I.LO(RG,PP,SW)   =  LOTOL*I0(RG)*L(PP,RG);

E.LO(RG,PP,SW)   =  LOTOL*E0(RG)*L(PP,RG);
EN.LO(RG,PP,SW)  =  LOTOL*E0(RG);


N.LO(RG,PP,SW)   =  LOTOL*N0(RG)*L(PP,RG);
NN.LO(RG,PP,SW)  =  LOTOL*N0(RG);

* The following initial levels accelerate convergence.

K.L(RG,PP,SW)    =  K0(RG)*L(PP,RG);
Y.L(RG,PP,SW)    =  Y0(RG)*L(PP,RG);
C.L(RG,PP,SW)    =  C0(RG)*L(PP,RG);
I.L(RG,PP,SW)    =  I0(RG)*L(PP,RG);

* The base year levels and future capacities of electric and
* nonelectric energy technologies are found in ELEC.TAB and
* NELE.TAB, respectively.

PE.UP(ET,PP,RG,SW)       =  ECAP(ET,PP,RG);
PE.FX(ET,TBASE,RG,SW)    =  ECAP(ET,TBASE,RG);
PE.FX("hydro",TP,RG,SW)  =  ECAP("hydro",TP,RG);
PE.FX("nuc-r",TP,RG,SW)  =  ECAP("nuc-r"  ,TP,RG);

* To avoid unrealistic heat rate improvements, we fix coal-r, oil-r and gas-r
* in EEFSU and Non-Annex B. See TABLE HTRT.

PE.FX("COAL-R",TP,"EEFSU",SW)  =  ECAP("COAL-R",TP,"EEFSU");
PE.FX("OIL-R ",TP,"EEFSU",SW)  =  ECAP("OIL-R ",TP,"EEFSU");
PE.FX("GAS-R ",TP,"EEFSU",SW)  =  ECAP("GAS-R ",TP,"EEFSU");

PE.FX("COAL-R",TP,NANB,SW)  =  ECAP("COAL-R",TP,NANB);
PE.FX("OIL-R ",TP,NANB,SW)  =  ECAP("OIL-R ",TP,NANB);
PE.FX("GAS-R ",TP,NANB,SW)  =  ECAP("GAS-R ",TP,NANB);

PN.UP(NT,PP,RG,SW)       =  NCAP(NT,PP,RG);
PN.FX(NT,TBASE,RG,SW)    =  NCAP(NT,TBASE,RG);

$include tables\LBD.%lbd%

GASNON.FX(TBASE,RG,SW)    = NCAP("GAS-1",TBASE,RG)
                          - HTRT("GAS-R",RG) * ECAP("GAS-R",TBASE,RG)
                          - HTRT("GAS-N",RG) * ECAP("GAS-N",TBASE,RG)
                          - GASX(TBASE,RG);

OILNON.FX(TBASE,RG,SW) = NCAP("OIL-1",TBASE,RG)
                          - HTRT("OIL-R",RG) * ECAP("OIL-R",TBASE,RG)
                          - OILX(TBASE,RG);

* The following data are found in GHGLIM.TAB and CASELIM.TAB.

EM.FX("co2","2000",sw)	=  	CARLIM("sw1","2000","world");
CLEV.FX("2000",rg,sw)	=  	CARLIM("sw1","2000",rg);
CLEV.UP("2010",rg,sw)	=	CARLIM("sw1","2010",rg);


DISPLAY CLEV.UP;

EM.UP("co2", tlast,sw)      =  TYGCL(SW);

DC.UP(rg,tp,sw)             =  DCLIM(tp,rg);

* The following are special limits on CRLX and ABATE activities.

CRLX.FX("2000",RG,SW)          =  0;

$include tables\ABATE.%abate%
$include tables\SINKS.%sinks%

* The bounds on net exports are found in TRADE.TAB

NTX.FX("OIL",TBASE,RG,SW)  =  OILX(TBASE,RG);
NTX.UP("OIL",PP,RG,SW)     =  OILX(PP,RG);
NTX.LO("OIL",PP,RG,SW)     =  - OILM(PP,RG);

NTX.FX("GAS",TBASE,RG,SW)  =  GASX(TBASE,RG);
NTX.UP("GAS",PP,RG,SW)     =  GASX(PP,RG);
NTX.LO("GAS",PP,RG,SW)     =  - GASM(PP,RG);

*NTX.FX("SYN",TBASE,RG,SW)  =  SYNX(TBASE,RG);
*NTX.UP("SYN",PP,RG,SW)     =  SYNX(PP,RG);
*NTX.LO("SYN",PP,RG,SW)     =  - SYNM(PP,RG);

NTX.FX("CRT",TBASE,RG,SW)  =  0;
NTX.UP("CRT",PP,RG,SW)     =    CARXL(PP,RG);
NTX.LO("CRT",PP,RG,SW)     =  - CARML(PP,RG);

* The data for exhaustible resources are found in NELE.TAB.

PRSV.FX(RG,X,TBASE,SW)      =  RSV(X,RG);
URSC.UP(RG,X,TBASE,SW)      =  RSC(X,RG);
RA.UP(RG,X, TBASE,SW)      =   RSC(X,RG)*RDF(X,RG);

* Except for NCAP, the following initial conditions are defined in CLIMATE.TAB
* and in GHGLIM.TAB.

EM.FX("co2","2000",sw) =  CARLIM("sw1","2000","world");

EM.FX("ch4","2000",sw) =  SUM(rg, NCAP("gas-1","2000",rg)*BCH4GAS("2000",rg))/1000;

EM.FX("n2o",tp,sw)        =  0;
EM.FX("slf",tp,sw)        =  0;
EM.FX("llf",tp,sw)        =  0;

TOTEM.FX("co2","2000",sw)  =  CARLIM("sw1","2000","world")
                              +       NONEM("co2","2000");

TOTEM.FX("ch4","2000",sw)
                       =  SUM(rg, NCAP("gas-1","2000",rg)*BCH4GAS("2000",rg))/1000
                        + sum(rg, bline("ch4","2000",rg))/gwp("ch4");

TOTEM.FX(ghg,"2000",sw) $ (ord(ghg) ge 3) =
                         sum(rg, bline(ghg,"2000",rg))/gwp(ghg);

CO2.FX(BOX,TBASE,SW)     =  CO2BASE(BOX);

S.FX(ghg,"2000",sw)      =  basestock(ghg);
SMINUS.FX(ghg,"2000",sw)
                         =  basestock(ghg) - eqstock(ghg);

S.UP("co2",pp,sw)        =  basestock("co2") * conlim(pp,sw)/conlim("2000",sw);
S.LO(ghg,pp,sw)          =  .5 * basestock(ghg);
SMINUS.LO(ghg,pp,sw)     =  .1 * (basestock(ghg) - eqstock(ghg));

PT.FX(tbase,sw)          =  rfconv("sw1")*rfbase;
PT.UP(pp,sw)             =  PTDLIM(pp,sw);

ATP.FX(tbase,sw)         =  0;
ATP.LO(pp,sw)            = .01;
ATP.UP(tp20,sw)          =  MIN (ATDLIM(tp20,sw) , .95*SMIN(rg, CATT(rg,sw)));

MODEL M5 /ALL/;