GRIB2 - GRID TEMPLATE 5.3
Grid point data - complex packing and spatial differencing
Created 10/05/2005

Octet | Contents
--- | ---
12-47 | Same as data representation template 5.2
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.