-
Notifications
You must be signed in to change notification settings - Fork 303
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
Fix assumption that arrays have 2+ dimensions in CF writer #2451
Conversation
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.
LGTM, just one styling comment.
3 tests failing now... |
The failing tests were because of the netCDF compression settings not working with the latest XArray version. |
Codecov Report
@@ Coverage Diff @@
## main #2451 +/- ##
==========================================
- Coverage 94.81% 94.81% -0.01%
==========================================
Files 339 339
Lines 49391 49343 -48
==========================================
- Hits 46832 46784 -48
Misses 2559 2559
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
I arranged the imports in |
The CF writer currently has an assumption that all arrays have both x and y coordinates. This might not be intentional, as the only place this is enforced is in a private method where coordinate units are check when trying to determine whether the data are projected or not.
This had come up in https://github.com/foua-pps/level1c4pps/ which uses Satpy to convert data to NWC SAF PPS compatible format.
The test I added is very simple, and without the
try/except
I added in this PR it'd fail withKeyError: 'x'
.Ping also to @ninahakansson