Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UK.execute("points") not wokring corectly? #297

Open
JakovGlavac opened this issue Oct 6, 2024 · 0 comments
Open

UK.execute("points") not wokring corectly? #297

JakovGlavac opened this issue Oct 6, 2024 · 0 comments

Comments

@JakovGlavac
Copy link

Hi,
I'm trying to use OrdinaryKriging to extimate value, at frist i used style="grid" and it worked fine. Now I want to speed things up so that it doesnt calculate value for every point, but when using style="points" i get totaly different resoults.

from scipy.interpolate import griddata

gridx = np.arange(-150, 150, 0.5)
gridy = np.arange(-180, 150, 0.5)

z, ss = UK.execute("grid", gridx, gridy)

grid_x, grid_y  = np.meshgrid(
    np.linspace(-150, 150, z.shape[1]),  
    np.linspace(-180, 150, z.shape[0])  
)
f = griddata(
    (grid_x.flatten(), grid_y.flatten()), 
    z.flatten(), 
    (x, y), 
    method='linear'
)

I get:
image

But when i use

z, ss = UK.execute("points", x, y)

then I get:

image

I can't figure out what I'm doing wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant