Proposal: Implementing Kriging Interpolation for xarray #7926
-
Hello everyone, I have been using xarray extensively and appreciate its power in handling multi-dimensional array-based data. It's especially useful for gridded geospatial data, such as raster datasets. Currently, xarray supports several interpolation methods like nearest, linear, and cubic. However, for geospatial data, especially in the field of geostatistics, Kriging interpolation often serves as a more appropriate method. Kriging is a group of geostatistical techniques to interpolate the value of a random field at an unobserved location from observations of its value at nearby locations. The idea I want to propose here is to implement Kriging interpolation as a part of xarray's interpolation methods.
I am eager to hear your thoughts on this proposal and whether you think this could be a useful addition to xarray. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @mohseniaref - thank you for this suggestion. This sounds like a useful feature for a number of people, but it also sounds like it would be of interest primarily to a single community (geostatistics). In Xarray we mostly try to include only generic features which are general utility across a number of different scientific fields (e.g. bioscience, fluid dynamics, etc.). Instead I suggest you take a look at the documentation on extending xarray using accessors - you can use that to make a syntax like this work: kriged = ds.geostats.interp(method='kriging', variogram_model='spherical') Then you might want to look at some of the many geoscience-specific libraries that exist on top of xarray. There is a (non-exhaustive) list on our ecosystem page. One of those might be a better home for your suggestion! |
Beta Was this translation helpful? Give feedback.
-
Does verde do this? |
Beta Was this translation helpful? Give feedback.
Hi @mohseniaref - thank you for this suggestion. This sounds like a useful feature for a number of people, but it also sounds like it would be of interest primarily to a single community (geostatistics). In Xarray we mostly try to include only generic features which are general utility across a number of different scientific fields (e.g. bioscience, fluid dynamics, etc.).
Instead I suggest you take a look at the documentation on extending xarray using accessors - you can use that to make a syntax like this work:
Then you might want to look at some of the many geoscience-specific libraries that exist on top of xarra…