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

"Initializing variogram model" stuck with large dataset #295

Open
Thorkage opened this issue Sep 11, 2024 · 0 comments
Open

"Initializing variogram model" stuck with large dataset #295

Thorkage opened this issue Sep 11, 2024 · 0 comments

Comments

@Thorkage
Copy link

Hi,

I need to krig a large dataset (35000 data points). I provide a variogram model which is estimated in gstools:

model_mean_rescaled = gs.Exponential(dim=2, len_scale=model_mean.len_scale, var=model_mean.var, nugget=model_mean.nugget, rescale=gs.KM_SCALE*1000, latlon=True)

OK = OrdinaryKriging(df_f['lon'],df_f['lat'], df_f['snow_depth'],
                     variogram_model=model_mean_rescaled,
                     coordinates_type='geographic',
                     exact_values=False,
                     verbose=True
                     )

z, ss = OK.execute("masked", gridlon, gridlat, mask=krig_mask)

The mask in OK.execute limits the new predicted datapoints to ~50000. I had no problems with predicted locations of this amount, but never before had that long input data (df_f).

When I run the code. I get the print out "Initializing variogram model...", but then it is stuck. I tried to test a bit why it is stuck, and seems to me like it happens in _initialize_variogram_model. My python expertise is not good enough to track the issue further down into the code.
I am wondering why _initialize_variogram_model needs to be called when I am providing a variogram model?

Best,
Torbjörn

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