You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note from linked conversation, this is probably due to how the Python NetCDF4 library handles assignment of scalar and single element, single dimension arrays. NetCDF classic data model treats attributes as 1D array of some type. NetCDF4 Python treats assignment of a single element array as the same as assignment of a scalar -- namely, it returns a scalar when interrogated for the value. As files with single flag_masks were not submitted very often and weren't under test, this case was not caught in my library.
Thanks for the answers Benjamin, yes the way NetCDF Python modules handle one element attribute is well-integrated but sometimes this is tricky to handle in our codes because in some cases you expect an array an get a scalar.
CF people, do you confirm that scalar flag_masks is allowed by the convention?
Hi,
This CF checker complains about a scalar flag_masks:
And their interpretation of CF seems to be that this is not allowed in CF, do you confirm?
See here Wrong error with flag_masks containing only one element ioos/compliance-checker#914
Thanks,
Julien
The text was updated successfully, but these errors were encountered: