The BADC have adapted the GRIBEX sample routines to provide some quick-look facilities for GRIB files. These routines are available on login.badc.rl.ac.uk, the BADC server. The routines can be used to list the record header information, giving information on the parameters, levels, dates within the file, and/or decode and list the data itself in ASCII format. Files stored on the BADC contain many GRIB records and decoding them using any of the following routines often results in large amounts of output. It is a good idea to pipe the output into the more command or redirect the output to a different file. The utilities are provided mainly for a quick-look facility. The decoded data output from the utilities takes up more disk space than the GRIB files and it is suggested that to use the GRIB data it is more efficient to download the GRIB files to your local machine rather than decoded text versions.
grib2brief file | moreTo get very brief output pipe the output of grib2brief through grep.
grib2brief file | grep "Section 0" | wc -lgives the number of GRIB records in the file.
grib2brief file | grep "Parameter" | sort | uniqlists the parameters present in the file.
griblevel -l level file_in > file_outto extract level level or
gribparameter -p parameter file_in > file_outto extract parameter parameter. At present griblevel and gribparameter will only extract one level or parameter at a time.
The BADC also provides a the CONVSH utility which is a command-line equivalent of XCONV. Scripts can be written for CONVSH to batch process data files. Both packages can are available via download for a number of different platforms. The BADC has developed the subset.tcl command line utility to allow subsetting, batch processing and conversion of GRIB files.
If you have any problems with the GRIB decoding utilities please contact BADC Support.