Skip to content

Issue with Spatial Random Field Grid and Contour Plotting + CSV Output for Kriging Input #366

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

You must be logged in to vote

Hey there,

for me the plot looks as expected. Remember, that you only defined 11 points along each axis, so one every 10 meters (or whatever unit).
If you want the plot to look smoother, you should increase the points along each axis.

For your second point: In order to export the field to CSV, you need to generate the points of the grid from the given axis and then flatten the field to export it. Using pandas, this could look like this:

import gstools as gs
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

x = y = np.linspace(0, 100, 11)
model = gs.Exponential(dim=2, var=20, len_scale=25, nugget=5)
srf = gs.SRF(model, mean=50, seed=19841201)
field = srf.structured((x, y

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by MuellerSeb
Comment options

You must be logged in to vote
0 replies
Comment options

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