Skip to content

Add possibility to override area_def in gerb reader#3220

Merged
djhoese merged 3 commits intopytroll:mainfrom
pdebuyl:gerb_area_def_override
Sep 3, 2025
Merged

Add possibility to override area_def in gerb reader#3220
djhoese merged 3 commits intopytroll:mainfrom
pdebuyl:gerb_area_def_override

Conversation

@pdebuyl
Copy link
Contributor

@pdebuyl pdebuyl commented Sep 1, 2025

This is necessary because some GERB files do not have the sub-satellite longitude as a parameter.

The proposed fix is to add a reader_kwargs for the area definition of the gerb reader. The possibilities for overriding are msg_seviri_fes_9km or msg_seviri_iodc_9km. Altough unreleased, some data might use IODC at 41.5 degrees instead of 45.5 degrees (see https://usc.tools.eumetsat.int/reports//missions/geo_ssp_iodc.html for the history of sub-satellite points) but I'll have the required attribute added to GERB L2 data for upcoming releases.

  • Tests added
  • Fully documented

This is necessary because some GERB files do not have the sub-satellite
longitude as a parameter.
@codecov
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.33%. Comparing base (d035d04) to head (aaf4882).
⚠️ Report is 247 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3220   +/-   ##
=======================================
  Coverage   96.32%   96.33%           
=======================================
  Files         463      463           
  Lines       58181    58189    +8     
=======================================
+ Hits        56041    56054   +13     
+ Misses       2140     2135    -5     
Flag Coverage Δ
behaviourtests 3.64% <0.00%> (-0.02%) ⬇️
unittests 96.42% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pdebuyl
Copy link
Contributor Author

pdebuyl commented Sep 2, 2025

Hello, the Python 3.11 test on windows seems unrelated to this PR, should I restart the tests?

@djhoese
Copy link
Member

djhoese commented Sep 2, 2025

but I'll have the required attribute added to GERB L2 data for upcoming releases

Does this mean this workaround will no longer be needed in the next release of the GERB L2 software?

@coveralls
Copy link

coveralls commented Sep 2, 2025

Pull Request Test Coverage Report for Build 17442455296

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 10 of 10 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 96.43%

Totals Coverage Status
Change from base Build 17329287279: 0.001%
Covered Lines: 56379
Relevant Lines: 58466

💛 - Coveralls

@pdebuyl
Copy link
Contributor Author

pdebuyl commented Sep 2, 2025

For the next official release of GERB data. Currently, we have the "Edition 1" release where only "GERB files" (so not the GERB like files that lack the attribute) are present, but also the near real time and some (one released dataset called V100) datasets containing GERB + GERB-like but those latter files are unreadable currently.

@pdebuyl
Copy link
Contributor Author

pdebuyl commented Sep 2, 2025

But indeed at the next release I would like to have this issue resolved within the HDF5 files of GERB and GERB-like directly.

@djhoese
Copy link
Member

djhoese commented Sep 2, 2025

I guess what I'm leading to is should the changes made here just stay in your local copy of Satpy for reading these files? Or should this PR be merged to make it more available to others and/or easier to install in your systems?

@pdebuyl
Copy link
Contributor Author

pdebuyl commented Sep 3, 2025

I made the PR because one scientist at a partner institution had trouble with those "GERB-like" files. I would like to have it merged :-)

@djhoese djhoese added enhancement code enhancements, features, improvements component:readers labels Sep 3, 2025
@pdebuyl
Copy link
Contributor Author

pdebuyl commented Sep 3, 2025

Both suggestions implemented.

Copy link
Member

@djhoese djhoese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@djhoese djhoese merged commit f45f902 into pytroll:main Sep 3, 2025
18 checks passed
@pdebuyl pdebuyl deleted the gerb_area_def_override branch September 3, 2025 20:14
@pdebuyl
Copy link
Contributor Author

pdebuyl commented Sep 3, 2025

🥳 thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:readers enhancement code enhancements, features, improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants