⇐ ⇒

[CF-metadata] extended use of flag_values and flag_meanings

From: Jonathan Gregory <j.m.gregory>
Date: Fri, 11 Nov 2005 08:02:22 +0000

Dear all

Burkhardt Rockel asked whether it is possible to use flag_values and
flag_meanings (CF 3.5) for string-valued data variables. These two attributes
were introduced with ancillary data (CF 3.4) in mind e.g. data quality flags.
Burkhardt's suggestion would be to use them to encode a data variable. For
instance, we could encode this

  variables:
    char land_cover(lat,max_string_length)
      land_cover:standard_name="land_cover";
  data:
    land_cover="needleleaf_tree","needleleaf_tree","shrub","ice","ice", ...;

like this

  variables:
    byte land_cover(lat)
      land_cover:standard_name="land_cover";
      land_cover:flag_values=0, 1, 2;
      land_cover:flag_meanings="needleleaf_tree shrub ice";
  data:
    land_cover=0,0,1,2,2,...;

This doesn't require any new machinery, the file is no less self-describing,
it saves space and it might be more convenient for plotting. The string values
could be standardised but their numerical encoding would not have to be.
However this scheme requires a bit more work to get the meaning out of it.

Any views?

Cheers

Jonathan
Received on Fri Nov 11 2005 - 01:02:22 GMT

This archive was generated by hypermail 2.3.0 : Tue Sep 13 2022 - 23:02:40 BST

⇐ ⇒