Closed simonrp84 closed 4 years ago
I also faced the same problem with R30x region data. pad_data = False
was supported. I expect a smarter implementation.
I'm working on a fix for this and I had an idea I wanted to run by @pnuu and @simonrp84:
What if expected_segments
in the YAML file (for each file type) could be an int (the number of segments we expect) or a string (the filename parameter specifying the number of segments). In the AHI HSD reader case this would be "total_segments". I've got this fixed locally but not sure it is the least ugly solution.
Other idea is to allow the file type to specify what sectors to ignore for segmenting, but this seems almost uglier.
Describe the bug The geostationary padding code that was added in a recent satpy release works well for missing segments of data, but has an undesirable effect with Himawari/AHI rapid scan sectors. I tested this with the Meso sector (which have filenames containing
_R30x
) but I suspect the problem also occurs with Japan regional sectors (filenames_JP0x
). The Meso sector is a1000x1000km
scan sector that is produced every 2.5 minutes (in addition to the 10 minute full disk scan). Padding this sector to match the full disk is undesirable, as there are no missing sectors. Can we add some code that intelligently checks the scan region and pads / doesn't pad as appropriate?To Reproduce
Expected behavior An image to be produced whose area definition is a 1000x1000 pixel box, such as:
Actual results An area definition whose area is a 1000x10000 pixel box, such as:
Adding
pad_data=False
to thescn.load
command fixes the issue. Ideally the reader should detect the scan type and perform padding as appropriate. Enabling padding for full disk and disabling it for the meso sectors (unless explicitly enabled by the user).