A "reduced" longitude-latitude grid is one in which the points
are arranged along constant latitude lines with the number of
points on a latitude line decreasing toward the poles.
Storing this type of gridded data in two-dimensional arrays
wastes space, and results in the presence of missing values
in the 2D coordinate variables. We recommend that this type
of gridded data be stored using the compression scheme
described in Section 8.2, “Compression by Gathering”.
Compression by gathering preserves structure by storing
a set of indices that allows an application to easily
scatter the compressed data back to two-dimensional
arrays. The compressed latitude and longitude auxiliary
coordinate variables are identified by
the coordinates
attribute.
Example 5.3. Reduced horizontal grid
dimensions: londim = 128 ; latdim = 64 ; rgrid = 6144 ; variables: float PS(rgrid) ; PS:long_name = "surface pressure" ; PS:units = "Pa" ; PS:coordinates = "lon lat" ; float lon(rgrid) ; lon:long_name = "longitude" ; lon:units = "degrees_east" ; float lat(rgrid) ; lat:long_name = "latitude" ; lat:units = "degrees_north" ; int rgrid(rgrid); rgrid:compress = "latdim londim";
PS(n)
is associated with the coordinate
values lon(n)
, lat(n)
.
Compressed grid index (n)
would be assigned
to 2D index (j,i)
(C index conventions) where
j = rgrid(n) / 128 i = rgrid(n) - 128*j
Notice that even if an application does not recognize
the compress
attribute, the grids
stored in this format can still be handled, by an application
that recognizes the coordinates
attribute.