hydrobox.geostat.ext_drift_kriging¶
- hydrobox.geostat.ext_drift_kriging(variogram, grid_resolution, ext_drift, exact=True, cond_err='nugget', pseudo_inv=True, pseudo_inv_type='pinv', return_type='plot', **kwargs)¶
Use a scikit-gstat
Variogramto estimate spatial properties of a sample. Uses this variogram to interpolate using kriging. The Kriging is done with theExtDriftclass. Refer to the docs ofExtDriftto learn about the parameters.For external drift kriging you need to specify the external drift term of the field. Then, the regression between drift and sample will be taken into account for kriging. This is useful for fields, that are actually correlated to other fields, which are (more) available. If that is not the case, refer to
ordinary_krigingfor kriging without drift.Note
Right now, there are only very limited possibilities to specify an interpolation grid. Only setting the resolution of the result like:
50x50is possible by passing the integer50. 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.
ext_drift (np.ndarray) – External drift values at the observation points
exact (bool) – If True (default), the input data will be matched exactly. Refer to
ExtDriftfor more info.cond_err (str, float, list) – Measurement error, or variogram nugget. Refer to
ExtDriftfor more info.pseudo_inv (bool) – If True, the Kriging is more robust, but also slower. Refer to
ExtDriftfor more info.pseudo_inv_type (str) – Type of matrix inversion used if pseudo_inv is True. Refer to
ExtDriftfor 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
- Returns
results (numpy.ndarray, numpy.ndarray) – Interpolation grid and kriging error grid
fig (plotly.graph_objects.Figure, matplotlib.Figure) – Figure of the result plot.