Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some global EPSG 4326 gridded lat/lon areas. #2600

Merged
merged 3 commits into from
Oct 16, 2023

Conversation

simonrp84
Copy link
Member

This PR adds some global EPSG:4326 area definitions for lat/lon grids at the following resolutions:

  • 0.01 degree
  • 0.05 degree
  • 0.25 degree
  • 0.50 degree
  • 1.00 degree

I chose these resolutions as they're ones that I've seen in common use and are hence those I think will be most useful across various use cases.

@simonrp84
Copy link
Member Author

pre-commit.ci autofix

satpy/etc/areas.yaml Outdated Show resolved Hide resolved
pre-commit-ci bot and others added 2 commits October 12, 2023 07:54
Re-order some of the area definitions.
@mraspaud
Copy link
Member

I'm only now realizing that this can be achieved easily with:

In [4]: AreaDefinition.from_epsg(4326, 0.1)
Out[4]: 
Area ID: WGS 84
Description: WGS 84
Projection: {'datum': 'WGS84', 'no_defs': 'None', 'proj': 'longlat', 'type': 'crs'}
Number of columns: 3600
Number of rows: 1800
Area extent: (-180.0, -90.0, 180.0, 90.0)

etc...

@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

Merging #2600 (81af838) into main (056a3a9) will decrease coverage by 0.03%.
Report is 109 commits behind head on main.
The diff coverage is 95.87%.

@@            Coverage Diff             @@
##             main    #2600      +/-   ##
==========================================
- Coverage   94.94%   94.92%   -0.03%     
==========================================
  Files         354      354              
  Lines       51474    51474              
==========================================
- Hits        48873    48862      -11     
- Misses       2601     2612      +11     
Flag Coverage Δ
behaviourtests 4.26% <3.09%> (-0.01%) ⬇️
unittests 95.54% <98.08%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
satpy/_compat.py 57.14% <100.00%> (ø)
satpy/_config.py 96.59% <100.00%> (ø)
satpy/composites/spectral.py 100.00% <100.00%> (ø)
satpy/modifiers/__init__.py 100.00% <100.00%> (ø)
satpy/modifiers/angles.py 99.21% <100.00%> (ø)
satpy/modifiers/geometry.py 90.32% <100.00%> (ø)
satpy/multiscene/__init__.py 100.00% <100.00%> (ø)
satpy/multiscene/_blend_funcs.py 100.00% <100.00%> (ø)
satpy/multiscene/_multiscene.py 92.81% <ø> (ø)
satpy/readers/aapp_mhs_amsub_l1c.py 95.94% <100.00%> (ø)
... and 21 more

... and 6 files with indirect coverage changes

@djhoese
Copy link
Member

djhoese commented Oct 12, 2023

I'd like to point out that this could reveal some fun bugs in satpy and pyresample as technically speaking EPSG:4326 has (lat, lon) ordered axes rather than our usual (lon-x, lat-y) ordering. Pyresample is pretty good about asking pyproj to force x/y order, but I'm sure there are some spots that aren't doing it.

Additionally, GDAL recommends not using 4326: https://gdal.org/user/coordinate_epoch.html#dynamic-crs-and-coordinate-epoch

The generic EPSG:4326 WGS 84 CRS is also considered dynamic, although it is not recommended to use it due to being based on a datum ensemble whose positional accuracy is 2 meters, but prefer one of its realizations, such as WGS 84 (G1762)

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mraspaud mraspaud added the enhancement code enhancements, features, improvements label Oct 16, 2023
@mraspaud mraspaud added this to the v0.44.0 milestone Oct 16, 2023
@mraspaud mraspaud merged commit 93bae5e into pytroll:main Oct 16, 2023
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants