fordyn_scenario.Rd
Evaluates forest dynamics over a landscape including climate and management scenarios
fordyn_scenario(
sf,
SpParams,
meteo = NULL,
management_scenario,
volume_function = NULL,
local_control = defaultControl(),
dates = NULL,
CO2ByYear = numeric(0),
summary_function = NULL,
summary_arguments = NULL,
parallelize = FALSE,
num_cores = detectCores() - 1,
chunk_size = NULL,
progress = TRUE
)
An object of class sf
with the following columns:
geometry
: Spatial geometry.
id
: Stand identifiers.
elevation
: Elevation above sea level (in m).
slope
: Slope (in degrees).
aspect
: Aspect (in degrees).
forest
: Objects of class forest
.
soil
: Objects of class soil
.
state
: Objects of class spwbInput
or growthInput
(optional).
meteo
: Data frames with weather data (required if parameter meteo = NULL
).
management_unit
: Management unit corresponding to each stand.
represented_area
: Area represented by each stand (in hectares).
A data frame with species parameters (see SpParamsMED
).
Meteorology data (see fordyn_spatial
).
A list defining the management scenario (see create_management_scenario
)
A function accepting a forest object as input and returning the wood volume (m3/ha) corresponding to each tree cohort. If NULL, the default volume function is used (not recommended!).
A list of local model control parameters (see defaultControl
).
A Date
object with the days of the period to be simulated. If NULL
, then the whole period of meteo
is used.
A named numeric vector with years as names and atmospheric CO2 concentration (in ppm) as values. Used to specify annual changes in CO2 concentration along the simulation (as an alternative to specifying daily values in meteo
).
An appropriate function to calculate summaries from an object of class 'fordyn' (e.g., summary.fordyn
).
List with additional arguments for the summary function.
Boolean flag to try parallelization (will use all clusters minus one).
Integer with the number of cores to be used for parallel computation.
Integer indicating the size of chunks to be sent to different processes (by default, the number of spatial elements divided by the number of cores).
Boolean flag to display progress information for simulations.
An list of class 'fordyn_scenario' with the following elements:
sf
: An object of class 'sf' containing four elements:
geometry
: Spatial geometry.
id
: Stand id, taken from the input.
state
: A list of spwbInput
or growthInput
objects for each simulated stand, to be used in subsequent simulations (see update_landscape
).
forest
: A list of forest
objects for each simulated stand (only in fordynspatial
), to be used in subsequent simulations (see update_landscape
).
management_arguments
: A list of management arguments for each simulated stand (only in fordynspatial
), to be used in subsequent simulations (see update_landscape
).
tree_table
: A list of data frames for each simulated stand, containing the living trees at each time step.
shrub_table
: A list of data frames for each simulated stand, containing the living shrub at each time step.
dead_tree_table
: A list of data frames for each simulated stand, containing the dead trees at each time step.
dead_shrub_table
: A list of data frames for each simulated stand, containing the dead shrub at each time step.
cut_tree_table
: A list of data frames for each simulated stand, containing the cut trees at each time step.
cut_shrub_table
: A list of data frames for each simulated stand, containing the cut shrub at each time step.
summary
: A list of model output summaries for each simulated stand (if summary_function
was not NULL
).
volumes
: A data frame with extracted volumes (m3) by species and year. In demand-based scenarios target volumes are also included.
Management is implemented using the defaultManagementFunction
in medfate,
meaning that management parameters need to follow the structure of defaultManagementArguments
if (FALSE) {
# Load example landscape data
data("example_ifn")
# Load example meteo data frame from package meteoland
data("examplemeteo")
#Prepare a three-year meteorological data
meteo_01_03 <- rbind(examplemeteo, examplemeteo, examplemeteo)
row.names(meteo_01_03) <- seq(as.Date("2001-01-01"),
as.Date("2003-12-31"), by="day")
# Load default medfate parameters
data("SpParamsMED")
# Creates scenario with one management unit and annual demand for P. nigra
scen <- create_management_scenario(1, c("Pinus nigra" = 2300))
# Assign management unit to all stands
example_ifn$management_unit <- 1
# Assume that each stand represents 1km2 = 100 ha
example_ifn$represented_area <- 100
# Launch simulation scenario
res <- fordyn_scenario(example_ifn, SpParamsMED, meteo = meteo_01_03,
volume_function = NULL, management_scenario = scen,
parallelize = TRUE)
}