Last updated: February 2013
The national weather services are using coded messages for the international exchange of meteorological information comprising observational data and also for processed / simulated data. While observational data is coded using BUFR (Binary Universal Form for the Representation of meteorological data), the simulation data are coded in GRIB. The history of GRIB already spans some decades and there have been several changes and augmentations to the structure of the GRIB data representation, which are identified as different GRIB edition numbers. The current edition number is 2. However, GRIB edition 1 still remains in use. And GRIB 1 is yet used by the COSMO-Model. Note that the meaning of the abbreviation GRIB also changed with the edition numbers.
The GRIB code is specified in the Manual on Codes, which can be downloaded from the WMO pages. GRIB messages contain meta data, which describe the data under consideration, and the data itself. GRIB coded data consist of a continuous bit-stream made of a sequence of octets (or bytes: 1 octet = 8 bits). Thus, the representation of the data is independent of any particular machine representation. The octets of a GRIB message are grouped in sections. Most sections are used to specify the meta data, while one special section, the Data Section, contains the data in compressed form.
GRIB 1
In edition number 1, GRIB stands for gridded binary, i.e. processed data in the form of grid-point values expressed in binary form.
Composition of a GRIB1 message:
Section Number | Section Name | Section Contents |
---|---|---|
0 | Indicator Section | “GRIB”, length of message, GRIB edition number |
1 | Product Definition Section | Length of section, identification of the coded analysis or forecast |
2 | Grid Definition Section | Length of section, grid geometry, as necessary |
3 | Bit-map Section (optional) | Length of section, the bit per grid point, placed in suitable sequence, indicates omission (bit 0) or inclusion (bit 1) of data at respective points |
4 | Binary Data Section | Length of section and data values |
5 | End Section | "7777" |
GRIB 2
In edition number 2, GRIB stands for General Regularly-distributed Information in Binary.
Composition of a GRIB2 message:
Section Number | Section Name | Section Contents |
---|---|---|
0 | Indicator Section | “GRIB”, Discipline, GRIB Edition number, length of message |
1 | Identification Section | Length of section, section number, characteristics that apply to all processed data in the GRIB message |
2 | Local Use Section (optional) | Length of section, section number, additional items for local use by originating centres |
3 | Grid Definition Section | Length of section, section number, definition of grid surface and geometry of data values within the surface |
4 | Product Definition Section | Length of section, section number, description of the nature of the data |
5 | Data Representation Section | Length of section, section number, description of how the data values are represented |
6 | Bit-map Section | Length of section, section number, indication of presence or absence of data at each of the grid points, as applicable |
7 | Data Section | Length of section, section number, data values |
8 | End Section | "7777" |