The pregrid shell "pregrid.csh", is provided to run pregrid interactively on a workstation. It is found in the directory REGRID/pregrid. This shell is written in c-shell script language. To use this shell effectively, some familiarity with c-shell script language is recommended.sample code
To run the "pregrid.csh" script interactively:
Example: Your username is "smith", and you've got a directory "/users/smith/Data". In this directory, you have put the analysis files you expect REGRID to read. The "set DataDir" statement should look like:SRC3D: The source of 3D analyses. Select from one of the following:set DataDir = /users/smith/Data
ON84 : NCEP GDAS analyses, in ON84 format (before 1997 Mar).InFiles: Full pathname to the files with 3D Analyses.
NCEP : NCEP GDAS analyses, in GRIB format (beginning 1997 Mar).
GRIB : A catch-all for many other datasets in the GRIB format.Example: You've got meteorological analyses in GRIB format. The "set SRC3D" statement should look like:
set SRC3D = GRIB
Example: You've put GRIB files containing pressure-level analyses in the directory "/users/smith/Data". The archives have been separated by surface and upper-air, and by date. The files are called GRIBUPA.2400, GRIBUPA.2412, GRIBSFC.2400, and GRIBSFC.2412. The "set InFiles" statement might look like:The order of the listing of the files should not matter. Wild cards may be used, if you're careful. So the statement could look like:set InFiles = ( ${DataDir}/GRIBUPA.2400 ${DataDir/GRIBSFC.2400 \
${DataDir}/GRIBUPA.2412 ${DataDir/GRIBSFC.2412 )or even something like:set InFiles = ( ${DataDir}/GRIBUPA.24* ${DataDir}/GRIBSFC.24* )If you've opted not to set the DataDir script variable above, you could still set Infiles like this:set InFiles = ( ${DataDir}/GRIB*.24* )set InFiles = ( /users/smith/Data/GRIB*.24* )
SRCSST: Source
of the SST Analyses. Select from among the following:
ON84: NCEP GDAS analyses, in ON84 format.InSST: Full pathname to the files with SST analyses.
NCEP: NCEP GDAS analyses, in GRIB format.
NAVY: Low-resolution Navy archives (roughly 2.5x2.5 degrees)
GRIB: A catch-all for many other datasets in the GRIB format.
$SCR3D: Same type as the 3D analysesExample: Your SST fields come from the ON84-formatted NCEP GDAS analyses. In this case, your set SRCSST statement would look like:
set SRCSST = ON84
Example: Your SST fields come from the ON84-formatted NCEP GDAS analyses. You have put those analysis files in the directory /users/smith/Data, in a file called ON84.DATA. In this case, the "set InSST" statement might look like:SRCSNOW: Source of snow-cover analyses. The snow-cover field is optional in mm5, so you may choose not to retrieve snow-cover data.set InSST = ( ${DataDir}/ON84.DATA )
InSnow: Full pathname to the files with Snow-cover analyses.
SRCSOIL: Source of soil (i.e. ground) analyses (e.g., soil moisture, ground temperature, etc.)
InSoil: Full pathname to the files with soil-data analyses.
Next, there are a few script variables you need to set if you have set any of the above to GRIB. These script variables denote the tables which the GRIB pregridder is going to need in order to know which variables to extract from the GRIB files. See Vtables for details on what exactly is in the Vtable files.
VT3D: The
Vtables for the files specified in InFiles.
VTSST: The Vtables
for the files specified in InSST.
VTSNOW: The Vtables
for the files specified in InSnow.
VTSOIL: The Vtables
for the files specified in InSoil.
The starting date of the time period you want to process is set by START_YEAR, START_MONTH, START_DAY, and START_HOUR.
The starting date of the time period you want to process is set by END_YEAR, END_MONTH, END_DAY, and END_HOUR.
The time interval for which you want to process files is set by INTERVAL.
START_YEAR = 1987 # Year (YYYY)
START_MONTH = 08 # Month ( 01 - 12 )
START_DAY = 02 # Day ( 01 - 31 )
START_HOUR = 12 # Hour ( 00 - 23 )END_YEAR = 1987 # Year (Four digits)
END_MONTH = 08 # Month ( 01 - 12 )
END_DAY = 04 # Day ( 01 - 31 )
END_HOUR = 00 # Hour ( 00 - 23 )INTERVAL = 43200 # Time interval (seconds) to process.
# This is most sanely the same as the time interval for
# which the analyses were archived, but you can really
# set this to just about anything, and pregrid will
# interpolate in time and/or skip over time periods for
# your regridding pleasure.
In addition to the above namelist parameters, there are a few "hidden"
namelist parameters. They are "hidden" in that they are not included
in the default "pregrid.csh" file, but have default values set for them
in the program. If you need to change the default values, you can
add them to the namelist yourself:
DEBUG_PRINT: Default value is .FALSE. For additional printout, which may or may not be useful for diagnosing problems when pregrid fails, add the following line to the namelist:
DEBUG_PRINT = .TRUE.
ORDERED_BY_DATE: Default value is .TRUE. If your fields are not ordered in time in a GRIB-formatted dataset, add the following line to the namelist:ORDERED_BY_DATE = .FALSE.
Last modified: Tue Jun 6 13:54:34 MDT 2000