-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Feature request: Implement interp for interpolating between chunks of data (dask) #4078
Comments
Any feedback ? |
This looks interesting, but it’s hard to see what it does from the code block. Could you please include a minimal example that includes inputs and outputs, similar to how the xarray docs do it? |
Thanks @pums974 we would gladly take a pull request. As @jkmacc-LANL suggests, some tests and comments would be nice in the PR. It's hard to see exactly what this code is doing, but the general idea of using |
Thanks, I'll try to make you tests and example quickly. As for map_overlap, I tried, but something went wrong (I don't remember what though) . Maybe I didn't try enough. EDIT: I cannot use |
When using the current official interp function ( datax = xr.DataArray(data=da.from_array(np.arange(0, 4), chunks=2),
coords={"x": np.linspace(0, 1, 4)},
dims="x")
datay = xr.DataArray(data=da.from_array(np.arange(0, 4), chunks=2),
coords={"y": np.linspace(0, 1, 4)},
dims="y")
data = datax * datay
# both of these interp call fails
res = datax.interp(x=np.linspace(0, 1))
print(res.load())
res = data.interp(x=np.linspace(0, 1), y=0.5)
print(res.load()) fails with but succeed with the monkey patched version EDIT : added the second interp in order to show more general use |
I also want to alert that my version does not work with "advanced interpolation" (as shown in the xarray documentation) |
In a project of mine I need to interpolate a dask-based xarray between chunk of data.
I made it work using monkey patching. I'm pretty sure that you can write it better but I made it as good as I could.
I hope that what I wrote can help you implement it properly.
The text was updated successfully, but these errors were encountered: