Open strandgren opened 2 years ago
As discussed in the meeting today, here are some options that might be good ideas:
Also discussed was the possibility of using YAML aliases to reuse information across multiple definitions. This makes things harder to read but means that things that are easy to mistype aren't duplicated (ex. area extents).
I also brought up the possibility of adding something to satpy's pre-commit config to detect changes in the auto-generate python script and then run it to generate the YAML on commit. This way the YAML should never be out of sync with the script.
Feature Request
Is your feature request related to a problem? Please describe. The list of standardized area definitions in
areas.yaml
is growing, with e.g. different resolutions, operating modes and sub-satellite points. Currently 36 standardized area definitions are hard coded inareas.yaml
, with quite a bit of duplicate information.This also allows for limited flexibility. A recent example is the change in sub-satellite point of the MSG SEVIRI IODC service from 41.5E to 45.5E. An easy solution would be to just change the
lon_0
in the IODC-related area definitions. This would however lead to errors if users use this for older data for which thelon_0
is still 41.5E, for which the sub-satellite point was still 41.5E. Of course these is also the possibility to add a new set of (five) area definitions for the IODC service at this new longitude. But that's what I would like to avoid.Describe the solution you'd like An extended or new helper function that compute/construct the area definitions dynamically when called, instead of just looking for hard coded entries in
areas.yaml
.Example Code Below is a small prototype of the proposed helper function together with a dictionary containing all information currently used for the 36 standardized SEVIRI, FCI and ABI area definitions.
Describe any changes to existing user workflow Either this helper function could be used stand-alone. Or, if possible, it could be integrated in
satpy.resample.get_area_def
with the following workflow: