Build an index file for a set of input GRIB files.


grib_index_build [options] grib_file grib_file ...



Force. Force the execution not to fail on error.

-o output_index_file

Output is written to output_index_file. If an output index file is required and -o is not used, the output index is written to 'gribidx'

-k key1,key2,...

Specify a list of keys to index on. By default the input files are indexed on the MARS keys. For each key a string (key:s) or a double (key:d) or an integer (key:i) type can be requested.



-T T | B | M | A

Message type. T->GTS, B->BUFR, M->METAR (Experimental),A->Any (Experimental). The input file is interpreted according to the message type.


Multi-field support off. Turn off support for multiple fields in single GRIB message.


Do not compress index. By default the index is compressed to remove keys with only one value.

grib_index_build examples

  1. By default grib_index_build will index on the MARS keys.

    >  grib_index_build ../data/reduced*.grib1 ../data/regular*.grib1 ../data/reduced*.grib2

  2. To specify a custom list of keys to index on, use the -k option.

    >  grib_index_build -k paramId,dataDate ../data/reduced*.grib1 ../data/regular*.grib1 ../data/reduced*.grib2