The GrADS data descriptor file defines a grid structure into which the data will fit -- it gives "shape" to the data by identifying its spatial dimensions, the number of time steps, and the number of variables.

If the data is in binary format, its structure has already been prescribed. If the data is in GRIB format, no consistent relationship exists between the data and the grid structure defined in the data descriptor file. Hence, the need for the gribmap utility which "maps" between the GRIB data and the GrADS data description.

As gribmap reads each field in the GRIB data file, the parameters for that field (e.g. variable name, vertical level, time) are compared to the information in the data descriptor file until a match is found. The process continues until all the GRIB elements have been "mapped" to their location within the GrADS grid structure.

The syntax for the gribmap command is as follows:

gribmap [options]

Command line options are:

-0 Ignores the forecast time when setting up a match, so that the base time is the valid time.
-b Valid time for averages is set to be the beginning of the period rather than the end. Default valid time is the end of the averaging period.
-big (GrADS version 2.0.a8) Required option if the GRIB1 or GRIB2 files are > 2 Gb. This option creates a bigger index file, which cannot be read by earlier versions of GrADS.
Ignores extra bytes (that are not part of the GRIB1 msg) at end of file. Some ECMWF GRIB files require this option because of blocking. Using the -E option ignores extra bytes in middle and/or end of GRIB file.
-f hr Matches only those grib records whose forecast time is hr hours. This is used to isolate a sequence of forecasts. For example, if you wanted to sample all the 120-hour forecasts from the MRF ensemble runs, you would use gribmap -f120.
-h num Skips over num bytes before starting the scan process.
-help Prints out the list of options
-i fname fname is the name of the data descriptor file. If not specified, gribmap will prompt the user.
-m Use base time from descriptor file instead of GRIB header. This option only works with GRIB1.
-min0 Ignores the minutes code.
-N Does NOT write out the index file.
-q Quiet mode -- suppresses all messages except for errors. Default is off.
-s num Skips over no more than num bytes between records. The default is 1000.
-t0 Matches only those grib records whose base time is the same as the initial time in the data descriptor file. This is used to pull out a forecast sequence (0, 12, 24, ... , 72 hours) starting a specific time.

Updates existing gribmap if adding data files are being added to templated data set. This option has been (temporarily) disabled in GrADS version 2.0.

-v Verbose mode -- detailed output makes it easier to verify what is being mapped. Default is off.