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 satellite position to dataset attributes (seviri_l1b_hrit) #671

Merged
merged 6 commits into from Mar 26, 2019

Conversation

sfinkens
Copy link
Member

@sfinkens sfinkens commented Mar 22, 2019

The seviri_l1b_hrit reader currenlty only provides the longitude and latitude of the projection centre. However, the projection centre does not necessarily represent the actual position of the satellite. For some applications the actual position is required. From the MSG Level 1.5 Image Data Format Description:

In practise, if the user needs (e.g.) to find a location of a pixel on the Earth ellipsoid, he/she needs to refer to the image projection. If one needs to refer to (e.g) the satellite viewing angles, one needs to refer to the satellite position.

This PR adds the nominal and actual satellite position to the dataset attributes:

  • Nominal & actual satellite position can be found under navigation.
  • Projection centre and altitude can be found under projection.
  • Existing keys satellite_longitude/latitude/altitude remain
    unchanged for the moment

Example:

from satpy import Scene
import glob

filenames = glob.glob('data/*200601011215*')
scene = Scene(filenames, reader='seviri_l1b_hrit')
scene.load(['IR_108'])

print(scene['IR_108'].attrs['projection'])
print(scene['IR_108'].attrs['navigation'])

Output:

{'satellite_longitude': 0.0, 'satellite_latitude': 0.0, 'satellite_altitude': 35785831.0}
{'satellite_nominal_longitude': -3.4, 'satellite_nominal_latitude': 0.0, 'satellite_actual_longitude': -3.55117540521326, 'satellite_actual_latitude': -0.5705405815406472, 'satellite_actual_altitude': 35783328.146167256}

- Nominal & actual satellite position can be found under 'navigation'.
- Projection centre and altitude can be found under 'projection'.
- Existing keys 'satellite_longitude/latitude/altitude' remain
  unchanged for the moment
@coveralls
Copy link

coveralls commented Mar 22, 2019

Coverage Status

Coverage increased (+0.2%) to 78.837% when pulling fbeb223 on sfinkens:feature-seviri-hrit-satpos into 40a0dcd on pytroll:master.

@codecov
Copy link

codecov bot commented Mar 22, 2019

Codecov Report

Merging #671 into master will increase coverage by 0.17%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #671      +/-   ##
==========================================
+ Coverage   78.66%   78.84%   +0.17%     
==========================================
  Files         138      138              
  Lines       20356    20479     +123     
==========================================
+ Hits        16013    16146     +133     
+ Misses       4343     4333      -10
Impacted Files Coverage Δ
satpy/readers/seviri_base.py 97.26% <100%> (+0.11%) ⬆️
satpy/readers/seviri_l1b_hrit.py 76.66% <100%> (+12.3%) ⬆️
satpy/tests/reader_tests/test_seviri_base.py 97.05% <100%> (+2.05%) ⬆️
satpy/tests/reader_tests/test_seviri_l1b_hrit.py 97.87% <100%> (+0.81%) ⬆️
satpy/readers/hrit_base.py 80.86% <100%> (+0.11%) ⬆️
satpy/readers/avhrr_l1b_gaclac.py 8.33% <0%> (-0.18%) ⬇️
satpy/writers/geotiff.py 42.01% <0%> (ø) ⬆️

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 40a0dcd...fbeb223. Read the comment docs.

@mraspaud mraspaud added enhancement code enhancements, features, improvements component:readers labels Mar 25, 2019
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
Copy link
Member

@djhoese are you ok adding pyproj as a dependency ?

@mraspaud mraspaud merged commit 9fd4045 into pytroll:master Mar 26, 2019
@sfinkens sfinkens deleted the feature-seviri-hrit-satpos branch March 27, 2019 09:04
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