$ontext
quarter-year version of CJL
Modifications:
(1) quarter-year version when time interval of one period becomes a parameter
(2) get rid of CO2 time travel in Forcing
(3) use explicit finite difference scheme in temperature in atmosphere
(4) cancel fixed saving rate (s.fx(t) = .22)
(5) cancel extra variables and equations and simplify
(6) cancel terminal condition of capital
(7) use nonzero terminal value function
(8) cancel the fixed emission control rate for the first period
(9) change sum(t$(ord(t)
***********************************
* get terminal value function
***********************************
set dim indices of dimensions /1*6/;
parameters
SVmin(dim) minimal state variables
SVmax(dim) maximal state variables
dz(dim) derivative of z over x
;
set d index /1*5/;
alias(d,d2,d3,d4,d5,d6);
parameter coefs(d,d2,d3,d4,d5,d6) complete Chebyshev coefficients;
execute_load ‘coefs_Climate_termValue’,SVmin, SVmax, dz, coefs;
*****************************************************************
VARIABLES
K(T) Capital stock trillions US dollars
MAT(T) Carbon concentration in atmosphere GtC
MU(T) Carbon concentration in shallow oceans Gtc
ML(T) Carbon concentration in lower oceans GtC
TATM(T) Temperature of atmosphere in degrees C
TOCEAN(T) Temperature of lower oceans degrees C
E(T) CO2-equivalent emissions GtC
C(T) Consumption trillions US dollars
MIU(T) Emission control rate GHGs
UTILITY;
POSITIVE VARIABLES K, MAT, MU, ML, TATM, TOCEAN, C, MIU, E;
free variable zPlus(dim) normalized tomorrow state variables;
zPlus.lo(dim) = -1;
zPlus.up(dim) = 1;
zPlus.l(dim) = 0;
free variable ChebyBasis(dim,d) Chebyshev polynomial basis;
variable SVend(dim) terminal state variables;
variable termUtil terminal utility function
*****************************************************************
EQUATIONS
KK0 Initial condition for capital
MMAT0 Starting atmospheric concentration
MMU0 Initial shallow ocean concentration
MML0 Initial lower ocean concentration
TATM0EQ Initial condition for atmospheric temperature
TOCEAN0EQ Initial condition for lower ocean temperature
KK(T) Capital balance equation
MMAT(T) Atmospheric concentration equation
MMU(T) Shallow ocean concentration
MML(T) Lower ocean concentration
TATMEQ(T) Temperature-climate equation for atmosphere
TOCEANEQ(T) Temperature-climate equation for lower oceans
EE(T) Emissions equation
CCACCA total cumulative carbon emissions GTX
UTIL Objective function
KendC Terminal capital
CAendC Terminal atmospheric carbon concentration
CSendC Terminal shallow ocean concentration
CDendC Terminal lower ocean concentration
TAendC Terminal atmospheric temperature
TLendC Terminal lower ocean temperature
normalizeSVend(dim) normalized state variables
ChebyBasisFunDeg0(dim) Chebyshev polynomial basis with degree 0
ChebyBasisFunDeg1(dim) Chebyshev polynomial basis with degree 1
recursiveCheby(dim,d) recursive formula for Chebyshev polynomial basis
TerminalUtilEQ terminal utility equation
;
** Equations of the model
KK0.. K(‘1’) =E= K0;
MMAT0.. MAT(‘1’) =E= MAT2000;
MMU0.. MU(‘1’) =E= MU2000;
MML0.. ML(‘1’) =E= ML2000;
TATM0EQ.. TATM(‘1’) =E= TATM0;
TOCEAN0EQ.. TOCEAN(‘1’) =E= TOCEAN0;
KK(T).. K(T+1) =L= (1-DK)**deltat *K(T)+deltat*( ( 1 – cost1(T)*(MIU(T)**EXPcost2) )*
(AL(T)*L(T)**(1-GAMA)*K(T)**GAMA) / (1+A1*TATM(T)+ A2*TATM(T)**A3) – C(T) );
MMAT(T+1).. MAT(T+1) =E= MAT(T)*bb11+MU(T)*bb21 + E(T);
MML(T+1).. ML(T+1) =E= ML(T)*bb33+bb23*MU(T);
MMU(T+1).. MU(T+1) =E= MAT(T)*bb12+MU(T)*bb22+ML(T)*bb32;
TATMEQ(T+1).. TATM(T+1) =E= TATM(t)+CC1*(FCO22X*(log(MAT(T)/596.4)/log(2))+FORCOTH(T) – LAM*TATM(t)-CC3*(TATM(t)-TOCEAN(t)));
TOCEANEQ(T+1).. TOCEAN(T+1) =E= TOCEAN(T)+CC4*(TATM(T)-TOCEAN(T));
EE(T).. E(T) =E= deltat*SIGMA(T)*(1-MIU(T))* (AL(T)*L(T)**(1-GAMA)*K(T)**GAMA) + ETREE(T);
CCACCA.. sum(T, E(T)) =L= FOSSLIM;
UTIL.. UTILITY =E= sum( T, (((C(T)/L(T))**(1-B_ELASMU)-1)/(1-B_ELASMU)) * (RR(T)*L(T)*deltat/scale1) ) + termUtil* (beta*sum(TLAST,RR(TLAST))*POPASYM/scale1) ;
KendC.. SVend(‘1’) =e= sum(TLAST, (1-DK)**deltat*K(TLAST)+deltat*( ( 1 – cost1(TLAST)*(MIU(TLAST)**EXPcost2) )*
(AL(TLAST)*L(TLAST)**(1-GAMA)*K(TLAST)**GAMA) / (1+A1*TATM(TLAST)+ A2*TATM(TLAST)**A3) – C(TLAST) ));
CAendC.. SVend(‘2’) =e= sum(TLAST, MAT(TLAST)*bb11+MU(TLAST)*bb21 + E(TLAST));
CSendC(T).. SVend(‘3’) =e= sum(TLAST, MAT(TLAST)*bb12+MU(TLAST)*bb22+ML(TLAST)*bb32);
CDendC(T).. SVend(‘4’) =e= sum(TLAST, ML(TLAST)*bb33+bb23*MU(TLAST));
TAendC(T).. SVend(‘5’) =e= sum(TLAST, TATM(TLAST)+CC1*( FCO22X*(log(MAT(TLAST)/596.4)/log(2))+FORCOTH(TLAST) – LAM*TATM(TLAST)-CC3*(TATM(TLAST)-TOCEAN(TLAST))));
TLendC(T).. SVend(‘6′) =e= sum(TLAST, TOCEAN(TLAST)+CC4*(TATM(TLAST)-TOCEAN(TLAST)));
normalizeSVend(dim).. zPlus(dim) =e= (SVend(dim)-SVmin(dim))*dz(dim)-1;
ChebyBasisFunDeg0(dim).. ChebyBasis(dim,’1′) =e= 1;
ChebyBasisFunDeg1(dim).. ChebyBasis(dim,’2’) =e= zPlus(dim);
recursiveCheby(dim,d)$(ord(d)>=2 and ord(d)