Re: GRIB Code (GRIdded Binary) [message #5418] |
Thu, 21 December 1995 00:00 |
Hermann Mannstein
Messages: 22 Registered: September 1995
|
Junior Member |
|
|
Liam Gumley (gumley@modsgi.ssec.wisc.edu) asked me to post the following:
I just went through the exercise of decoding some NMC data encoded
in GRIB. I don't know of any way to import GRIB data directly into IDL.
However, FORTRAN code is available which will decode GRIB files into
unformatted form that can be read by IDL.
Look in ftp://nic.fb4.noaa.gov/pub/info
You will find machine specific versions of a GRIB unpacker called unpkgrb1.f,
along with supporting subroutines. Download the version of unpkgrb1.f that is
suitable for your system (I used the SGI version) and follow the README
directions for compilation. You should then be able to unpack any GRIB format
file. Look at the comments in unpkgrb1.f to see how to inventory and dump the
contents of a GRIB file. The output file will be form='unformatted', which
can be read in IDL by using the F77_UNFORMATTED keyword to the OPENR statement.
For an example of a GRIB file that unpkgrb1.f will handle, try downloading
ftp://nic.fb4.noaa.gov/pub/fnl/gdas1.T00Z.PGrbF00
which is the 1x1 degree resolution Global Data Assimilation System output.
For a detailed description of the GRIB format, consult
ftp://nic.fb4.noaa.gov/pub/nws/nmc/docs/gribguide
which has text and postscript versions of the GRIB user's guide. It contains
useful information on the data types, reporting levels, and units of parameters
contained in GRIB files.
I hope this helps.
Cheers,
Liam.
PS - could you post this to the IDL newsgroup - my news server is not
accepting posts at this time.
|
|
|