Instructions for Converting OGCM Data to Conference Format
The data files in the sample data directory were produced using the programs
posted here. Please feel free to use any method you desire to convert the data
but is important that all data be in netCDF format and on the same grids
and in the same units. If
your data is already in netCDF format these programs should ease the conversion
process. The programs require
Ferret,
netCDF,
and a Fortran compiler.
1. 30N-30S 2-D fields on 2.5 deg. x 2.5 deg. grid
There are four files available to facilitate this conversion:
-
File 1. Journal file for Ferret regridding and data dumping.
-
File 2. Script file for generating netCDF files.
-
File 3. NetCDF description file.
-
File 4. Fortran program for loading the netCDF file.
File 1 will allow users who have their data in netCDF format to use Ferret to
regrid the data on the 25 x 144 grid and dump the data to unformatted binary files. Files 2-4 will create a netCDF file and load the unformatted data into this netCDF file. The following changes will be needed to suit the inividual user. They are listed by file number:
-
1. The "netcdf_input_file_goes_here" file will have to be changed to the
user's file name. This .jnl file is setup to dump 240 months of data.The
user will have to modify this as required. Please note that this file is
for CCM3 model output and dumps more fields than the rquested number of
fields. In some cases multiple fields are used to calculate the requested
fields
-
2. The .csh file will have to be modified to point to the location of
the netCDF libraries and executables. This program generates the netCDF
file. Compiles the loading program and then runs the loading program.
-
3. The .cdl file should only require that the user change the description
entry near the bottom of the file to an appropriate entry for their data.
-
4. The fortran program will have to be updated to point to the proper
location of the netCDF include files. Search for "include" to find
the location to make the change. Please note that when the data is
read in various factors are applied to make the proper unit conversions.
Some values are calculated from multiple input files (such as
precipitation and relative humidity).
2. Zonal Sections
There are four files available to facilitate this conversion:
-
File 1. Journal file for Ferret regridding and data dumping.
-
File 2. Script file for generating netCDF files.
-
File 3. NetCDF description file.
-
File 4. Fortran program for loading the netCDF file.
The example files are set up to produce the 10W zonal section. Changes have
to be made to Files 1, 2 and 4 will have to be changed by replacing every
occurance of 10W with the appropriate longitude to produce the other sections.
File 3 will have to have the longitude changed in the grid description. The
longitude will have to be converted to degrees east of the prime meridian when
updating this file.
File 1 will allow users who have their data in netCDF format to use Ferret to
regrid the zonal sections and dump the data to unformatted binary files. Files 2-4 will create a netCDF file and load the unformatted data into this netCDF file. The following changes will be needed to suit the inividual user. They are listed by file number:
-
1. The "netcdf_input_file_goes_here" file will have to be changed to the
user's file name. This .jnl file is setup to dump 240 months of data.
This .jnl file will have to be run once for every zonal section
-
2. The .csh file will have to be modified to point to the location of
the netCDF libraries and executables. This program generates the netCDF
file. Compiles the loading program and then runs the loading program.
-
3. The .cdl file should only require that the user change the description
entry near the bottom of the file to an appropriate entry for their data.
-
4. The fortran program will have to be updated to point to the proper
location of the netCDF include files. Search for "include" to find
the location to make the change. Please note that when the data is
read in various factors can be applied to make the proper unit
conversions. The value of "nt" will have to
be changed to allow for the number of months in the user's data. The
program will compute the climatology from the monthly data.