xoa.krig.BaseKriger

xoa.krig.BaseKriger#

class xoa.krig.BaseKriger(da, krigtype, variogram_func, exact=False, dist_units=None, mean=None, **kwargs)[source]#

Base class of the krigers

It manages the kriging type, the variogram, the input points and the formatting of the output as a dataset that has the coordinates of the target positions, and the attributes of the input data.

Parameters:
  • da (xarray.DataArray, xarray.Dataset) – Input positions and data. The dimensions that are not geographic are kept in the output.

  • krigtype (optional) – Kriging type: 1|"ordinary", 0|"simple".

  • variogram_func (callable, VariogramModel, str) – A callable, an instance of VariogramModel or a model name. A model that is not fitted yet is fitted to the data.

  • exact (optional) – If True, variogram is exactly zero when distance is zero.

  • dist_units (optional) – Distance units as one of: 0|"m"|"meters"|"meter", 1|"km"|"kilometers"|"kilometer".

  • mean (optional) – Mean for the simple kriging, which defaults to the mean of the data.

__init__(da, krigtype, variogram_func, exact=False, dist_units=None, mean=None, **kwargs)[source]#

Methods

interp(dso[, name])

Interpolate to the dso positions

Attributes

dist_units

Distance units

sill

Sill of the variogram, used to convert it to a covariance for the simple kriging

variogram_func

Variogram function or callable, like a VariogramModel instance