GRIB2 - DATA REPRESENTATION TEMPLATE 5.3

Grid point data - complex packing and spatial differencing

Created 10/05/2005

Note:  For most templates, details of the packing process are described in Regulation 92.9.4.


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
Group splitting method used (see Code Table 5.4)
23
Missing value management used (see Code Table 5.5)
24-27
Primary missing value substitute
28-31 Secondary missing value substitute
32-35 NG ― number of groups of data values into which field is split
36
Reference for group widths (see Note 12)
37
Number of bits used for the group widths (after the reference value in octet 36 has been removed)
38-41
Reference for group lengths (see Note 13)
42
Length increment for the group lengths (see Note 14)
43-46
True length of last group
47
Number of bits used for the scaled group lengths (after subtraction of the reference value given in octets 38-41 and division by the length increment given in octet 42)
48
Order of spatial difference (see Code Table 5.6)
49
Number of octets required in the data section to specify extra descriptors needed for spatial differencing (octets 6-ww in data template 7.3)


Notes:

(1) Spatial differencing is a pre-processing before group splitting at encoding time. It is intended to reduce the size of
sufficiently smooth fields, when combined with a splitting scheme as described in data representation template 5.2.
At order 1, an initial field of values f is replaced by a new field of values g, where g1 = f1, g2 = f2, ..., gn = fn - fn-1.
At order 2, the field of values g is itself replaced by a new field of values h, where h1 = f1, h2 = f2 , h3 = g3- g2, ...,
hn = gn - gn - 1. To keep values positive, the overall minimum of the resulting field (either gmin or hmin) is removed. At
decoding time, after bit string unpacking, the original scaled values are recovered by adding the overall minimum and
summing up recursively.

(2) For differencing of order n, the first n values in the array that are not missing are set to zero in the packed array. These
dummy values are not used in unpacking.

(3) See data template 7.3 and associated notes for complementary information.


Back