Updates to the GRIB helper routines
I had time last week to revisit and revise my GRIB helper routines
. I learned about accessing records that have multiple fields, so I added a new keyword, MULTI_SUPPORT, to GRIB_GET_RECORD and GRIB_GET_PARAMETERNAMES. I also added simple error handling to the routines.
I included a new routine, GRIB_INVENTORY, that’s based on the invaluable wgrib
tools. I use typical GRIB keys to summarize the records in a file and fill in information when it’s not present. I don’t do any external table lookups; I use only information from the file. The output from GRIB_INVENTORY is a string array. For display, it feeds nicely into the ancient but serviceable XDISPLAYFILE; e.g.,
IDL> f = '/path/to/grib/file'
IDL> s = grib_inventory(f)
IDL> xdisplayfile, text=s
Here’s a screenshot from the Linux side of my laptop, viewing the inventory of an NCEP HiResWindow file similar to what I used in an earlier post
Please grab the updated set of files
from the VIS code library
. I’ve tested these routines on a variety of GRIB1/2 files & they seem to work. Please let me know if you find a GRIB file on which they fail.