pyinterp.backends.xarray.DatasetAccessor

Contents

pyinterp.backends.xarray.DatasetAccessor#

class pyinterp.backends.xarray.DatasetAccessor(dataset)[source]#

Bases: object

Interpolate the variables of a dataset with ds.pyinterp.

The accessor is registered as soon as both pyinterp and xarray are imported, in either order.

Parameters:

dataset (xr.Dataset) – The dataset to interpolate.

Initialize the accessor.

Public Methods

interp([coords, method])

Interpolate the variables of the dataset at new coordinates.

regrid([coords, method])

Regrid the variables of the dataset, conserving their integrals.