Download Site

library(gpusim) # <-- load R package

gpuDeviceInfo() # <-- print GPU capabilities

# define grid

xmin = 0

xmax = 5

ymin = 0

ymax = 5

nx = 100

ny = 100

dx = (xmax-xmin)/nx

dy = (ymax-ymin)/ny

grid = GridTopology(c(xmin,ymin), c(dx,dy), c(nx,ny))

# define covariance function

model = "Exp"

range = 0.5

sill = 3

nugget = 0

k = 5 # number of realizations

simGPU = gpuSim(grid, model, sill, range, nugget, k) # <-- run simulation

image.plot(simGPU[,,5]) # <-- plot 5-th realization

gpuDeviceInfo() # <-- print GPU capabilities

# define grid

xmin = 0

xmax = 5

ymin = 0

ymax = 5

nx = 100

ny = 100

dx = (xmax-xmin)/nx

dy = (ymax-ymin)/ny

grid = GridTopology(c(xmin,ymin), c(dx,dy), c(nx,ny))

# define covariance function

model = "Exp"

range = 0.5

sill = 3

nugget = 0

k = 5 # number of realizations

simGPU = gpuSim(grid, model, sill, range, nugget, k) # <-- run simulation

image.plot(simGPU[,,5]) # <-- plot 5-th realization

Three equiprobable realizations of an unconditional simulation on a 500x500 grid using an exponential covariance function. |

Three equiprobable realizations of an unconditional simulation on a 500x500 grid using a gaussian covariance function. |

Three unconditional simulation results with the same exponential covariance function but increasing nugget effect |

Conditional simulation on a 500x500 grid given 50 random points. The right figure compares the averaged resulting experimental variogram (points) of all realizations against the theoretical variogram model. |

Marius Appel - marius.appel@uni-muenster.de

[1] -

[2] Reinhard Furrer, Douglas Nychka and Stephen Sain (2011). fields: Tools for spatial data. R package version 6.6.1. http://CRAN.R-project.org/package=fields

[3] Pebesma, E.J., 2004. Multivariable geostatistics in S: the gstat package. Computers & Geosciences, 30: 683-691.

[4] Pebesma, E.J., R.S. Bivand, 2005. Classes and methods for spatial data in R. R News 5 (2), http://cran.r-project.org/doc/Rnews/.