Last updated: January 2013
This table lists the GRIB2 meta data and associated grib_api keys for the Grid Definition Section of GRIB2 messages. The most important values of according Code Tables are also listed in the comments for a reference. Values which are fixed for the COSMO-Model are written on a light-blue background.
The first octets of the Grid Definition Section are general for all grids, but the rest of the section depends on the special grid used. There are templates for special grids and here we only list the template 3.1 for rotated latitude-longitude grids used in the COSMO-Model system.
Octets | Key Name | Comments | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1-4 | section3Length | Length of section in octets (nn) | ||||||||||||||||||||||||||||||
5 | numberOfSection | Number of section (3) | ||||||||||||||||||||||||||||||
6 | sourceOfGridDefinition | Source of grid definition according to Code Table 3.0:
|
||||||||||||||||||||||||||||||
7-10 | numberOfDataPoints | Number of data points in the grid (set implicitly by grib_api) | ||||||||||||||||||||||||||||||
11 | numberOfOctetsForNumberOfPoints | Number of octets for optional list of numbers, which may be used to document a quasi-regular
grid. If it is non-zero, it gives the number of octets used per item in the list.
For all other cases, such as regular grids, octets 11 and 12 are zero and no
list is appended to the Grid Definition Template.
|
||||||||||||||||||||||||||||||
12 | interpretationOfNumberOfPoints | Interpretation of list of numbers according to Code Table 3.11:
|
||||||||||||||||||||||||||||||
13-14 | gridDefinitionTemplateNumber | Grid definition template number according to Code Table 3.1:
|
||||||||||||||||||||||||||||||
15-xx | Grid definition template: The COSMO-Model uses the template 3.1 (rotated lat/lon): Octets 15-72 are the same as Grid definition template 3.0 Octets 73-84 are additional for rotated grids. |
|||||||||||||||||||||||||||||||
15 | shapeOfTheEarth | Shape of the earth, according to Code Table 3.2:
|
||||||||||||||||||||||||||||||
16 | scaleFactorOfRadiusOfSphericalEarth | Scale factor of radius of spherical earth; UNDEFINED for COSMO-Model |
||||||||||||||||||||||||||||||
17-20 | scaledValueOfRadiusOfSphericalEarth | Scaled value of radius of spherical earth; UNDEFINED for COSMO-Model |
||||||||||||||||||||||||||||||
21 | scaleFactorOfEarthMajorAxis | Scale factor of major axis of oblate spheroid earth; UNDEFINED for COSMO-Model |
||||||||||||||||||||||||||||||
22-25 | scaledValueOfEarthMajorAxis | Scaled value of major axis of oblate spheroid earth; UNDEFINED for COSMO-Model |
||||||||||||||||||||||||||||||
26 | scaleFactorOfEarthMinorAxis | Scale factor of minor axis of oblate spheroid earth; UNDEFINED for COSMO-Model |
||||||||||||||||||||||||||||||
27-30 | scaledValueOfEarthMinorAxis | Scaled value of minor axis of oblate spheroid earth; UNDEFINED for COSMO-Model |
||||||||||||||||||||||||||||||
31-34 | Ni | Number of points along a parallel (latitude) | ||||||||||||||||||||||||||||||
35-38 | Nj | Number of points along a meridian (longitude) | ||||||||||||||||||||||||||||||
39-42 | basicAngleOfTheInitialProductionDomain | Basic angle of the initial production domain. See also next item. UNDEFINED for COSMO-Model |
||||||||||||||||||||||||||||||
43-46 | subdivisionsOfBasicAngle | Subdivisions of basic angle used to define extreme longitudes and latitudes and direction increments. The basic angle of the initial production domain and the subdivisions of this basic angle are provided to manage cases where the recommended unit of 10-6 degrees is not applicable to describe the extreme longitudes and latitudes, and direction increments. UNDEFINED for COSMO-Model |
||||||||||||||||||||||||||||||
47-50 | latitudeOfFirstGridPoint (La1) | Latitude of first grid point | ||||||||||||||||||||||||||||||
51-54 | longitudeOfLastGridPoint (Lo1) | Longitude of first grid point | ||||||||||||||||||||||||||||||
55 | resolutionAndComponentFlags | Resolution and component flags, according to Flag Table 3.3:
GRIB1 could not code higher resolutions exactly (only up to 3 digits after the dot). Therefore the corresponding bits in the resolutionAndComponentFlags were set to 0. The u- and v-components of the horizontal wind are given relative to the defined rotated grid, therefore this bit (also bit 5 in GRIB1) is set to 1. GRIB2 now can code a higher precision for values in degrees, therefore bits 3 and 4 are now set to 1 and the increments are given. Bit 5 remains 1 also in GRIB2. The value of octet 55 in the COSMO-Model therefore is: 56 |
||||||||||||||||||||||||||||||
56-59 | latitudeOfLastGridPoint (La2) | Latitude of last grid point | ||||||||||||||||||||||||||||||
60-63 | longitudeOfLastGridPoint (Lo2) | Longitude of last grid point | ||||||||||||||||||||||||||||||
64-67 | iDirectionIncrement (Di) | i direction increment | ||||||||||||||||||||||||||||||
68-71 | jDirectionIncrement (Dj) | j direction increment | ||||||||||||||||||||||||||||||
72 | scanningMode(Dj) | Scanning mode flags according to Flag Table 3.4
The meaning of bits 1-3 are the same in GRIB1 and GRIB2, and bit 4 from GRIB2 will be set to 0 for the COSMO-Model grid. This means that the value of the scanningMode will be the same in GRIB1 and in GRIB2, namely 64 (which means that just bit 2 is set to 1). |
||||||||||||||||||||||||||||||
73-76 | latitudeOfSouthernPole | Latitude of the southern pole of the rotated grid | ||||||||||||||||||||||||||||||
77-80 | longitudeOfSouthernPole | Longitude of the southern pole of the rotated grid | ||||||||||||||||||||||||||||||
81-84 | angleOfRotation | Angle of the rotation | ||||||||||||||||||||||||||||||
85-nn | pl | List of number of points along each meridian or parallel (These octets are only present for quasi-regular grids) Not present in the COSMO-Model grid |