nmcgdas2tdf 3D_Grib_File 2D_SST_Grib_File
nmcgdas2tdf is a shell script that is used to convert National Meteorological Center (NMC) Global Data Assimilation System analysis/forecast files into TeraScan format for use with goessnd. The analysis/forecast files are in WMO's Gridded Binary (GRIB) format (Stackpole, 1994). Two files are required as input (i.e. 3D_Grib_File and 2D_SST_Grib_File). These can be obtained in near real-time via anonymous ftp from nic.fb4.noaa.gov in the directory pub/fnl.
Examples of the two files needed are gdas2.T12Z.PGrbF00 and gdas1.T00Z.sstgrb (See NOTES). The first file is a zero-hour forecast (i.e. analysis or nowcast; F00) for time 12Z (GMT). The "2" indicates a spatial resolution of 2.5 degrees and the "P" indicates the analysis is interpolated to a pressure vertical coordinate system. The "Grb" indicates the data are in GRIB format.
This type of GRIB file contains several three-dimensional fields and several horizontal two-dimensional fields that describe the basic state of the weather forecasting model at its initial time step. This initial state was determined from a spatial interpolation of the most recent weather observations to the current time (e.g. 12Z) using the model physics as constraints for the interpolation.
The second file is also a GRIB file which contains the sea surface temperature (SST). In this case, it pertains to time 00Z and the "1" indicates a spatial resolution of 1.0 degree. The only parts of the filenames 3D_Grib_File and 2D_SST_Grib_File that can differ from those given as examples are the time components (e.g. F00 or T12Z).
nmcgdas2tdf executes a combination of TeraScan functions along with a freeware program provided by NMC (see NOTES) to extract the necessary information from files such as these and write it to a TeraScan dataset that can be used by goessnd. The 3D_Grib_File contains numerous variables, however nmcgdas2tdf only converts those variables which are required by goessnd. These variables and their units are listed below:
Variable Units Dimensions/Description ------------------------------------------------------------------ temperature kelvin 3-D relative_humidity percent 3-D temperature_pressure mb 1-D array of pressure levels relative_humidity_pressure mb 1-D array of pressure levels sea_surface_temperature kelvin 2-D (bad values for land) surface_pressure Pa 2-D surface_temperature kelvin 2-D ~10-50m temperature surface_relative_humidity percent 2-D ~10-50m relative humidity
The output filename is determined by nmcgdas2tdf and has the following form: nmcgdas.yyddd.hhmm, where yy indicates the year, ddd indicates the julian day, hh indicates the hour (GMT), and mm indicates the minutes of the analysis/forecast. The year and julian day information are taken from the 3D_Grib_File. Earth location for output file is copied from $TSCANROOT/refdata/GDAS2MASTER.
% nmcgdas2tdf gdas2.T12Z.PGrbF00 gdas1.T00Z.sstgrb
$TSCANROOT/refdata/GDAS2MASTER
gvarin, goessnd, datename, impbin, impasc, assemble, copyxfm, editdim, addhist.
Stackpole, J. D., 1994: The WMO format for the storage of weather product information and the exchange of weather product messages in gridded binary form. Office Note 388. National Meteorological Center, National Oceanic and Atmospheric Administration. (see pub/doc directory on nic.fb4.noaa.gov anonymous ftp).
The two GRIB files needed can be obtained on a routine basis using the example script below (provided the ftp ls command prints out only the filenames and not the long form of the directory listings):
#!/bin/csh # ftp -in nic.fb4.noaa.gov >&.ftpget$$ << EOF user anonymous guest@host.edu cd pub/fnl ls -t quit EOF set newest = `grep gdas2.T .ftpget$$ | grep PGrbF00` echo Retrieving gdas1.T00Z.sstgrb and $newest[1] # ftp -in nic.fb4.noaa.gov << EOF user anonymous guest@host.edu binary cd pub/fnl get gdas1.T00Z.sstgrb get $newest[1] quit EOF /bin/rm .ftpget$$ # # exit
nmcgdas2tdf calls a freeware program supplied by NMC that reads and extracts data from the GRIB files. This program is written in C and requires an ANSI/ISO C compiler. The program source code, compiling directions and other documentation can be obtained via anonymous ftp from nic.fb4.noaa.gov in the directory pub/reanl/a/cdrom/PROGRAMS/WGRIB. Once compiled and linked, the program needs to renamed "readgrib" and put into the user's path.
Last Update: $Date: 1999/05/10 20:45:34 $