hydrobox.geostat.simple_kriging

hydrobox.geostat.simple_kriging(variogram, grid_resolution, mean, 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 Simple class. Refer to the docs of Simple to learn about the parameters.

For simple kriging you need to pass the real mean value of the field (not the sample) in order to work correctly. If that is not available, refer to ordinary_kriging.

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.

  • mean (float) – The mean value of the field, that has to be known a priori. If you pass bs here, you will interpolate bs.

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

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

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

  • pseudo_inv_type (str) – Type of matrix inversion used if pseudo_inv is True. Refer to Simple 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.