IFNscenario: IFN scenario simulation engine

Description Usage Arguments Value Examples

View source: R/IFNscenario.R

Description

Performs simulations of forest dynamics including management prescriptions (on a demand-basis) for a set of forest plots

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
IFNscenario(
  treeData,
  plotData,
  prescription,
  strata,
  demand,
  nb = NULL,
  numSteps = 1,
  plotDataDyn = NULL,
  demandOffset = NULL,
  stepOffset = 0,
  as.CO2 = TRUE,
  sequence = FALSE,
  dead.table = FALSE,
  cut.table = FALSE,
  verbose = FALSE,
  ...
)

Arguments

treeData

A data frame with tree records in rows and columns 'ID', 'Species', 'DBH' (in cm), 'H (in m)' and 'N' (ha-1)

plotData

A data frame with plot 'ID' in rows and columns 'SWHC' (mm), 'Rad' (MJ), 'Temp' (degrees C), 'Prec' (mm), 'PET' (mm), 'slope' (degrees), 'Managed' (boolean) and 'Estrato' (stratum code). It can also include a column 'Area' (ha) with the surface corresponding to each forest plot. In this case, 'strata' will not be used.

prescription

A data frame with plots in rows (row names should be equal to 'ID' in tree data) and prescription options in columns (see IFNmanagement)

strata

A data frame with surface areas per stratum (see estratosIFN3). Used to determine the surface corresponding to each plot.

demand

A data frame with annual volume to be extracted by species (see defaultDemand)

nb

An object of class listw (see functions IFNknn and nb2listw).

numSteps

Number of steps to simulate (1 step = 10 years)

plotDataDyn

A data frame with dynamic plot data, with columns 'ID', 'Step', 'Temp' (degrees C), 'Prec' (mm) and 'PET' (mm)

demandOffset

Initial demand offset (for simulations continuing previous ones).

stepOffset

Offset of time steps to read dynamic plot data (for simulations continuing previous ones).

as.CO2

Boolean flag to indicate output as kg of CO2 instead of kg of dry weight (see IFNbiomass).

sequence

Boolean flag to indicate that the sequence of tree lists by step should be returned. If sequence = TRUE, an additional data frame is included in the output, called treeDataSequence. This table includes a column 'Step' to indicate the simulation step.

dead.table

Boolean flag to indicate that a table of trees dead during the simulation is also desired. This table includes a column 'Step' to indicate at which step the trees died.

cut.table

Boolean flag to indicate that a table of trees cut during the simulation is also desired. This table includes a column 'Step' to indicate at which step the trees were cut.

verbose

Boolean flag to indicate extra console output (reporting management interventions in each plot)

...

Additional options to be passed to function IFNdynamics

Value

A list with the following items:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
library(IFNread)
data(defaultDemand)
data(defaultPrescription)
data(estratosIFN3)
data(plotDataIFN)

accessfilesIFN3 = list.files("D:/Recerca/Datasets/IFN/Sources/IFN3/MSAccess/",
pattern = "*[.]accdb", full.names = T)

prov = 27 # Lugo

treeData = readPiesMayoresIFN3(accessfilesIFN3[prov])

IFNscenario(treeData, plotDataIFN, defaultPrescription,
            estratosIFN3[[prov]], defaultDemand[[prov]], numSteps = 3)

## End(Not run)

miquelcaceres/IFNdyn documentation built on Feb. 1, 2021, 10:55 a.m.