pyinterp.backends.xarray.Grid2D#
- class pyinterp.backends.xarray.Grid2D(data_array)[source]#
Bases:
_GridHolderBuild a Grid2D from Xarray data.
Create a 2D grid interpolation object from the provided Xarray data array. The longitude and latitude axes are identified from the CF attributes and the data is transposed to the (longitude, latitude) order if needed; a longitude axis is created as periodic (360 degrees).
- Parameters:
data_array (xr.DataArray) – Provided data
- Raises:
ValueError – if the number of dimensions is different of 2.
Initialize the 2D grid from an Xarray data array.
Public Methods
bivariate(coords[, method])Evaluate the interpolation defined for the given coordinates.
Special Methods
Support pickle serialization (e.g. for Dask scatter/multiprocessing).