The programs here aggregate the GTAP-AGR parameters (134 regions,
Version 8.1) to a desired level of aggregation.

The programs (gtapagr-agg.bat, gtapagr-run.bat and
agraggpar.exe/axt/axs) and disaggregated GTAP_AGR parameters
(AGRPRM.har) should be copied into a FlexAgg2 folder and run in the
following way:

1. Create Aggregation as specified in mapping file my_agg using
FlexAgg2, i.e.:

..\: DATA-AGG my_agg

2. Then run the following command:

..\: GTAPAGR-AGG my_agg

Once that this is done, the file gsdgpar.har in the ./my_agg/
directory should be modified to reflect the changes required by
GTAP-AGR.

In addition to the parameter file (AGRPRM.har), the program
gtapagr-agg.bat uses gsddat.har and gsdset.har for reading data
volumes and set specifications needed for aggregation. It also needs
the aggcheck (.exe, .axt, .axs) to transform my_agg.txt in a header
file with mappings. It also needs my_agg/gsdgpar.har to copy the
modified headers. In other words, although the programs could work
after carefully getting this setup right, they are really designed as
an after-processing add-on to FlexAgg2.

NOTES:

1. Because AGRPRM.har is disaggregated to 134 regions it will only
 work with Version 8.1. of the database and its associated FlexAgg2;
 the user could use these same programs in other GTAP/FlexAgg2
 versions provided that AGRPRM.har is modified accordingly.

2. GTAP-AGR also use some non-standard sets. Because these are mostly
over products, which do not change across database versions, I found
more productive to hardwire them in the model tablo file written by
Keeney and Hertel <a
href="https://www.gtap.agecon.purdue.edu/access_staff/resources/res_display.asp?RecordID=1869">here</a>. I
also do the same with their regional groupings. Read the paper,
though.

Acknowledgments:

- GTAP-AGR is due to Keeney and Hertel, their model is here <a
href="https://www.gtap.agecon.purdue.edu/access_staff/resources/res_display.asp?RecordID=1869">here</a>.

- agraggpar.tab is essentially a modification of a piece by Ludena that
can be found <a
href="https://www.gtap.agecon.purdue.edu/access_staff/resources/res_display.asp?RecordID=2212">here</a>.

- To learn more about awesome FlexAgg2 click <a
  href="https://www.gtap.agecon.purdue.edu/databases/flexagg2.asp">here</a>.

The source code of this modifications is in the sub-folder /src_agr.

If you use these files, and find them helpful, send me a line.
