martin.juc...@stfc.ac.uk wrote:
Thanks for the responses.

Seth is right, I was looking for an alternative to having a gigantic "flag_meanings" attribute.
I have tried Seth's approach, but can’t get it past the cf-checker. There appears to be a character set 
restriction: I can get the first 547 flag_meaning strings accepted if I remove all the "-", 
"." and "," characters. I'm reasonably sure there are no control characters in the 
following strings which could be responsible for the error message that I get (ERROR (3.5): Invalid syntax 
for 'flag_meanings' attribute) when I increase the number of flag_meanings to 550. Could it be something to 
do with the string length (16472 characters)?

That seems to be an error in the cf-checker (?) I think attribute values should 
be any UTF-8 encoded Unicode characters (aka UTF-8 string).



I could try abbreviating the flag_meanings, but this would either be tedious 
work by hand or liable to create confusion if done automatically. If you could 
point me to some information about exactly what string format is acceptable, 
that would be very helpful.
To answer John's question: I'm currently using netcdf 3, in IDL -- I'm not sure what the options for upgrading to netcdf 4 are.

I mention netcdf-4 because it has enum types - which would be a nice solution 
for this class of problems, at least when you want to include the meanings of 
the flags in the file.
_______________________________________________
CF-metadata mailing list
CF-metadata@cgd.ucar.edu
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata

Reply via email to