-
Notifications
You must be signed in to change notification settings - Fork 300
test_scalar_cube_load #2861
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
test_scalar_cube_load #2861
Conversation
|
Thanks @marqh |
29a5df5 to
d494ebc
Compare
| continue | ||
| # Restrict to one-dimensional with name as dimension OR zero-dimensional scalar | ||
| if not ((nc_var.ndim == 1 and nc_var_name in nc_var.dimensions) or (nc_var.ndim == 0)): | ||
| # Restrict to one-dimensional with name as dimension |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A zero dimensional scalar variable can never be a netcdf coordinate variable. The definitions within the CF Conventions and the netCDF user guide are explicit on this.
A 'coordinate variable' is one dimensional, with the same name as the dimension it is defining.
A scalar variable is not defined with respect to a dimension, it is a scalar.
|
I am getting test failures unrelated to my change, e.g. |
|
Looks like an issue around the new masked array functionality in Dask. |
|
@djkirkham: would you mind helping to add a unit test that covers the issue identified with dask? |
|
I've added a workaround and unit tests in #2878 |
|
@marqh, would you mind rebasing this and adding a what's new? I think the tests should go green what that done, and I'd be happy to merge for the |
d494ebc to
0254de6
Compare
@pelson I have rebased and added a what's new sentence to the 2.0.rst directly awaiting test results ... ... |
|
Thanks @marqh. |
new test to check that a scalar data variable in a netcdf file will be loaded into a cube
addressing long standing bug reports, including #1427