-
Notifications
You must be signed in to change notification settings - Fork 299
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
Differences in resampling coverage when area crosses 180 deg longitude #383
Comments
If the area reduction in https://github.com/pytroll/satpy/blob/master/satpy/scene.py#L897-L906 is commented out, the results are as expected. |
@pnuu Has there been any work on this on the pyresample side of things? Are resampling results the same between 0.8 and 0.9 for non-180 data? |
I know @mraspaud started something, but I guess he got distracted on something else. I'll check with couple different scenes tomorrow morning to check if there are differences in resampling results when the area doesn't wrap around. |
I got distracted indeed, but I haven't started anything either. The point was that the current boolean union/intersection algorithm doesn't expect multiple polygons as a result, so it just returns the first intersection/union polygon it finds. The resolution of this is thus in pyresample, with possibly need for changing the api to allow returning multiple polygons to satpy, which in turn would have to handle this properly. |
I finally just found also the root cause of this. |
🤦 the Arc properties are modified inplace |
Yep :-P ... and took me 3 hours to find it out ahaha |
I don't think you need to copy the entire Arc, just keep a separate variable/handle for each value used later in the method. |
Hi everyone, We've run into the issue described here while working with data that crosses the 180° meridian. I noticed this issue has been merged, but we're still experiencing the problem in the version of SatPy we're using (0.43.0, should be the latest). Any updates on this would be greatly appreciated. Cheers and thanks! |
@INElutTabile Could you provide a minimal reproducible example (assuming we have equivalent data to what you're using)? Or is your example equivalent to @pnuu's original code in the first comment of this issue? |
@djhoese here is a reproducible example, and the images we produced with that, showhing the issue.
|
@INElutTabile a workaround is to add |
Just to be clear, the himawari one is too short (the image is larger than this) and the GOES one is fine, but perhaps the default radius of influence (dynamically determined) is too low so it has large artifacts on the left. Right? |
Thanks @pnuu and @djhoese for your help - the The updated script looks like this.
Thanks again! |
From #383 (comment):
Himawari and GOES were mixed up and after you wrote your comment, @djhoese, the captions in @INElutTabile's previous comment (#383 (comment)) were swapped to fix this. So just to reduce confusion 😉: the left part of GOES is too short and Himawari has the "bite" artifact in the left part. Both seem to be effects of the problem at hand: with Personally, I don't like that Either way, the problem persists and could also occur with other target projections/data that cover the 180 degree longitude. Might be worth to test, if it also happens at other longitudes than 180 deg, if the target projection is cut at a different longitude. |
Thanks for the clarification and summary @arcanerr. The problem with reduce_data is overall a bug in the intersection/boundary polygon code as you've pointed out. In my opinion reduce_data=False as the default is not a good option. It would result in much worse performance for anyone doing any type of resampling to a smaller than full disk area (I haven't proven this in a long time, but theoretically it should be much worse). Additionally, I make the assumption that most people who are doing "full image" images are using native resampling which should not suffer/use |
Describe the bug
It seems that there are differences in the resampling results between
satpy
maint/0.8
branch (non-xarray/dask) and currentmaster
branch ofsatpy
when the target area crosses 180 deg longitude.To Reproduce
Resample to area definition (example below) with
satpy
maint/0.8
andsatpy
master
, and compare the areas covered. The version of pyresample stays the same.areas.def:
Test script using GOES-15 data. HIMAWARI-8/AHI data shows similar behaviour:
Expected behavior
IR 10.7 um processed with
maint/0.8
branch:Actual results
Same data processed with current
master
branch:Environment Info:
master
branch (0.9.1a0.dev0)The text was updated successfully, but these errors were encountered: