-
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
Single valued flag_values
causes an Exception
#922
Comments
Possibly related :
|
I can probably propose a fix, but someone else may be better placed. |
Yes, this is worth fixing. NetCDF's data model treats attributes as an array of a certain type. NetCDF4-Python will take a single element attribute and cast it to scalar. |
benjwadams
added a commit
to benjwadams/compliance-checker
that referenced
this issue
Apr 29, 2022
Fixes single-valued/scalar flag_values test cases, including an elementwise comparison against flag_masks. Fixes ioos#922.
#924 fixes |
ocefpaf
pushed a commit
to ocefpaf/compliance-checker
that referenced
this issue
Apr 14, 2023
Fixes single-valued/scalar flag_values test cases, including an elementwise comparison against flag_masks. Fixes ioos#922.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version of compliance checker running:
5.0.2.dev90+gcad1a7c
https://github.com/ioos/compliance-checker/tree/cad1a7c9900459fd33a403e58d79868a54d907b7
Describe the checker this affects:
CF
Attach a minimal CDL or NetCDF file which is able to reproduce the issue
To Reproduce:
Describe the issue below:
The error occurs trying to iterate over 'flag_values', but the code requires also the presence of a 'flag_meanings' to hit the error.
The CF validity of the example is, I think, questionable : Is a single flag value/meaning acceptable or not?
(update : on this, see #914 (comment) and #914 (comment) )
Having said that, I did have a real file from another person which contained this.
Arguably, the checker code needs to be more robust.
The text was updated successfully, but these errors were encountered: