*----------- GLB2 display and exports data sets parameters etc ----------

$ontext
   Control over the displaying and exporting of All data, sets, parameters,
 initial values for variables etc., is achieved here.

   Display statements etc for parameters used to check the model calibration
 are in the womod*_parmcalib file. Display statements etc for checks
 on variable initialisation are in the womod*_varinit file.

   Control over display and export commands is from flow_cont("**"); these
 are set in the Excel worksheet 'controls'.

   In ALL cases the rule is
     IF value = 1 then implemented; IF value = 0 NOT implemented

      disp1      - Control on DISPLAY Statements for read in SETS and DATA
      disp2      - Control on parameter DISPLAY Statements
      disp3      - Control on variable initialisation DISPLAY Statements
      outGDXmodS - Control on GDX Unload for Model SAM
      outGDXdata - Control on GDX Unload for ALL data

$offtext

* -------------- 1. Display Statements ------------------------

 OPTION decimals = 6 ;

* Display all data and sets

* ------ 1a. Data and Set Display Statements

IF(flow_cont("disp1") = 1,

Display
* Data
 SAMG, FACTUSE,
* Elasticities from Excel
 ELASTM, ELASTE, ELASTRM, ELASTRE,
 ELASTX, ELASTVA, ELASTF, ELASTY,
* Elasticities from GTAP
 ELASTMG, ELASTRMG, ELASTVAG,
* derived from basic data
 IMPMARG,
* Parameters used to control model flow
 flow_cont, mod_cont, samscal, numerchk,
* Basic SAMG Sets
 sac,
 c, cagr, cnat, cfd, cind, ccns, cuti, cser, cagg,
 a, aagr, anat, afd, aind, acns, auti, aser, aagg,
 ff, f, fag, f2, f2ag, f3,
 l, ls, lu, k, lnd,
 tmr, ter, tff,
 h, g, i,
 owatpmarg,
 w, wagg, wgn,
 r, ragg, rgn, ref,
* unemployment
 uef,
* Sets, to, control, aspects, of, model, structure
 aqx, aqxn, aleon, rleon,
* cetn1, cetn2, chomo1, rhomo1, chomo2, rhomo2
* Declaring, mapping, sets
 map_w_tmr, map_tmr_w, map_w_ter, map_ter_w,
 map_c_w_marg, map_marg_w,
 mapr_w, mapw_r,
 map_f_tff, map_tff_f,
 map_aagg_a, map_cagg_c,
 map_wagg_w, map_ragg_r,
 map_fag_f, map_f2ag_f3,
* Declaring, other, sets
 SACN,
* Macro, SAMG, sets
 ss, ssn,
* Declaring, SETS, that, will, be, assigned, from, the, data
* Margin, commodities
 ct, ctn, ct2, ctn2,
* Export, commodities
 ce, cen, cer, cern,
* Import, commodities
 cm, cmn, cmr, cmrn, cmrs, cmrsn, cms, cmrl, cmrln, cml,
* Production
 acx, acxn, cx, cxn, cd, cdn, cintd, cintdn,
* Set, used, to, control, model, flow
 fcons, mcons

       ;

     )   ;

* ------ 1b. Model Parameter Display Statements

IF(flow_cont("disp2") = 1,

DISPLAY
* ######## NORMALISED PRICE BLOCK
 PE0, PER0, PD0, PM0, PMR0, PT0, PX0, PXC0, ER0,
* ######## TRADE BLOCK
* #### Exports Block
 PWE0, QER0, QE0, QD0,
 atr, gammar, rhoe,
 at, gamma, rhot,
* #### Imports Block
 PWM0, PWMFOB0, QMR0, QM0, QQ0, QT0,
 acr, deltar, rhom,
 ac, delta, rhoc, margcor,
* ######## COMMODITY PRICE BLOCK
 PQS0, PQD0,
* ######## NUMERAIRE PRICE BLOCK
 CPI0, PPI0, ERPI0, comtotsh, vddtotsh, tradtotsh,
* ######## PRODUCTION BLOCK
 PX0, PVA0, PINT0, QX0, QVA0, QINT0,
 WF0, WFDIST0, FD0, FS0, UNEMP0,
 QINTD0, QXC0,
 ADX0, ADXADJ0, DADX0, adxb, dabadx, adx01,
 ADVA0, ADVAADJ0, DADVA0, advab, dabadva, adva01,
 ADFD0, ADFDfADJ0, ADFDaADJ0, ADFDrADJ0, adfdb, dadfd,
 deltax, rhox, thetax,
 use, ioqx, ioqintqx, ioqvaqx,
 deltava, rhova, thetava,
 ioqint, ioqxcqx,
* ######## FACTOR BLOCK
 YF0, YFDIST0, deprec, hvash,
* ######## HOUSEHOLD BLOCK
 YH0, HEXP0, QCD0,
 comhav, sumelast, yhelast, beta, hexps, frisch, qcdconst,
* ######## GOVERNMENT BLOCK
* ## Government Taxes
 TEADJ0, TMADJ0, TMSADJ0, TSADJ0, TVADJ0, TXADJ0, TYFADJ0, TYHADJ0, TFADJ0,
 DTE0, DTM0, DTMS0, DTS0, DTV0, DTX0, DTYF0, DTYH0, DTF0,
 MTAX0, MSTAX0, ETAX0, VTAX0, FTAX0, FYTAX0, ITAX0, HTAX0, STAX0,
 TE0, TM0, TMS0, TS0, TV0, TX0, TYF0, TYH0, TF0, tmreal,
 teb, tmb, tmsb, tsb, tvb, txb, tyfb, tyhb, tfb,
 dabte, dabtm, dabtms, dabts, dabtv, dabtx, dabtyf, dabtyh, dabtf,
 te01, tm01, tms01, ts01, tv01, tx01, tyf01, tyh01, tf01,
* #### Government Income and Expenditure Block
 QGDADJ0, YG0, QGD0, EG0, qgdconst,
* ######## KAPITAL BLOCK
 SADJ0, IADJ0, DSHH0, INVEST0, QINVD0, TOTSAV0,
 shh0, dabshh, shh01, qinvdconst,
* ######## MARKET CLEARING BLOCK
 KAPGOV0, KAPWOR0, KAPREG0,
 VFDOMD0, INVESTSH0, VGDSH0,
 GDP0,
 WALRAS0, KAPWORSYS0, GLOBESLACK0

  ;

  )  ;

* ------ 1c. Initial Values for Variables Display Statements

IF(flow_cont("disp3") = 1,

 DISPLAY

* #### Exchange Rate Block
 ER.L,
* ######## TRADE BLOCK
* #### Exports Block
 PER.L, PE.L, PWE.L, PD.L, QER.L, QE.L, QD.L,
* #### Imports Block
 PMR.L, PM.L, PWM.L, PWMFOB.L, PT.L, QQ.L, QM.L, QMR.L,
* trade margin quantity
 QT.L,
* ######## COMMODITY PRICE BLOCK
 PQS.L, PQD.L, PXC.L,
* ######## NUMERAIRE PRICE BLOCK
 CPI.L, PPI.L, ERPI.L,
* ######## PRODUCTION BLOCK
 PX.L, PVA.L, PINT.L,
 ADX.L, ADXADJ.L, DADX.L,
 QX.L, QVA.L, QINT.L,
 ADVA.L, ADVAADJ.L, DADVA.L, ADFD.L,
 WF.L, WFDIST.L, FD.L, FS.L,
 QINTD.L, QXC.L,
* ######## FACTOR BLOCK
 YF.L, YFDIST.L,
* ######## HOUSEHOLD BLOCK
 YH.L, HEXP.L, QCD.L,
* ######## GOVERNMENT BLOCK
* ## Government Taxes
 MTAX.L, MSTAX.L, ETAX.L, STAX.L, VTAX.L, ITAX.L, FYTAX.L, HTAX.L, FTAX.L,
 TEADJ.L, TMADJ.L, TMSADJ.L, TSADJ.L, TVADJ.L, TXADJ.L, TYFADJ.L, TYHADJ.L, TFADJ.L,
 DTE.L, DTM.L, DTMS.L, DTS.L, DTV.L, DTX.L, DTYF.L, DTYH.L, DTF.L,
 TE.L, TM.L, TMS.L, TS.L, TV.L, TX.L, TYF.L, TYH.L, TF.L,
* ## Government Income
 YG.L,
* #### Government Expenditure Block
 QGD.L, QGDADJ.L, EG.L,
* ######## KAPITAL BLOCK
* ## Savings Block
 SHH.L, SADJ.L, DSHH.L, TOTSAV.L,
* ## Investment Block
 QINVD.L, INVEST.L, IADJ.L,
* ######## MARKET CLEARING BLOCK
* ##### Account Closure
 KAPGOV.L, KAPWOR.L, KAPREG.L,
* #### Absorption Closure
 VFDOMD.L, INVESTSH.L, VGDSH.L,
* #### Macroeconomic Aggregates
 GDP.L,
* ##### Slack
 WALRAS.L, KAPWORSYS.L, GLOBESLACK.L

  ;

   )  ;

* -------------- 2. GDX Export Statements ------------------------

* ------ 2a. Base Data Export Statements

IF(flow_cont("outGDXmodS") = 1,

Execute_unload 'mod_samg.gdx', SAMG ;

   ) ;

* ------ 2b. ALL Model Data Export Statements

IF(flow_cont("outGDXdata") = 1,

Execute_Unload  'moddata0.gdx',

*----- Data and Sets

* Data
 SAMG FACTUSE
* Elasticities from Excel
 ELASTM ELASTE ELASTRM ELASTRE
 ELASTX ELASTVA ELASTF ELASTY
* Elasticities from GTAP
 ELASTMG ELASTRMG ELASTVAG
* derived from basic data
 IMPMARG
* Parameters used to control model flow
 flow_cont mod_cont samscal numerchk
* Basic SAMG Sets
 sac
 c cagr cnat cfd cind ccns cuti cser cagg
 a aagr anat afd aind acns auti aser aagg
 ff f fag f2 f2ag f3
 l ls lu k lnd
 tmr ter tff
 h g i
 owatpmarg
 w wagg wgn
 r ragg rgn ref
* unemployment
 uef
* Sets to control aspects of model structure
 aqx aqxn aleon rleon
* cetn1 cetn2 chomo1 rhomo1 chomo2 rhomo2
* Declaring mapping sets
 map_w_tmr map_tmr_w map_w_ter map_ter_w
 map_c_w_marg map_marg_w
 mapr_w mapw_r
 map_f_tff map_tff_f
 map_aagg_a map_cagg_c
 map_wagg_w map_ragg_r
 map_fag_f map_f2ag_f3
* Declaring other sets
 SACN
* Macro SAMG sets
 ss ssn
* Declaring SETS that will be assigned from the data
* Margin commodities
 ct ctn ct2 ctn2
* Export commodities
 ce cen cer cern
* Import commodities
 cm cmn cmr cmrn cmrs cmrsn cms cmrl cmrln cml
* Production
 acx acxn cx cxn cd cdn cintd cintdn
* Set used to control model flow
 fcons mcons

*----- Model Parameters

* ######## NORMALISED PRICE BLOCK
 PE0 PER0 PD0 PM0 PMR0 PT0 PX0 PXC0 ER0
* ######## TRADE BLOCK
* #### Exports Block
 PWE0 QER0 QE0 QD0
 atr gammar rhoe
 at gamma rhot
* #### Imports Block
 PWM0 PWMFOB0 QMR0 QM0 QQ0 QT0
 acr deltar rhom
 ac delta rhoc margcor
* ######## COMMODITY PRICE BLOCK
 PQS0 PQD0
* ######## NUMERAIRE PRICE BLOCK
 CPI0 PPI0 ERPI0 comtotsh vddtotsh tradtotsh
* ######## PRODUCTION BLOCK
 PX0 PVA0 PINT0 QX0 QVA0 QINT0
 WF0 WFDIST0 FD0 FS0
 QINTD0 QXC0
 ADXADJ0 DADX0 ADVAADJ0 DADVA0 ADFD0 adx0 adxb dabadx adx01
 deltax rhox thetax
 use ioqx ioqintqx ioqvaqx
 adva0 advab dabadva adva01 deltava rhova thetava
 ioqint ioqxcqx
* ######## FACTOR BLOCK
 YF0 YFDIST0 deprec hvash
* ######## HOUSEHOLD BLOCK
 YH0 HEXP0 QCD0
 comhav sumelast yhelast beta hexps frisch qcdconst
* ######## GOVERNMENT BLOCK
* ## Government Taxes
 TEADJ0 TMADJ0 TMSADJ0 TSADJ0 TVADJ0 TXADJ0 TYFADJ0 TYHADJ0 TFADJ0
 DTE0 DTM0 DTMS0 DTS0 DTV0 DTX0 DTYF0 DTYH0 DTF0
 MTAX0 MSTAX0 ETAX0 VTAX0 FTAX0 FYTAX0 ITAX0 HTAX0 STAX0
 TE0 TM0 TMS0 TS0 TV0 TX0 TYF0 TYH0 TF0 tmreal
 teb tmb tmsb tsb tvb txb tyfb tyhb tfb
 dabte dabtm dabtms dabts dabtv dabtx dabtyf dabtyh dabtf
 te01 tm01 tms01 ts01 tv01 tx01 tyf01 tyh01 tf01
* #### Government Income and Expenditure Block
 QGDADJ0 YG0 QGD0 EG0 qgdconst
* ######## KAPITAL BLOCK
 SADJ0 IADJ0 DSHH0 INVEST0 QINVD0 TOTSAV0
 shh0 dabshh shh01 qinvdconst
* ######## MARKET CLEARING BLOCK
 KAPGOV0 KAPWOR0 KAPREG0
 VFDOMD0 INVESTSH0 VGDSH0
 GDP0
 WALRAS0 KAPWORSYS0 GLOBESLACK0

*----- Initial Values for Variables

* #### Exchange Rate Block
 ER.L
* ######## TRADE BLOCK
* #### Exports Block
 PER.L PE.L PWE.L PD.L QER.L QE.L QD.L
* #### Imports Block
 PMR.L PM.L PWM.L PWMFOB.L PT.L QQ.L QM.L QMR.L
* trade margin quantity
 QT.L
* ######## COMMODITY PRICE BLOCK
 PQS.L PQD.L PXC.L
* ######## NUMERAIRE PRICE BLOCK
 CPI.L PPI.L ERPI
* ######## PRODUCTION BLOCK
 PX.L PVA.L PINT.L
 ADX.L ADXADJ.L DADX.L
 QX.L QVA.L QINT.L
 ADVA.L ADVAADJ.L DADVA.L ADFD.L
 WF.L WFDIST.L FD.L FS.L
 QINTD.L QXC.L
* ######## FACTOR BLOCK
 YF.L YFDIST.L
* ######## HOUSEHOLD BLOCK
 YH.L HEXP.L QCD.L
* ######## GOVERNMENT BLOCK
* ## Government Taxes
 MTAX.L MSTAX.L ETAX.L STAX.L VTAX.L ITAX.L FYTAX.L HTAX.L FTAX.L
 TEADJ.L TMADJ.L TMSADJ.L TSADJ.L TVADJ.L TXADJ.L TYFADJ.L TYHADJ.L TFADJ.L
 DTE.L DTM.L DTMS.L DTS.L DTV.L DTX.L DTYF.L DTYH.L DTF.L
 TE.L TM.L TMS.L TS.L TV.L TX.L TYF.L TYH.L TF.L
* ## Government Income
 YG.L
* #### Government Expenditure Block
 QGD.L QGDADJ.L EG.L
* ######## KAPITAL BLOCK
* ## Savings Block
 SHH.L SADJ.L DSHH.L TOTSAV.L
* ## Investment Block
 QINVD.L INVEST.L IADJ.L
* ######## MARKET CLEARING BLOCK
* ##### Account Closure
 KAPGOV.L KAPWOR.L KAPREG.L
* #### Absorption Closure
 VFDOMD.L INVESTSH.L VGDSH.L
* #### Macroeconomic Aggregates
 GDP.L
* ##### Slack
 WALRAS.L KAPWORSYS.L GLOBESLACK.L

  ;

  )  ;


 OPTION decimals = 3 ;

*-------- end of glb2 display and exports data sets parameters etc -------
