-
Notifications
You must be signed in to change notification settings - Fork 314
Open
Labels
component:readersenhancementcode enhancements, features, improvementscode enhancements, features, improvements
Description
The lack of the attribute "orbital_parameters" in the MTG data implies that the functionget_satpos()
raises the following error when using it with MTG-LI data:
from satpy.utils import get_satpos
get_satpos(mtg_scene['latitude'])
Traceback (most recent call last):
File "/home/zjequier/Documents/satpy/satpy/utils.py", line 349, in get_satpos
lon, lat = _get_sat_lonlat(data_arr, lonlat_prefixes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zjequier/Documents/satpy/satpy/utils.py", line 387, in _get_sat_lonlat
orb_params = data_arr.attrs["orbital_parameters"]
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'orbital_parameters'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/zjequier/Documents/satpy/satpy/utils.py", line 357, in get_satpos
raise KeyError("Unable to determine satellite position. Either the "
KeyError: "Unable to determine satellite position. Either the reader doesn't provide that information or geolocation datasets were not available."
When looking at the attributes of the data, the orbital parameters are indeed not given in the metadata. This is likely that this is not a satpy problem but rather that the LI files themselves do not contain the orbital parameter attributes. However, this would still be meaningful to be able to retrieve the information regarding the satellite location, for instance to apply a parallax correction to the lightning data.
Metadata
Metadata
Assignees
Labels
component:readersenhancementcode enhancements, features, improvementscode enhancements, features, improvements