This README file is for the supplementary files for Peters, J.C. "GTAP-E-Power: An Electricity-detailed Economy-wide Model" Journal of Global Economic Analysis. It will help with reproducability to cite the JGEA article when using any version of GTAP-E-Power.

This supplementary file contains EPower9_supp_files.zip. EPower9_supp_files.zip contains the programs to create your own regional and sectoral aggregations. 

EPower9.zip is the GTAP-E-Power version archive (region and sector aggregation, model, closure, parameters and experiments) that is used for the simulations in above paper. EPower9.zip can be accessed on the GTAP website with a subscription to the version 9 data base. https://www.gtap.agecon.purdue.edu/private/secured.asp?Sec_ID=1123.


***********************
EPower9.zip
***********************

EPower9.zip is the GTAP-E-Power version archive (region and sector aggregation, model, closure, parameters and experiments) that is used for the simulations in above paper. You will need a subscription to the GTAP Data Base, GEMPACK, and RunGTAP installed (See https://www.gtap.agecon.purdue.edu/products/rungtap/). To run these simulations follow the steps below:

1) Open RunGTAP 

2) Select File/Version Archive/Load ZIP and choose the EPower9.zip file

3) The parameters, closure, and shocks are saved as experiments



***********************
EPower9_supp_files.zip 
***********************

This .zip file contains the files necessary to convert a GTAP-Power aggregation (different region and sector mappings than EPower9.zip) into the GTAP-E-Power format. Several of these files require GTAPAgg2 (https://www.gtap.agecon.purdue.edu/products/packages.asp) and the GEMPACK software (https://www.gtap.agecon.purdue.edu/products/requirements.asp). The steps are detailed in Appendix C in the above paper as well as below:

1) Using GTAPAgg2 choose GTAP-Power and desired year as the source data.

2) Create an aggregation file. The aggregation file used in the version described in this article is located in the version archive as GTAPEPower.agg.

3) Create the new database and save in a new version folder within the GTAP directory (with other GTAP model versions). (e.g. GTAP\MyPower)

4) Extract the .zip file with the new database into a new folder titled "GTAPAggFile". (e.g. GTAP\MyPower\GTAPAggFile)

5) Move GTAPEHeaders.cmf, GTAPEHeaders.tab, and makeheaders.bat from the EPower9_supp_files folder (e.g. GTAP\ EPower9_supp_files into the new version folder (e.g. GTAP\MyPower)

6) Move default_e.prm and sets_e.har into the GTAPAggFile folder.

7) Run (double-click) on makeheaders.bat.

8) Updated GTAP-E-Power data files should appear in the new version folder (e.g. GTAP\MyPower): basedata.har, baseview.har, co2.har, default.prm, gsdvole.har,  and sets.har.

9) Note that the default.prm parameters must be checked and changed manually, because they are specific to the new aggregation.

10) Because the RunGTAP/GEMPACK solvers have difficulties with the large number of zeros in the GTAP-Power database, the zeros in the following basedata.har headers must be replaced by a small number (1E-10). 
EVFA, TVOM, VDEP, VDFA, VDFM, VDGA, VDGM, VDPA, VDPM, VFM, VIFA, VIFM, VIGA, VIGM, VIMS, VIPA, VIPM, VIWS, VTMFSD, VXMD, VXWD, DFNC, DGNC, DPNC, IFNC, IGNC, IPNC, CODP, COIP, CODG, COIG, CODF, and COIP.
To do this: highlight the header, right-click, select "Change values" then select "Replace zeros by small number", and replace zeros with 1E-10 and press "OK". Be sure to save after.

11) Copy all file extensions (.tab, .min, etc.) with the name "gtap", "decomp" and "gtapvew" from EPower9_supp_files folder to new version folder (e.g. GTAP\ EPower9_supp_files to GTAP\MyPower).

12) Copy the SaveSims folder from the EPower9_supp_files folder to new version folder.

13) Open RunGTAP.

14) Select the "Version" tab and select "New".

15) Click "Next" then create "New aggregation" and type in the name of the new folder (e.g. GTAP\MyPower). Click "Next", locate basedata.har, sets.har, and default.prm in that folder, then click "Next" then "Finish".

16) Don't worry! There will be an error. Select the "Version" tab and select "Modules".

17) Click on the empty box in the "Main model" row and "TAB file" column in the "Version-specific settings". Select "stored in version folder" then highlight "GTAP.TAB" and press "OK".

18) Click on the empty box in the "Welfare Decomp" row and "TAB file" column in the "Version-specific settings". Select "stored in version folder" then highlight "DECOMP.TAB" and press "OK".

19) Solve the model for a numeraire shock.

20) Check the solution.

21) To make any changes in the model you should modify the gtap.tab file in the version folder (not the main GTAP model!). Note: the gtap.tab file documents the modifications made to the GTAP-E model in order to introduce power substitution. The comments are meant to help the design of alternate representations of power substitution.