
[CF-metadata] CF Section 5.3 "Reduced Horizontal Grid" and Section 8.2 "compression by gathering" somewhat inconsistent
 
CF Section 8.2 compression by gathering has this example:
dimensions:
  lat=73;
  lon=96;
  landpoint=2381;
  depth=4;
variables:
  int landpoint(landpoint);
    landpoint:compress="lat lon";
  float landsoilt(depth,landpoint);
    landsoilt:long_name="soil temperature";
    landsoilt:units="K";
  float depth(depth);
  float lat(lat);
  float lon(lon);
data:
  landpoint=363, 364, 365, ...;
However, CF Section 5.3 "Reduced Horizontal Grid" has a different example of Compression by Gathering:
"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."
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";
note:
  float lon(rgrid);
  float lat(rgrid);
instead of: 
  float lat(lat);
  float lon(lon);      
I believe CF is trying to deal with 2D lat lon coordinates here, whereas in 8.2, it had 1D coordinates. Actually i think the common case for reduced grids is 1D latitude coordinates and variable length 2D longitide coordinates (eg reduced Gaussian Grids).  So probably the example should be
dimensions:
  londim = 128 ;
  lat = 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(lat) ;
    lat:long_name = "latitude" ;
    lat:units = "degrees_north" ;
  int rgrid(rgrid);
    rgrid:compress = "lat londim";
Its also probably worth adding into 8.3 the use of coordinates:
  float data(depth, cindex);
    data:coordinates = "lon lat" ;
We havent really described the general use of this "compression by gathering" technique. Does anyone have any example files using this? Should we deprecate? generalize?
      
Received on Sat Oct 11 2008 - 15:45:41 BST
This archive was generated by hypermail 2.3.0
: Tue Sep 13 2022 - 23:02:40 BST