-
Notifications
You must be signed in to change notification settings - Fork 300
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
Add resolution-based chunking to ABI L1b reader #2621
Conversation
Caused failure in GLM L2 DQF processing
Codecov Report
@@ Coverage Diff @@
## main #2621 +/- ##
==========================================
- Coverage 95.18% 95.18% -0.01%
==========================================
Files 354 354
Lines 51270 51316 +46
==========================================
+ Hits 48803 48846 +43
- Misses 2467 2470 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Pull Request Test Coverage Report for Build 6712031249
💛 - Coveralls |
So the tests are passing here and the individual ABI L1b tests pass locally, but if I run all the Satpy tests, some of these new tests fail at the dask array chunking checks with unexpected chunk sizes. I'd still like to investigate but that shouldn't hold up a review on this. My guess is some poorly configured test in something else and/or one of my other edits/debugs in my other packages screwing things up. |
Scratch that. Pycharm was using an old Python 3.10 environment that I haven't used for a long time. No idea what was in there, but my guess is an old version of xarray not using |
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.
Looks good overall, and great job on the test refactoring/rewitting.
I have a couple of comments in-line, but one general thing I want to bring up is the use of the scene object in the tests. Is this really necessary? these tests are for the file handlers iiuc, so I suggest we stick to that api. Using the scene here makes these test fragile and likely to break if the scene object changes or is deprecated in the future, while the abi reader will still be valid.
# RAD_SHAPE = { | ||
# 500: (21696, 21696), # fldk - 500m | ||
# } |
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.
Do we need this dead code?
Agreed. I brought this up on slack and Panu was the only one that commented. I don't like using the Scene in the tests either, but also I hate the number of functions/methods I have to call just to get a reader instance. I can change it, I'm just not sure where to use utility functions in |
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, thanks for the heavy work on the tests and not using the scene interface anymore
Add resolution-based chunking to the ABI L1b reader and switch default data type to 32-bit floats. This is similar to #2052 and #2584, but for the ABI L1b reader. This PR was a little more difficult than those as we are using
xr.open_dataset
here so we can't tell xarray what chunk size we want and have it be on-disk-chunk aligned. I cheat by having the on-disk chunk size hardcoded. Without this we'd end up with misaligned resolution chunks which defeats the purpose of this PR. I noticed that full disk files have a chunk size of 226 (consistently) and CONUS and M1/M2 are 250.Edit: CSPP Geo GRB is configured to produce on-disk chunks of 226 for all sectors.
Additionally, I changed the default processing to produce 32-bit floats instead of 64-bit floats since the extra precision for non-x/y variables should be unnecessary.
Lastly, I rewrote the L1b tests. They didn't make it possible to test what I needed to test and there is a lot sense duplicate code now.
TODO:
AUTHORS.md
if not there already