Open bkremmli opened 1 month ago
Also I noticed that space pixels now have some finite values (instead of NaN), because decode_cf=False
. You can use decode_cf=True
together with time.encoding["add_offset/_FillValue"]
, see https://github.com/sfinkens/satpy/commit/7045a87cc5e8066712df153ba4e9998c06df6265
Attention: Patch coverage is 94.91525%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 95.90%. Comparing base (
f33c3e4
) to head (73acfb7
). Report is 202 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
...py/tests/reader_tests/test_mviri_l1b_fiduceo_nc.py | 94.59% | 2 Missing :warning: |
satpy/readers/mviri_l1b_fiduceo_nc.py | 95.45% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The test for the duplicate dimensions still needs to be added.
[INFO] on hold until a new xarray release with this contribution is out which fixes the duplicate dimension problem: https://github.com/pydata/xarray/pull/9099
This PR fixes the mviri_l1b_fiduceo_nc reader when being used with a new xarray version (2024.3.0). When using the original reader, a ValueError about not being able to decode the times is thrown. The file is now opened without decoding. The decoding is now done in DatasetWrapper()._decode_cf(). The time is decoded separatly from the other data values. FillValues for the time are recognized to replace time values with NaT and time is decoded using the offset values included within the attributes.
Also, opening the dataset using chunks is deactivated because the input files contains dimensions of the same name which cannot be processed by xarray at the moment. The chunking as well as renaming the dimensions is also performed in DatsetWrapper().
AUTHORS.md
if not there already