Section 3 - Grid definition section

      Octet
      No.

      Contents
      1-4Length of section in octets (nn)
      5Number of section (3)
      6Source of grid definition (see Code Table 3.0 and Note 1)
      7-10Number of data points
      11Number of octets for optional list of numbers defining number of points (see Note 2)
      12Interpretation of list of numbers defining number of points (see Code Table 3.11)
      13-14Grid Definition Template Number (=N) (see Code Table 3.1)
      15-xxGrid Definition Template (see Template 3.N, where N is the Grid Definition Template Number given in octets 13-14)
      [xx+1]-nnOptional list of numbers defining number of points (see Notes 2, 3, and 4)

      Notes:

      (1) If octet 6 is not zero, octets 15-xx (15-nn if octet 11 is zero) may not be supplied. This should be documented with all bits set to 1 (missing value) in Grid Definition Template Number.

      (2) An optional list of numbers defining number of points is used to document a quasi-regular grid, where the number of points may vary from one row to another (row being defined as adjacent points in a coordinate line, so this is dependent from data layout). In such a case, octet 11 is non-zero, and gives the number of octets on which each number of points is encoded. For all other cases, such as regular grids, octets 11 and 12 are zero and no list is appended to the Grid Definition Template.

      (3) If a list of numbers defining number of points is present, it is appended at the end of Grid Definition Template (or directly after Grid Definition Template Number if template is missing), the length of the list is given by the grid definition. When the Grid Definition Template is present, the length is given according to bit 3 of scanning mode flag octet (length is Nj or Ny for flag value 0). List ordering is implied by data scanning.

      (4) Depending on code value given in octet 12, the list of numbers defining number of points corresponds either to the coordinate lines as given in the grid definition, or to a full circle.