Improve CF Conformance: 2.2 Data Types
jamesdoyle21 opened this issue · 2 comments
2.2 Data Types
Requirements:
-
CF attributes that take string values must be 1D character arrays or single atomic strings.
~~
Unclear, but I think this is what they are looking for:
[also mentioned below under section 6.1 Labels] -
If the variable is of type string it must have at most one dimension, which must match one of those of the data variable.
-
If the variable is of type char it must have one or two dimensions, where the trailing (CDL order) or sole dimension is for the maximum string length. If there are two dimensions, the leading dimension (CDL order) must match one of those of the data variable.
The following has been verified: -
The netCDF data types char, byte, short, int, float or real, and double are all acceptable. NetCDF4 allows string as data type, which is also acceptable
-
~~
Should be done for attributes only, not variables.
It looks like netCDF3/classic, which doesn't have advanced string types is cast to str
when interacting with a file. This means that this section:
CF attributes that take string values must be 1D character arrays or single atomic strings.
will pass by default.
Thus, I'm closing this issue as completed.