satpy
satpy copied to clipboard
Gradient search and bilinear resampling not working as expected.
Describe the bug
The gradient_search
resampling method accessed through satpy is incorrectly giving a Source and destination areas are identical.
error when resampling GOES-16 ABI data. If I use the bilinear
method instead then the resulting image has a significant amount of speckle (black, missing, pixels) even if I set the radius_of_influence
to an exceptionally high number.
To Reproduce
from satpy import Scene
from glob import glob
scn = Scene(glob(f'{some_goes_dir}/*.nc'), reader='abi_l1b')
scn.load(['true_color_nocorr'])
scn2 = scn.resample(scn.coarsest_area(), resampler='gradient_search')
# The above will produce an error.
scn3 = scn.resample(scn.coarsest_area(), resampler='bilinear', radius_of_influence=100000, fill_value=0)
scn3.save_datasets()
# The resulting image will have many black missing pixels.
Expected behavior
I expect gradient_search
to recognise that the ABI channels are at different resolutions and hence require resampling, as used to happen. I expect bilinear
to produce a smooth output image with no obvious missing pixels.
Environment Info:
- OS: Windows and Linux
- Satpy Version: Latest
main
- PyResample Version: Latest conda (1.25.1)
@simonrp84 maybe some problems are related to what I see when testing 'bilinear' and 'gradient_search' for LEOs:
https://groups.google.com/g/pytroll/c/8Fpo9QszZyc
?