-
Notifications
You must be signed in to change notification settings - Fork 300
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 xarray/dask bilinear resampling #519
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The source lon/lat data masking shouldn't be needed anymore (see specific comment). Also could you add the bilinear method to the docstring at the top of the module (there is a CSV table).
Codecov Report
@@ Coverage Diff @@
## master #519 +/- ##
==========================================
+ Coverage 74.62% 74.83% +0.21%
==========================================
Files 136 136
Lines 18342 18408 +66
==========================================
+ Hits 13687 13776 +89
+ Misses 4655 4632 -23
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the documentation. My only other request, maybe on a longer term timeline, would be to subclass from the kdtree resampler and try to use its caching functionality if possible.
Ok, I had a quick look and sub-classing shouldn't be very complicated. I'm also thinking the cache handling could be in the |
If you can move the caching to the base resampler but also provide kwargs somewhere (resamplers only accept two positional arguments in Should cache_dir be an init argument? Or a precompute argument only? I think disk-caching should be off by default, memory caching on by default. |
I agree that disk-caching should be off by default, like it is now. And memory-caching can be on by default, but I'd like a way to disable it: it will be necessary for large source/target areas and different resolutions and/or satellites. |
This PR adds bilinear interpolation by interfacing the corresponding functionality from pyresample. Note also pytroll/pyresample#148 which is actually the bottleneck killing the performance.
git diff origin/master -- "*py" | flake8 --diff