1300 Rate this article:
No rating

GRIB helper routines

Mark Alonzo
IDL's GRIB routines are a thin layer on top of the the C version of the ECMWF GRIB API.  The ECMWF routines exposed in IDL are fairly low-level, so they require a bit of programming to extract even simple information from a GRIB file. I have three routines, built on IDL's GRIB API, to help make it easier to get information from a GRIB edition 1 or 2 file:
  • GRIB_GET_RECORD: Gets a single record, selected by a one-based index, from a GRIB file.
  • GRIB_GET_PARAMETERNAMES: Gets the value of the parameterName key from each record in a GRIB file.
  • GRIB_GET_PARAMETER: Uses the two routines above to extract all the records in a GRIB file with a given parameterName.
You can download all three routines from the VIS Code Library. The routines can be called from the IDL command line or used as library routines in programs. See the IDLdoc documentation for these routines for examples of how to call them. I've tested these routines on a variety of GRIB1 and GRIB2 files from ECMWF, NCEP, NCAR, NOAA and AFWA. Hopefully, they'll work with any GRIB file, but if they don't, please let me know.
MOST RECENT

A Technical Dive into Creating Accurate Digital Terrain Models

6/27/2018

Live Webinar | July 25 Creating accurate digital terrain models (DTMs) is essential for modeling areas of... more »

The Science, and Art, of Hyperspectral Image Analysis

6/7/2018

Harris Geospatial Solutions – June 7, 2018 Automation is being touted as the wave of the future for... more »

SIGN UP & STAY INFORMED

Sign up to receive the latest news, events, technologies and special offers.

SIGN ME UP