-
Notifications
You must be signed in to change notification settings - Fork 94
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
Fix DynamicAreaDefinition resolution handling for incomplete projection definitions #424
Conversation
Codecov Report
@@ Coverage Diff @@
## main #424 +/- ##
=======================================
Coverage 93.89% 93.89%
=======================================
Files 65 65
Lines 11130 11169 +39
=======================================
+ Hits 10450 10487 +37
- Misses 680 682 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This should be clarified, if anything in the title of this PR, that I think this is only an issue with invalid projections. For some reason your omerc projection isn't pyproj friendly and reaches that exception block where you've made the fix. We even have a test case where resolution is used for an LCC projection and I'm pretty sure I use DynamicAreaDefinitions with resolution just fine in Polar2Grid. pyresample/pyresample/test/test_files/areas.yaml Lines 222 to 230 in 1928289
|
ah, interesting! Maybe the |
I haven't looked at the code in a while, but yeah there could be some more flexibility builtin with providing parameters to a PROJ.4 string or something. Maybe "freeze_projection" ("_string") or something along those lines. |
I'm looking at this renaming, but it's going to be quite some work to set up all the deprecation warnings and such. Re your original question, the projection is not invalid as much as incomplete. Is there something you want me to correct or clarify in the doc or in this PR's title or comment? |
Regarding deprecation warnings, for what? The renaming of that function? Just leave it for now. Regarding clarifying, maybe just retitle this PR to something like "Fix DynamicAreaDefinition resolution handling for incomplete projection definitions" or something 🤷♂️ |
Renaming |
@djhoese do you think this is good to merge? |
Go for it |
It came up as a use case that sometimes it might be interesting to fix the resolution of a partially defined DynamicAreaDefinition (that is thus optimized upon freezing). Until this PR, the resolution was always computed in this case from the size of the lon/lat arrays, and any user-defined resolution was just ignored. This PR allows for example having a area like: