-
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
Adapt reader mviri_l1b_fiduceo_nc #2802
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.
Thanks for adding this feature! I'm no expert here, so problably @sfinkens needs to have a look, but I wrote some comments already :)
Co-authored-by: Martin Raspaud <martin.raspaud@smhi.se>
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.
Nice work @bkremmli! Thanks for updating the tests, so that the problem is triggered.
Also I noticed that space pixels now have some finite values (instead of NaN), because |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2802 +/- ##
=======================================
Coverage 96.06% 96.07%
=======================================
Files 373 373
Lines 54406 54467 +61
=======================================
+ Hits 52267 52328 +61
Misses 2139 2139
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…ead_error Conflicts: satpy/readers/mviri_l1b_fiduceo_nc.py
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.
Nice work, almost there!
I think in the tests you need to write the dataset to disk and read it back in. Otherwise the dask error with duplicate dimensions is not triggered.
The test for the duplicate dimensions still needs to be added. |
small fix to DataWrapper._decode_cf()
adds support for filenames of MVIRI FCDR L1.5 release 2
- include u_independent_toa_bidirectional_reflectance in tests - patch decode_cf/fix_duplicate_dimensions in test_reassign_coords()
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 very good, thanks! I'm just nitpicking with minor things now 🙂
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!
Let's see if we can make CodeScene happy |
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.
Good job!
Merge main into read_error
Merge from satpy/main
Pull Request Test Coverage Report for Build 11122895363Details
💛 - Coveralls |
@mraspaud Do you want to have a final look? In the next PR we'll do a bit of refactoring and split "DatasetWrapper" into preprocessor and accessor |
I just had a quick look and this looks good to merge. In a future PR, you might want to ensure the sensor data is in float32 to increase performance. |
That's checked in the tests https://github.com/pytroll/satpy/blob/main/satpy/tests/reader_tests/test_mviri_l1b_fiduceo_nc.py#L433 |
This PR fixes the mviri_l1b_fiduceo_nc reader when being used with a new xarray version (2024.3.0). When using the original reader, a ValueError about not being able to decode the times is thrown. The file is now opened without decoding. The decoding is now done in DatasetWrapper()._decode_cf(). The time is decoded separatly from the other data values. FillValues for the time are recognized to replace time values with NaT and time is decoded using the offset values included within the attributes.
Also, opening the dataset using chunks is deactivated because the input files contains dimensions of the same name which cannot be processed by xarray at the moment. The chunking as well as renaming the dimensions is also performed in DatsetWrapper().
AUTHORS.md
if not there already