GRIB2 - DATA REPRESENTATION TEMPLATE 5.1

Matrix values at grid point - simple packing

Created 09/27/2005

Preliminary note:  This template was not validated at the time of publication and should be used with caution.  Please
report any use to WMO Secretariat (World Weather Watch - Basic Systems Department) to assist for validation.


Octet No. Contents
12-15 reference value (R) (IEEE 32-bit floating-point value)
16-17 Binary scale factor (E)
18-19 Decimal scale factor (D)
20 Number of bits used for each packed value for simple packing, or for each group reference value for complex packing or spatial differencing
 21 Type of original field values (see Code Table 5.1)
22
0, no matrix bit maps present; 1-matrix bit maps present
23-26
Number of data values encoded in Section 7
27-28
NR ― first dimension (rows) of each matrix
 29-30 NC ― second dimension (columns) of each matrix
31
First dimension coordinate value definition (see Code Table 5.2)
32
NC1 ― number of coefficients or values used  to specify first dimension coordinate function
33
Second dimension coordinate value definition (see Code Table 5.2)
34
NC2 ― number of coefficients or values used to specify second dimension coordinate function
35
First dimension physical significance (see Code Table 5.3)
36
Second dimension physical significance (see Code Table 5.3)
37-(36+NC1x4)
Coefficients to define first dimension coordinate values in functional form, or the explicit coordinate values (IEEE 32-bit floating-point value)
(37+NC1x4)-(36+4(NCI=NC2)
Coefficients to define second dimension coordinate values in functional form, or the explicit coordinate values (IEEE 32-bit floating-point value)

                             
Notes:

(1)   This form of representation enables a matrix of values to be depicted at each grid point; the two dimensions of the matrix
        may represent coordinates expressed in terms of two elemental parameters (e.g. direction and frequency for wave
        spectra).  The numeric values of these coordinates,beyond that of simple subscripts, can be given in a functional form, or
        as a collection of explicit numbers.

(2)   Some simple coordinate functional forms are tabulated in Code table 5.2.  Where a more complex coordinate function
        applies, the coordinate values shall be explicitly denoted by the inclusion of the actual set of values rather than the
        coefficients.   This shall be indicated by a code figure 0 from Code table 5.2; the number of explicit values coded shall be
        equal to the appropriate dimension of the matrix for which values are presented and they shall follow octet 36 in place of
        coefficients.

(3)   Matrix bit maps will be present only if indicated by octet 22.  If present, there shall be one bit map for each grid point
        with data values, as defined by the primary bit map in Section 6, each of length (NRxNC) bits: a bit set to 1 will 
        indicate a data element at the corresponding location within the matrix.  Bit maps shall be represented end-to-end,
        without regard for octet boundaries: the last bit map shall, if necessary, be followed by bits set to zero to fill any
        partially used octet.

(4)  Matrices restricted to scanning in the +i direction (left to right) and in the -j direction (top to bottom)


Back