-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CF flag_values check #792
Comments
Maybe not a compliance checker issue since we don't have any control over how data is generated, but interesting nonetheless. |
EDITAfter a bit more investigation, I found this in the Lines:
You'll notice the list comprehension which creates a list of the attributes, and then the for-loop that assigns them to the recently-allocated Lines:
The attribute will thus be encoded as a Python |
It seems that there's a bit of a discrepancy testing for the type of a variable's
flag_values
when usingxarray
vsnetCDF4-python
. I can encode as anumpy
array with type|S1
:but when tested with the Compliance Checker, I get an error:
Looking at how
netCDF4-python
reads in this data type (since that API is used to load the NetCDF file being tested), it looks like it's being converted to a plain list:Additional investigation is needed into what the
|S1
type can be represented as, and maybe a workaround will be implemented.Pinging @benjwadams, you might find this interesting.
The text was updated successfully, but these errors were encountered: