This function generates the spatiotemporal dynamics based in the initial landscape, climate change and forest management

run_model(steps, initLand, managInt = c(0, 0, 0, 0), RCP = 0,
  stoch = TRUE, cores = 1, outputLand = NA, rangeLimitOccup = NULL,
  stateOccup = FALSE, saveOutput = FALSE, fileOutput = NULL,
  folderOutput = NULL)

Arguments

steps

numeric, the total number of steps to run the model. Here 1 step is equivalent to 5 years.

initLand

output object from the create_virtual_landscape or create_real_landscape function

managInt

vector, intensity of the four ordered management practices: plantation, harvest, thinning and enrichment plantation. Values must be bounded between 0 and 1, where 0 means the natural dynamics without forest management.

RCP

Numeric, Representative Concentration Pathway. Five scenarios of RCP are available: 0, 2.6, 4.5, 6 and 8.5

stoch

logical, if TRUE, the prevalence of each cell will depend in a probabilistic random generator. Otherwise the prevalence will be deterministic.

cores

numeric, the number of cores to be used in a parallel computation. The parallel is computed with the mclapply function. If cores = 1, a loop for will be used instead.

outputLand

vector, an integer vector to define the time steps to be saved at the end of the simulation. This argument is useful when we only need to compare the first and last time step outputLand = c(1, steps), or when the size of the landscape is too big so we need to reduce memory usage.

rangeLimitOccup

numeric between 0 and 1. If not NULL, the function will calculate the landscape position of the boreal trailing edge and the temperate leading edge for each time step. The defined value betwen 0 and 1 determines the minimum occupancy a row of the landscape must be occupied by a specific forest state to be considered part of the state range. E.g. if rangeLimitOccup = 0.8, the furthest row of the landscape with a proportion less than 0.8 will be considered the range limit of the state. Default is 0.85, but values ranging from 0.7 to 0.95 does not have much effect on migration rate (see figure 3 of sensitivity analysis). It returns a data frame.

stateOccup

logical, calculate the proportion of the four forest states for each row of the landscape for all time steps. This argument is useful when you need the information from each time step but cannot save all landscapes because of memory limitation. Returns a list with a data frame for each time step

saveOutput

logical, if TRUE it will save the output list in the 'output' directory with an automatic name with the main information from the simulation

fileOutput,

character, if not NULL, define the name of the file output

folderOutput,

character, if not NULL, define the name of the folder other than the default 'output'

Value

a list with the (i) landscape configuration for each step, (ii) scaled temperature gradient, (iii) steps, (iv) management intensity, (v) RCP scenario, (vi) landscape dimensions and (vii) range limit data frame

Examples

if (FALSE) { initLand = create_virtual_landscape(cellSize = 5) lands <- run_model(steps = 10, initLand, managInt = c(0.15, 0, 0, 0), RCP = 4.5, rangeLimitOccup = 0.75) }