Intermediate Format

Data are passed from the pregrid programs to regridder via intermediate files written in the format described herein.  Sample programs are provided to assist users in understanding the intermediate format.

1. General format description

Fields are written to the intermediate files as as two-dimensional horizontal (i.e., pressure-level or surface) slabs of data.  Each horizontal slab contains a single level of a single variable (i.e., 500 mb RH, surface T, etc).  Any number of horizontal slabs may be written to single file.  The slabs in a given file are not necessarily all from the same data source, or all on the same grid or map projection, but they should all represent the data valid at the same time.

2. File naming conventions

Each file contains data for a single time.  The file names consist of a prefix (ideally, but not necessarily, denoting the source of data), followed by a colon, followed by a time-stamp in the form YYYY-MM-DD_HH. Program regridder uses the file names as discussed below.

For example, analyses from the ON84-format data from NCEP for 3 January 1998 at 12 UTC might be written to a file called "ON84:1998-01-03_12"

3. File format

The files are written as unformatted FORTRAN records.  Four records are used for every horizontal slab.  The first record is a format version number, currently 3.  This is intended to facilitate backward compatibility as the intermediate format is adapted for additional grids.  The second record contains information common to all types of gridded data recognized by regridder.  The third record contains information specific to the particular grid type represented.  This record varies depending on the grid type.  The fourth record is the 2-dimensional slab of data.

Record 1:  IFV
Record 2:  HDATE, XFCST, FIELD, UNITS, DESC, XLVL, NX, NY, IPROJ
  if (IPROJ == 0) (Cylindrical equidistant projection)
        Record 3:  STARTLAT, STARTLON, DELTALAT, DELTALON
  else if (IPROJ == 1) (Mercator projection)
        Record 3:  STARTLAT,STARTLON, DX, DY, TRUELAT1
  else if (IPROJ == 3) (Lambert conformal projection)
        Record 3:  STARTLAT, STARTLON, DX, DY, XLONC, TRUELAT1, TRUELAT2
  else if (IPROJ == 5) (Polar-stereographic projection)
        Record 3:  STARTLAT, STARTLON, DX, DY, XLONC, TRUELAT1
  endif
Record 4:  SLAB

Where:
 
IFV integer The REGRID intermediate-format version number, currently 3.
HDATE character (LEN=24) The time, in format "YYYY-MM-DD_HH:mm:ss     " (only the first 19 characters are used)
XFCST real Forecast time (in hours) of the data in the slab
FIELD character (LEN=9) A field name.  Names with special meaning are described below.
UNITS character (LEN=25) Units describing the field in the slab.
DESC character (LEN=46) Text description of the field in the slab.
XLVL real Pressure-level (Pa) of the data.  200100 Pa indicates surface data; 201300 Pa indicates sea-level pressure
NX integer Slab dimension in the X direction
NY integer Slab dimension in the Y direction
IPROJ integer Flag denoting the projection.  Recognized values are:
     0:  Cylindrical Equidistant (Lat/lon) projection.
     1:  Mercator projection.
     3:  Lambert-conformal projection.
     5:  Polar-stereographic projection.
STARTLAT real Starting latitude (degrees north)
STARTLON real Starting longitude (degrees east)
DELTALAT real Latitude increment (degrees) for lat/lon grid
DELTALON real Longitude increment (degrees) for lat/lon grid
DX real Grid-spacing in x (km at TRUELAT1 (and TRUELAT2 as appropriate))
DY real Grid-spacing in y (km at TRUELAT1 (and TRUELAT2 as appropriate))
XLONC real Center longitude of the projection
TRUELAT1 real Extra latitude (degrees north) used for defining Mercator, Polar Stereographic, and Lambert conformal projections
TRUELAT2 real A second extra latitude (degrees north) used for defining Lambert conformal projection
SLAB real, dimension(NX,NY) Two-dimensional array of data.

4. Special field names

The intermediate-format variable FIELD indicates the physical variable in the slab. Certain values of FIELD are recognized by pregrid or regridder for specific treatment.   Slabs identified by an unrecognized values of FIELD are simply interpolated horizontally and written out by regridder. Fields marked "*" in the table below are the ones required for running regridder. At least one of the fields marked "*" is required. Recognized field names and their uses are:
T * Air temperature (K)
U * Grid-relative u-component of the horizontal wind (m s-1)
V * Grid-relative v-component of the horizontal wind (m s-1)
RH * Relative humidity (%, i.e., values generally range from 0 to 100)
HGT * Geopotential height (m)
PMSL * Sea-level pressure (Pa)
SST * Sea-surface Temperature (K). Either SST or SKINTEMP is required. Skin Temperature and sea-surface temperature are interpreted differently by the INTERPF program.
SKINTEMP * Skin Temperature (K). Either SST or SKINTEMP is required. Skin Temperature and sea-surface temperature are interpreted differently by the INTERPF program.
SOILT010 Ground temperature from 0 to 10 cm (K)
SOILT200 Ground temperature from 10 to 200 cm (K)
SOILT400 Ground temperature from 200 to 400 cm (K)
SOILM010 Soil moisture from 0 to 10 cm (K)
SOILM200 Soil moisture from 10 to 200 cm (K)
SEAICE Binary flag for the presence (1.0)/absence (0.0) of sea ice.  The value should be 0.0 or 1.0.  The grib.misc pregrid code makes a check on SEAICE.  If a value >  0.5, SEAICE is set to 1.0, otherwise, SEAICE is set to 0.0.
LANDSEA Binary flag for land(1.0)/water(0.0) masking
SOILHGT Terrain elevation (m) of the input data set (not of the MM5 model terrain)
WEASD Water equivalent of accumulated snow depth (kg m-2 [equivalent ot mm])
SNOWCOVR Binary flag for the presence (1.0) or absence (0.0) of snow on the ground

5. A note about sea-surface temperature and skin temperature

6. Sample Programs

Sample programs are provided to assist users in reading the intermediate format.  The programs are available in Fortran 77 and Fortran 90.  The F77 program uses hard-coded parameters to dimension read arrays.  The F90 program makes use of dynamically-allocatable arrays, so no hard-coded parameters are needed.
F77 program sample.f
F90 program sample.f90


Documentation HOME

Last modified: Thu Sep 28 10:15:23 MDT 2000