Skip to content
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 possibility to define the dataset rectification longitude in seviri_l2_bufr reader #2078

Conversation

strandgren
Copy link
Collaborator

The SEVIRI L2 BUFR data are originally been extracted from a rectified two-dimensional SEVIRI grid with a given central longitude (typically the sub-satellite point). Previously this longitude was hard-coded for each SEVIRI instrument (Meteosat satellite) in the reader, following the current operational grids. This is sub-optimal when working with e.g. historic data where the operational grid for a given instrument is different, as this will lead to an incorrect AreaDefinition in case the data are returned with one (with_area_definition=True). Since the information about the satellite position or original grid rectification longitude is not available in the file itself or the filename (for files from the EUMETSAT archive) and cannot be reliably derived from all datasets themselves, this PR adds the possibility to provide this information as a reader_kwarg (rectification_longitude) when initializing the Scene object for the seviri_l2_bufr reader.

If this reader_kwarg is not provided, the default longitude defined for a given satellite/instrument will be used (unless the information can be extracted from the filename (internal EUMETSAT files)) thus following the previous implementation.

The PR also modifies the default SSP_LON for Meteosat-9 in preparation for it's upcoming relocation to the IODC service at 45.5 degrees east.

  • Tests added
  • Fully documented

…add_rectification_longitude_to_seviri_l2_bufr_reader
…add_rectification_longitude_to_seviri_l2_bufr_reader
@codecov
Copy link

codecov bot commented Apr 6, 2022

Codecov Report

Merging #2078 (a8cc313) into main (fd483d3) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2078   +/-   ##
=======================================
  Coverage   93.79%   93.80%           
=======================================
  Files         283      283           
  Lines       42284    42295   +11     
=======================================
+ Hits        39662    39673   +11     
  Misses       2622     2622           
Flag Coverage Δ
behaviourtests 4.73% <0.00%> (-0.01%) ⬇️
unittests 94.36% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
satpy/readers/seviri_l2_bufr.py 96.03% <100.00%> (+0.06%) ⬆️
satpy/tests/reader_tests/test_seviri_l2_bufr.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd483d3...a8cc313. Read the comment docs.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 94.302% when pulling a8cc313 on strandgren:feature_add_rectification_longitude_to_seviri_l2_bufr_reader into fd483d3 on pytroll:main.

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

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

Just one question, otherwise LGTM

satpy/readers/seviri_l2_bufr.py Show resolved Hide resolved
Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

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

LGTM

@mraspaud mraspaud added enhancement code enhancements, features, improvements component:readers labels Apr 6, 2022
@mraspaud mraspaud merged commit 48b2356 into pytroll:main Apr 6, 2022
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.

None yet

3 participants