README.txt: A document explaining how the interpolation routine is to be built and run. //*************************************************************************** There are two sets of programs in the archive code.tar. One set deals with ECMWF data, the other with ECHAM data. These are distinguished in an obvious way by the filenames: filename_ecmwf and filename_echam. Consider, for example, the ECMWF files. We have the following files: ecmwf_test_grib.dat order_ecmwf_data.c interpolation_ecmwf.c level_ECMWF.txt level_hirlam.txt To build the programs, proceed as follows: 1. Compile order_ecmwf_data.c: gcc -o order_ecmwf_data order_ecmwf_data.c -lm 2. Run the new executable order_ecmwf_data with the following command-line arguments: order_ecmwf_data ecmwf_test_grib.dat This produces an input file called input.dat 3. Compile interpolation_ecmwf.c: gcc -o interpolation_ecmwf interpolation_ecmwf.c -lm 4. Run the executable with the following command-line arguments: interpolation_ecmwf input.dat level_ECMWF.txt level_hirlam.txt This produces several output files, which are listed when the program is executed. There is also a file output.dat which prints the fields at each gridpoint. The order in which the user wants to view the output data can be changed by changing the order in which the output data are printed to this file. For some reason, I thought it was more natural to call the eta level closest to the surface the zeroth eta level, and the eta level the furthest from the surface the N-1 th eta level, opposite to the usual convention. So in order_ecmwf_data.c and order_echam_data.c, this labelling is imposed. //*************************************************************************** There are lots more files in the archive fortran_code.tar: The following are redundant header files: DECOMP.inc ESAT.inc ESCOM.inc The following are the original, unmodified routines from the HIRLAM model: ETAETA.f GRRDLOC_HINT.f INTERPOL_BD.f VINT.f The file interpol_bd_new.f is completely redundant. So, to run the interpolation scheme, do the following: 1. Compile order_data_old.c: gcc -o order_data order_data_old.c 2. Run order_data order_data ecmwf_test_grib.dat This produces a file input.dat which the C program interpolation_fortran.c will read. 3. Use the Makefile to compile and link the programs interpolation_fortran.c, grrdloc_hint_linked.f, etaeta_linked.f and VINT.f 4. Run the executable interp: interp input.dat level_ECMWF.txt level_hirlam.txt