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
)

Arguments

name

char. Model name (if NULL the timestamp will be used).

path

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).

global

df. Global parameters (e.g. TROLLv3_input or using generate_parameters()).

species

df. Species parameters (e.g. TROLLv3_species).

climate

df. Climate parameters (e.g. TROLLv3_climatedaytime12).

daily

df. Daily variation parameters (e.g. TROLLv3_daytimevar).

lidar

df. Lidar simulation parameters (e.g. using generate_lidar()), if null not computed (default NULL).

forest

df. TROLL with forest input, if null starts from an empty grid (default NULL) (e.g. using TROLLv3_output with get_forest()).

load

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.

verbose

bool. Show TROLL log in the console.

overwrite

bool. Overwrite previous outputs folder and files.

thin

int. Vector of integers corresponding to the iterations to be kept to reduce output size, default is NULL and corresponds to no thinning.

Value

A trollsim() object.

See also

Examples

# \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 
#> 
# }