This document describes an installation procedure of the GTAP5inGAMS package (prerelease#3). There are two versions of the GTAP datasets in the package: the full versions (the file gtap001.zip for the GTAP5inGAMS and the file aspen5.zip for the GTAP5-EG) and the aggregated versions (the file gtap5_small.zip for the GTAP5inGAMS and the file aspen5_small.zip for the GTAP5-EG). The full versions of the datasets have a restricted distribution. In order to use the full versions, a modeller needs to obtain the standard GTAP5 data file gsddat.har. The instructions for obtaining the GTAP data can be found at the GTAP Homepage . For testing purposes, aggregated versions of the GTAP5inGAMS and GTAP5-EG datasets are provided with the GTAP5inGAMS package. The GTAP5inGAMS package with the aggregated datasets can be downloaded here (free of charge). A modeller can test the aggregated datasets by running illustrative models. The modeller can change the models to suit his specific purpose because he has a full access to the code of the build routines and the models.
In order to use the GTAP5inGAMS package, you need to have the following GAMS system components:
The GAMS5inGAMS package is distributed in a zip archive (a file gtap5gams.zip). You can download it from http://debreu.colorado.edu/gtap5/gtap5gams.zip. The archive has the directory structure presented below.
|BUILD||build||energy.bat||Batch file to build the GTAP-EG dataset|
|dataset||build.bat||Batch file to build the GTAPinGAMS dataset|
|chkdata.bat||Check benchmark data|
|chkdata.gms||Check benchmark data|
|gtapaggr.gms||Aggregation GAMS file|
|gtapsets.gms||Make sets for aggregation|
|ieo.dat||IEO Projections Data|
|impose.bat||New dataset creation|
|impose.gms||New dataset creation|
|relabel.gms||Relabel to GAMS format|
|seehar.exe||Read HAR-file utility|
|DATA||initial and||energy.dat||Aggregated Energy Data|
|resulting||aspen5_small.zip||13x8 GTAP-EG dataset|
|data||gtap5_small.zip||10x10 GTAPinGAMS dataset|
|(gsddat.har)||GTAP Data (not included)|
|(aspen5.zip)||Created after running ASPEN.BAT|
|(gtap001.zip)||Created after running BUILD.BAT|
|DEFINES||stores||aspen5.map||Full GTAP-EG mapping|
|.set, .map, and .def||aspen5.set||Full GTAP-EG sets|
|files||aspen5_small.map||13x8 GTAP-EG mapping|
|aspen5_small.set||13x8 GTAP-EG sets|
|gtap5_small.map||10x10 GTAPinGAMS sets|
|gtap5_small.set||10x10 GTAPinGAMS sets|
|notax.def||New tax rates definitions|
|gams2har.gms||Move to HAR format|
|gams2prm.gms||Move to GAMS parameter|
|gams2tbl.gms||Move to table|
|gams2txt.gms||Move to text file|
|har2gams.gms||Move from HAR format|
|mrtdata.gms||GTAP parameters calculation|
|MODELS||Illustrative||gtap-eg.gms||The GTAP-EG Model|
|models||runall.bat||Run all GTAPinGAMS Models|
|mrttest.gms||Test all GTAPinGAMS Models|
|cnstest.gms||Test CNS GTAPinGAMS Model|
|mcptest.gms||Test MCP GTAPinGAMS Model|
|mgetest.gms||Test MPSGE GTAPinGAMS Model|
|nlptest.gms||Test NLP GTAPinGAMS Model|
|mrtcns.gms||CNS GTAPinGAMS Model|
|mrtmcp.gms||MCP GTAPinGAMS Model|
|mrtmge.gms||MPSGE GTAPinGAMS Model|
|mrtnlp.gms||NLP GTAPinGAMS Model|
To install the GTAP5inGAMS package:
To create the full version of the GTAP5inGAMS dataset:
To create the full version of the GTAP5-EG dataset:
The GTAP5inGAMS dataset is built on the standard GTAP5 database, which is not distributed freely. In order to construct the full GTAP datasets, a user needs to contact GTAP to obtain the GTAP5 dataset (the file gsddat.har).
The file gsddat.har should be placed into the DATA subdirectory of the GTAP5inGAMS package. To create the full version of the GTAP5inGAMS, a user needs to run build.bat file. For this, in MS-DOS prompt (make sure that you are connected to a proper directory) type build and press Enter. Run time on Pentium 500 is about 25 minutes (Make sure that GAMS is included in the PATH variable of your computer's MS-DOS. To check it, in MS-DOS prompt type path and press Enter).
The file build.bat is intended to:
The GTAP5-EG dataset is built on the standard GTAP5 database and calibrated to energy quantity and price data. In order to construct the full GTAP5-EG dataset, a user needs to run energy.bat file. For this, In MS-DOS prompt, type energy and press Enter. Run time on Pentium 500 is about 3 minutes. If the full version of the GTAP5inGAMS dataset has not been created yet, then the BUILD routine (described above) will be automatically called.
The file energy.bat is intended to:
Users can edit energy.bat to suit their specific applications. In particular, a pause option can be uncommented for every step to see all the stages of the dataset creation (To uncomment a pause command, delete a :(column) sign, i.e. change a line from :pause to pause.). The original build routine has a pause in one place only - before the aggregation and running the illustrative model. At this point, in MS-DOS window you'll see a message:
Aggregate to 13x8, include energy projections and create aspen_small.zip Will aggregate to aspen_small.zip: Press any key to continue . . .
If you press any key, then in addition to the full dataset an aggregated dataset will be created (a new file aspen5_small.zip will replace an old one) and an illustrative model will run on an aggregated data. If you press ``Ctrl-C'', then the following message appears.
Terminate batch job (y/n)?
If you terminate the batch job at this time (by pressing ``y'' and then ``Enter''), energy.bat will stop and only the full version of the GTAP5-EG dataset will be created and placed into DATA subdirectory under the name aspen5.zip.
In the process of building the dataset, several echo files are placed in the BUILD subdirectory:
The GTAP5inGAMS package contains the aggregated versions of the GTAP5inGAMS dataset and the GTAP5-EG dataset. They are provided for testing purposes.
A user can check the installation by running the models on the aggregated GTAP5inGAMS dataset (file gtap5_small.zip), which is located in the DATA subdirectory and ready to use. The gtap5_small.zip archive contains the data file gtap5_small.gms, and associated SET and MAP files. The aggregated GTAPinGAMS dataset has 10 sectors, 10 regions, and 5 factors of production. Aggregate regions in the model include the US, Japan, the EU and China, Other OECD, Former Soviet Union, Central European Associates, Other Asia, Mexico plus OPEC and Rest of World. Commodities in the dataset include the investment aggregate, five energy goods, metals-related industry, other energy-intensive industries, other manufactures and services. For more information, read the GTAP5inGAMS description.
The gtap5gams.zip archive also contains an aggregated version of the GTAP5-EG dataset. It is located in DATA subdirectory and named aspen5_small.zip. The archive contains the data file aspen5_small.gms, and associated SET and MAP files. The aggregated dataset has 13 regions, 8 goods, and two primary factors. The identifiers for the aggregated GTAP5-EG dataset are contained in the SET file. For more information, read the GTAP5inGAMS description.
Once you have built the initial GTAP5inGAMS or GTAP5-EG dataset, you can begin to think about a particular application and which aggregations of the original GTAP data would be appropriate for studying those issues. Typically it is useful to create two aggregations for any new model, one with a minimal number of regions and commodities and another with a larger number of dimensions. The small aggregation can then be used for model development.
The gtapaggr.bat program is used to aggregate the GTAP5inGAMS and the GTAP5-EG datasets. A command line argument defines the name of the target aggregation. You only need to provide the batch file with the target because the target's mapping file defines the source. Before running gtapaggr.bat, you must create two files, one defining the sets of commodities, regions and primary factors in the target dataset, and another defining the name of the source dataset and a correspondence between elements of the source and target. The aggregation routine produces a brief report of GDP and trade shares in the new dataset. The SET and MAP files for a new dataset are GAMS-readable files located in the DEFINES subdirectory. For more information, click here.
Back to GTAP5inGAMS Homepage
Maintained by Sergey Paltsev
Last Updated 06/12/01