-
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 combined GRIB reader for both SEVIRI and FCI L2 products #2717
Conversation
Feature/eum l2 grib reader
Thanks for working on this @dnaviap :) Before reviewing in more detail, I think we need some refactoring of the files:
|
…ing the user interface to the reader
Feature/eum l2 grib refactor
The refactoring is complete and tested. |
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 the refactoring! :) See a couple of comments inline.
Can you please also modify the doc-string of the _scale_earth_axis
method to read:
def _scale_earth_axis(data):
"""Scale Earth axis data to make sure the value matched the expected unit [m].
The earthMinorAxis value stored in the MPEF aerosol over sea product prior to December 12, 2022 has the wrong unit and this method provides a flexible work-around by making sure that all earth axis values are scaled such
that they are on the order of millions of meters as expected by the reader.
"""
That was a fix implemented by me a while ago when we noticed some issues in one of the products, and although it has been fixed in the product, the archived files will still have the issue meaning that the fix is still useful to have in the reader.
|
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 the fixes and the refactoring @dnaviap!
I left a couple of minor comments in-line. Could you please also merge the main branch into this branch and resolve the merge conflict such that all unit tests etc. run?
o HEAD # Conflicts: # AUTHORS.md # satpy/readers/eum_l2_grib.py
Fix open issues in combined EUM GRIB2 reader
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2717 +/- ##
=======================================
Coverage 96.07% 96.08%
=======================================
Files 373 375 +2
Lines 54491 54578 +87
=======================================
+ Hits 52352 52441 +89
+ Misses 2139 2137 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Pull Request Test Coverage Report for Build 9743868855Details
💛 - Coveralls |
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, just a couple of comments and questions
@mock.patch("satpy.readers.eum_l2_grib.xr") | ||
@mock.patch("satpy.readers.eum_l2_grib.da") |
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.
I see a bit of mocking. In our experience this can lead to problems down the road, and nowadays, we prefer to write a synthetic testing file to tmp_path and work with that instead. Do you think this would be doable for this format?
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.
To be honest I don't know and I also don't have the time to look into it at this point. Would be grateful if we could tackle that in another PR in the future :)
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.
Ok, should we make an issue about it then?
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.
Yes, would be a pity if we were to forget it 😃 I created an issue here: #2932
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Pull Request Test Coverage Report for Build 11361065749Details
💛 - Coveralls |
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
Add combined GRIB reader that can be used for both SEVIRI and FCI L2 products.
AUTHORS.md