Skip to content

External Drift Kriging in 2D #341

Answered by gld78
gld78 asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for your suggestions.
Just one drift sample value per point seems to be fine.
I simply had to call ".structured"

The following code seems to be ok for me:

import numpy as np
from gstools import Gaussian, krige

# Grid
gridx = np.arange(0.0, 5.5, 0.5)
gridy = np.arange(0.0, 5.5, 0.5)
# observations
data = np.array(
[
[0.3, 1.2, 0.47],
[1.9, 0.6, 0.56],
[1.1, 3.2, 0.74],
[3.3, 4.4, 1.47],
[4.7, 3.8, 1.74],
]
)
x=data[:, 0]
y=data[:, 1]
cond_val=data[:, 2]
# Drift-Samples
ext_drift_samp = np.array([0.5, 0.56, 0.5, 1.5, 1.8])

# drift at the grid level
grid_drift = np.ones((11,11))*0

# define kriging 
model = Gaussian(dim=2, var=1, len_scale=2)
krig = krige.ExtDrift(model=model, 
    …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by gld78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants