⇐ ⇒

[CF-metadata] Inconsistent use of flag_values attribute.

From: Stark, John <john.stark>
Date: Thu, 19 Apr 2007 11:36:59 +0100

Dear all,

We have a NetCDF file that fails the CF compliance checker on the BADC
website:
http://titania.badc.rl.ac.uk/cgi-bin/cf-checker.pl
The failure concerns the use of 'flag_values' to describe a flag
variable called 'mask'.

> Checking variable: mask
> ------------------
> ERROR: Attribute flag_values of incorrect type
>

Following this up we ran into a problem. On the list of attributes in
CF-1.0 appendix A, flag_values is described as a string, but all the
examples I've seen, including that in CF-1.0, section 3.5, use a list
(vector) of valid numeric values (presumably matching the variable
type).

Part of the the ncdump for our file looks like this:
  byte mask(time, lat, lon) ;
    mask:long_name = "sea/land/lake/ice field composite mask" ;
    mask:_FillValue = -128b ;
    mask:flag_values = 1b, 2b, 4b, 8b ;
    mask:flag_meanings = "sea land lake ice" ;

I think flag_values should be numeric rather than a string. The CF-1.0
standard should be consistent either way...

Thanks,
John

-- 
John Stark   SST and Sea Ice Scientist
Met Office   FitzRoy Road   Exeter   EX1 3PB  United Kingdom
Tel: +44 (0)1392 885059   Fax: +44 (0)1392 885681
Received on Thu Apr 19 2007 - 04:36:59 BST

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

⇐ ⇒