Skip to content

How to do meshfree 3D krige interpolation? #342

Closed Answered by MuellerSeb
Reybor asked this question in Q&A
Discussion options

You must be logged in to vote

Hey there, to have an unstructured target grid, just call the unstructured method or pass mesh_type="unstructured" to the kriging call (actually not needed, since this is the default mesh type):

import numpy as np
import gstools as gs

# conditioning data
cond_x = [0.3, 1.9, 1.1, 3.3, 4.7]
cond_y = [1.2, 0.6, 3.2, 4.4, 3.8]
cond_val = [0.47, 0.56, 0.74, 1.47, 1.74]
cond_pos = [cond_x, cond_y]

# unstructued points of target grid in (0, 6) x (0, 6)
x = np.random.RandomState(19970221).rand(1000) * 6.
y = np.random.RandomState(20011012).rand(1000) * 6.

model = gs.Gaussian(
    dim=2, len_scale=1, anis=0.2, angles=-0.5, var=0.5, nugget=0.1
)
krig = gs.krige.Ordinary(model, cond_pos=cond_pos, c…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by LSchueler
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