# GRIB -- WMO General Regularly-distributed Information in Binary form

GDAL supports reading of GRIB1 and GRIB2 format raster data, with some degree of support for coordinate system, georeferencing and other metadata. GRIB format is commonly used for distribution of Meteorological information, and is propagated by the World Meteorological Organization.

The GDAL GRIB driver is based on a modified version of the degrib application which is written primarily by Arthur Taylor of NOAA NWS NDFD (MDL). The degrib application (and the GDAL GRIB driver) are built on the g2clib grib decoding library written primarily by John Huddleston of NOAA NWS NCEP.

There are several encoding schemes for raster data in GRIB format. Most common ones should be supported including PNG encoding. JPEG2000 encoded GRIB files will generally be supported if GDAL is also built with JPEG2000 support via one of the GDAL JPEG2000 drivers. The JasPer library generally provides the best jpeg2000 support for the GRIB driver.

GRIB files may a be represented in GDAL as having many bands, with some sets of bands representing a time sequence. GRIB bands are represented as Float64 (double precision floating point) regardless of the actual values. GRIB metadata is captured as per-band metadata and used to set band descriptions, similar to this:

      Description = 100000[Pa] ISBL="Isobaric surface"
        GRIB_UNIT=[gpm]
        GRIB_COMMENT=Geopotential height [gpm]
        GRIB_ELEMENT=HGT
        GRIB_SHORT_NAME=100000-ISBL
        GRIB_REF_TIME=  1201100400 sec UTC
        GRIB_VALID_TIME=  1201104000 sec UTC
        GRIB_FORECAST_SECONDS=3600 sec

GRIB2 files may also include an extract of the product definition template number (octet 8-9), and the product definition template values (octet 10+) as metadata like this:

        GRIB_PDS_PDTN=0
        GRIB_PDS_TEMPLATE_NUMBERS=3 5 2 0 105 0 0 0 1 0 0 0 1 100 0 0 1 134 160 255 0 0 0 0 0

## Configuration options

This paragraph lists the configuration options that can be set to alter the default behaviour of the GRIB driver.

- GRIB_NORMALIZE_UNITS : (GDAL >= 1.9.0) Can be set to NO to avoid gdal to normalize units to metric.

## Known issues:

The library that GDAL uses to read GRIB files is known to be not thread-safe, so you should avoid reading or writing several GRIB datasets at the same time from different threads.

## See Also:

- NOAA NWS NDFD "degrib" GRIB2 Decoder
- NOAA NWS NCEP g2clib grib decoding library
- WMS GRIB Format Documents