hydrobox.geostat.universal_kriging

hydrobox.geostat.universal_kriging(variogram, grid_resolution, drift_functions, exact=True, cond_err='nugget', pseudo_inv=True, pseudo_inv_type='pinv', return_type='plot', **kwargs)

Use a scikit-gstat Variogram to estimate spatial properties of a sample. Uses this variogram to interpolate using kriging. The Kriging is done with the Universal class. Refer to the docs of Universal to learn about the parameters.

For universal kriging you need to specify the interal drift term of the field. Then, this auto-regression will be taken into account for kriging. This is useful for fields, that acutally show a drift. If that is not the case, refer to ordinary_kriging or ext_drift_kriging for external drifts.

Note

Right now, there are only very limited possibilities to specify an interpolation grid. Only setting the resolution of the result like: 50x50 is possible by passing the integer 50. More fine-grained control will be added with a future release.

Parameters
  • variogram (skgstat.Variogram) – Variogram used for kriging

  • grid_resolution (int) – Resoultion of the interpolation grid. The resolution will be used in all input data dimensions, which can lead to non-quadratic grid cells.

  • drift_functions (str) – The drift function used to perform regression kriging on the values of the sample. Can be either 'linear' or 'quadratic'. Polynomials of higher order are currently only supported, if you use Universal directly.

  • exact (bool) – If True (default), the input data will be matched exactly. Refer to Universal for more info.

  • cond_err (str, float, list) – Measurement error, or variogram nugget. Refer to Universal for more info.

  • pseudo_inv (bool) – If True, the Kriging is more robust, but also slower. Refer to Universal for more info.

  • pseudo_inv_type (str) – Type of matrix inversion used if pseudo_inv is True. Refer to Universal for more info.

  • return_type (str) – Specify how the result should be retuned. Can be the kriging class itself ('object'), the interpolated grid ('grid') or a plot of the grid ('plot').

Return type

Union[List[ndarray], Figure]

Returns

  • results (numpy.ndarray, numpy.ndarray) – Interpolation grid and kriging error grid

  • fig (plotly.graph_objects.Figure, matplotlib.Figure) – Figure of the result plot.