Test simulations using Turning Bands method¶

This test is meant to check and demonstrate the simulation using the Turning Bands Method of various covariances. The test is systematically performed on a regular grid.

In [1]:
import gstlearn as gl
import numpy as np           
import gstlearn.plot as gp
import matplotlib.pyplot as plt
In [2]:
nx = [100,100]
dx = [1,1]
grid = gl.DbGrid.create(nx=nx, dx=dx)
varioparam = gl.VarioParam.createMultipleFromGrid(grid, 50)
In [3]:
def represent(type, range=30, param=1):
    model = gl.Model.createFromParam(type=type, range=range, param=param)
    err = gl.simtub(None, grid, model, nbtuba=500)
    vario = gl.Vario.computeFromDb(varioparam, grid)
    
    # Plot
    fig = plt.figure(figsize=(10,5))
    ax1 = fig.add_subplot(1,2,1)
    ax1 = gp.raster(grid,name="Simu")
    ax2 = fig.add_subplot(1,2,2)
    ax2 = gp.varmod(vario, model)
    fig.decoration(title=type.getDescr())
    
    grid.deleteColumn("Simu")

In the next paragraphs, we perform the simulation of a given model on the grid, and represent the experimental variogram (calculated along the main grid directions) together with the Model.

In [4]:
represent(gl.ECov.SPHERICAL)
No description has been provided for this image
In [5]:
represent(gl.ECov.EXPONENTIAL)
No description has been provided for this image
In [6]:
represent(gl.ECov.GAUSSIAN)
No description has been provided for this image
In [7]:
represent(gl.ECov.CUBIC)
No description has been provided for this image
In [8]:
represent(gl.ECov.LINEAR)
No description has been provided for this image