Linking Grib Data Files


Linking GRIB data files

The ungrib program will try to read GRIB files named GRIBFILE.AAA, GRIBFILE.AAB, …, GRIBFILE.ZZZ. In order to simplify the work of linking the GRIB files to these filenames, a shell script, link_grib.csh, is provided. The link_grib.csh script takes as a command-line argument and a list of the GRIB files to be linked. This script will also delete all previous links to data files before attempting to link in any new flies.

For example, if GFS GRIB data (with a prefix of 'gfs') were downloaded to the directory /mmmtmp/mm5rt/data/GFS, the files could be linked with link_grib.csh as in the following commands:

ls /mmmtmp/rt/data/GFS/*

-rw-r--r-- 1 24008620 Nov 1 08:25 gfs_060816_12_00
-rw-r--r-- 1 27106796 Nov 1 08:28 gfs_060816_12_06

./link_grib.csh /mmmtmp/rt/data/GFS/gfs_

     **Note: There is no need to put a '*' following the directory in the above command. The script will automatically grab all of the files beginning with the given prefix (gfs_060816_12).

After linking the GRIB files, a listing of the WPS directory should show the files linked as follows:

lrwxrwxrwx 1 39 Nov 1 10:35 GRIBFILE.AAA -> /mmmtmp/rt/data/GFS/gfs_060816_12_00
lrwxrwxrwx 1 39 Nov 1 10:35 GRIBFILE.AAB -> /mmmtmp/rt/data/GFS/gfs_060816_12_06




Do not point to a directory when linking your files. i.e.,

INCORRECT: link_grib.csh/mmmtmp/rt/data/GFS

CORRECT: link_grib.csh/mmmtmp/rt/data/GFS/gfs_06
CORRECT: link_grib.csh/mmmtmp/rt/data/GFS/gfs_060816_12