Using the GrADS/GRIB interface to read GRIB data

A brief introduction to the GrADS/GRIB interface.


As part of the  GrADS software package an interface to the GRIB binary data format was created. This is now used by both GrADS and CDAT to open GRIB data.

Note that neither GrADS or CDAT will read irregular gridded data via the GrADS/GRIB interface unless it is converted first to a regular rectilinear grid.

What is the GrADS/GRIB format?

GrADS/GRIB is basically a set of three files that are required in order to read a data file:

  • The GRIB data file itself (*.grb, *.grib).
  • A GrADS control file (*.ctl).
  • A Gribmap file (or index file; *.gmp or *.idx).

How do I create these files?

Assuming you already have a GRIB data file you require two pieces of software to create the other required files.

The  GrADS control file can be written using the utility freely available for many computing platforms). The utility can be downloaded from the pages. Once you have downloaded it you should be able to run the utility at the command line (on a Unix/Linux operating system):

> filename.grb > filename.ctl

This will have generated the control file  filename.ctl.

The  Gribmap file can be generated using the gribmap (or gribscan) utility which comes freely available as part of the GrADS package. See our GrADS page for further information on how to get GrADS. Once installed you should be able to run the gribmap utility at the command line:

> gribmap -e -i filename.ctl

This will have generated the gribmap file  filename.grb.idx.

How do I open the file?

Now you have all three files you should point your application at the control file. In GrADS you would use the command:

ga-> open filename.ctl

In CDAT you would use the command:

ga-> open filename.ctl

Still need help? Contact Us Contact Us