satpy icon indicating copy to clipboard operation
satpy copied to clipboard

Tiny difference in SEVIRI HRIT area extents

Open sfinkens opened this issue 2 years ago • 3 comments

Describe the bug

In some very rare cases, the area extent of a SEVIRI HRIT scene is a tiny bit different from the majority of scenes.

Majority, areas.yaml (5567248.28340708, 5570248.686685662, -5570248.686685662, -5567248.28340708)
2021-11-08 12:00     (5567248.28340708, 5570248.686685663, -5570248.686685662, -5567248.28340708)
                                                        ^

As a consequence, the x/y coordinates are also slightly different. When concatenating many scenes along the time dimension, xarray doubles the dimension and insert NaNs because the grids don't align.

A workaround is to use for example xr.concat(..., join="override") but I'm still curious why this happens. Maybe it can be fixed.

To Reproduce

import satpy
import glob

filenames = glob.glob("H-000-MSG1__-MSG1_IODC*202111081200*")
scene = satpy.Scene(filenames, reader="seviri_l1b_hrit")
scene.load(["IR_108"])
print(scene["IR_108"].attrs["area"].area_extent)

Environment Info:

  • OS: Linux
  • Satpy Version: 0.46.0
  • PyResample Version: 1.27.1

sfinkens avatar Dec 21 '23 15:12 sfinkens

Related: https://github.com/pytroll/satpy/pull/2573

djhoese avatar Dec 22 '23 20:12 djhoese

@ameraner any comments on this?

mraspaud avatar Jan 09 '24 14:01 mraspaud

Hmm this is a little odd, I'd also be curious to know where it comes from... looks like a floating point precision issue, even though the input parameters should be always the same. I requested that slot from the archive, I'll try to take a look when I find a moment

ameraner avatar Jan 09 '24 15:01 ameraner