pytroll / satpy

Python package for earth-observing satellite data processing
http://satpy.readthedocs.org/en/latest/
GNU General Public License v3.0
1.04k stars 287 forks source link

Finalize builtin areas #819

Open djhoese opened 5 years ago

djhoese commented 5 years ago

I thought we had an issue for this, but I can't find it.

Problem

We have a lot of areas provided in Satpy, but I'm not sure the usefulness of all of them for most users. They are also not sorted and there are none for the Americas right now (I think).

Possible Solutions

  1. Static 1km areas for various regions; mostly continents. Europe, Asia, North America, South America, Africa, Australia.
  2. Dynamic areas for each general region. For example, an "lcc" projection centered on mid-latitude Americas, polar stereographic projection centered near Canada and/or Alaska, polar stere for Nordic countries and/or Russia, "lcc" for mid-latitude Europe, similar "lcc" for "southern" Africa and South America, not sure for Australia, and Mercator for everything else.
ameraner commented 3 years ago

In upcoming PRs in the frame of https://github.com/pytroll/satpy/issues/1248 we'll add a few geostationary areas (as we also need them for SIFT). So it's a good occasion to start on this, as I think it's something needed (along with a gallery of areas as proposed in https://github.com/pytroll/satpy/issues/1206 and a general cleanup as in https://github.com/pytroll/satpy/issues/1207).

We could start with sorting out the geostationary projection areas, and then divide them in "full-disk" and "local" areas. What do you think?

djhoese commented 3 years ago

I'd be ok with going forward with #1248 by adding various geostationary areas and grouping them together per-satellite. Maybe all of the "old" area/s and names should go at the end of the file and we'll just put some comments in there about them being deprecated and maybe try to add some code later on that actually prints out a warning about their deprecation?

I think if we have a set of geostationary satellite areas and have "region" AreaDefinitions for example "Northern Europe", "Europe", etc (my first possible solution above) then we'll be doing really well. We should probably also find a way to auto-document these in the sphinx docs. Like something in the conf.py that loads the YAML and dynamically creates a restructuredtext list of the areas in the file.

...braindump complete.

ameraner commented 3 years ago

Sounds good! Although I guess it's hard to find out which areas are actually being used on a regular basis, and therefore should be kept (in their category) and not be relegated to the deprecated ones (with possible DeprecationWarning).

djhoese commented 3 years ago

Most likely it will be some of the newly named areas you create for #1248 that already exist with some name currently. At least those will be the first ones. The euroX ones will likely also have more explicit names in the future and need to be deprecated with warnings for a long time (due to how many tutorials/docs they are in).

ameraner commented 3 years ago

A possible place for triggering the deprecation warning could be in satpy.resample.get_area_def(), as this is called by Scene._resampled_scene to get the AreaDefinition out of the yaml?