simulateHorizons {SoPhy} | R Documentation |
simulateHorizons
simulates the Gaussian random fields that
define the Miller-similar medium, the stones and the roots according
to the definition of the horizons.
simulateHorizons(h, first = 1, what = 'all', PrintLevel = RFparameters()$Print, message = function(s) {print(s)}, stone.trials=50)
h |
a list of the same format as the output of xswms2d |
first |
first gives the first horizon for which a
Gaussian random field should be generated. It is assumed that the
preceding horizons have already been simulated.
first
greater than 1 is suitable in the following situation.
Assume the random fields for all horizons of the profile
have been generated. Then the random field parameter of the nth
horizon is changed. For updating the simulated random fields it
suffices now to call simulateHorizons by first=n |
what |
what is a second parameter afer first that
is used to determine the starting point of the updating procedure:
|
PrintLevel |
If non-positive nothing is printed. The higher the number the more information is given on during the calculations. |
message |
function that has a string as argument. message
is called for printing error messages and for the current stage of
the calculations. message is called independently of the
value of PrintLevel . message is intended to be used
for messages on graphical devices.
|
stone.trials |
number of trials to find a realisation for the spatial
distributions of the stones before simulate.stones gives up. |
List of the same format as the output of xswms2d
.
The following elements are changed in general
random.seed |
The random seed for the simulation of the Gaussian
random fields. It is changed when what='all' or
random.seed has been NULL |
stone.random.seed |
The random seed for the simulation of the
stones. It is changed when what%in% c('all','stone') or
stone.random.seed has been NULL |
root.random.seed |
The random seed for the simulation of the
roots. It is changed when what=%in% c('all','stone','root') or
root.random.seed has been NULL |
RF |
the simulations of the Gaussian random fields |
Stone.RF |
the simulations of the profile including the values for the
stones, see also create.stones |
Root.RF |
the simulations of the profile including the root
values if $rf.Kf=TRUE , see also create.roots |
rf.complete |
logical. rf.complete is FALSE if the
simulation has not been completed (because of an error).
|
As a side effect the global variable .Random.seed
is reset.
Martin Schlather, martin.schlather@math.uni-goettingen.de http://www.stochastik.math.uni-goettingen.de/institute
Schlather, M. (2001) Simulation and analysis of random fields R News bf{1} (2), 18-20.
h <- xswms2d(xlim=c(1, 50), ylim=c(1, 50), step=1, new=NULL) h$n <- 2 ## define a second h$H2 <- h$H1 h$H2$type <- "H" ## genuine horizon, not polygon ## coordinates of the boundary segments between the horizons h$H2$points <- list(x=seq(1, 100, 5)) ## x coordinates h$H2$points$y <- 40 + 20 * cos(h$H2$points$x / 5) ## y coordinates ## Gaussian random field of the second horizon is pure nugget effect: h$H2$model <- list(model=list(list(model='nugget', var=0.5, scale=1)), mean=0.5) h$H2$stone$lambda <- 0.005 ## intensity of the stones in the 2nd horizon h <- calculate.horizons(h) for (i in 1:2) { plotRF(simulateHorizons(h)) ## readline("Press return") }