General-purpose software packages such as GEMPACK provide tools which allow modellers to concentrate on the economic issues without needing to write their own software. However, it may occasionally be necessary to write programs to carry out some specialised tasks which cannot be carried out using the general-purpose tools provided. Even then, programmers with access to a Source-code version of GEMPACK can make use of the many Fortran routines supplied with GEMPACK.
You can download a document USEGPSUB.PDF which tells you how you can wite Fortran programs which use the subroutines supplied with Source-Code GEMPACK.
This paper USEGPSUB.PDF gives an introduction to using GEMPACK subroutines in writing your own Fortran programs. It gives a brief overview of some of the ideas behind the GEMPACK code such as error handling and to some of the routines available for opening, reading and writing Header Array files. By using standard GEMPACK routines, you can avoid knowing, in great detail, the structure of GEMPACK file types such as Header Array files.
We provide and describe in detail two typical programs which illustrate the techniques involved. The first program reads data from a non-GEMPACK text file, modifies it and then writes the modified data to a Header Array file. The second program reads some simulation results from Header Array files and calculates and writes arrays showing the differences between these results.
You can also download the example programs and associated files.
You can download in MODELPS.ZIP templates for main programs and subroutines.
See the document USEGPSUB.PDF for more details about the files you can download.
The paper (which has authors W. Jill Harrison, J. Mark Horridge and Ken Pearson) was first presented at the GTAP conference held in Lubeck Germany in June 2005.
The title of the paper is "Using GEMPACK Subroutines in your Fortran Programs".
Download the document USEGPSUB.PDF (230K)
Download the first examples program and associated files: Save as EXWHA1.ZIP (5K).
Download the second examples program and associated files: Save as EXRES1.ZIP (20K).