troll()
run a TROLL
simulation. The minimal set of input files required
for a TROLL
run include (i) climate data for the focal location (climate
and daily
), (ii) functional traits for the list of species at the focal
location (species
), and (iii) global parameters (global
), i.e. parameters
that do not depend on species identity.
troll(
name = NULL,
path = NULL,
global,
species,
climate,
daily,
lidar = NULL,
forest = NULL,
load = TRUE,
verbose = TRUE,
overwrite = TRUE,
thin = NULL
)
char. Model name (if NULL the timestamp will be used).
char. Path to save the simulation outputs, the default is null corresponding to a simulation in memory without saved intermediary files (based on temporary files from option.rcontroll).
df. Global parameters (e.g. TROLLv3_input or using
generate_parameters()
).
df. Species parameters (e.g. TROLLv3_species).
df. Climate parameters (e.g. TROLLv3_climatedaytime12).
df. Daily variation parameters (e.g. TROLLv3_daytimevar).
df. Lidar simulation parameters (e.g. using generate_lidar()
),
if null not computed (default NULL).
df. TROLL with forest input, if null starts from an empty grid
(default NULL) (e.g. using TROLLv3_output with get_forest()
).
bool. TROLL outputs are loaded in R memory, if not only the path
and name of the simulations is kept in the resulting trollsim()
object
but the content can be accessed later using the load_sim()
method.
bool. Show TROLL log in the console.
bool. Overwrite previous outputs folder and files.
int. Vector of integers corresponding to the iterations to be kept to reduce output size, default is NULL and corresponds to no thinning.
A trollsim()
object.
# \donttest{
data("TROLLv3_species")
data("TROLLv3_climatedaytime12")
data("TROLLv3_daytimevar")
troll(
name = "test",
global = generate_parameters(
cols = 100, rows = 100,
iterperyear = 12, nbiter = 12 * 1
),
species = TROLLv3_species,
climate = TROLLv3_climatedaytime12,
daily = TROLLv3_daytimevar
)
#> Object of class : trollsim
#> Name : test
#> Path :
#> In memory : TRUE
#> Extended : TRUE
#> From data : FALSE
#> Lidar simulation : FALSE
#> Random : FALSE
#>
#> 2D discrete network: horizontal step = 1 m, one tree per 1 m^2
#> Number of sites : 100 x 100
#> Number of iterations : 12
#> Duration of timestep : 30.41667 days
#> Number of Species : 45
#>
# }