IFNdynamics: Forest dynamics

Description Usage Arguments Details Value See Also Examples

View source: R/IFNdynamics.R

Description

Simulates one or several steps of forest dynamics, including growth, mortality and ingrowth processes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
IFNdynamics(
  treeData,
  plotData,
  nb = NULL,
  NspNmatrix = NULL,
  numYears = 10,
  numSteps = 1,
  min.N = 1e-05,
  ingrowth = TRUE,
  thresholdIngrowth = FALSE,
  height = TRUE,
  heightgrowth = FALSE,
  useProvince = TRUE,
  useRP = TRUE,
  mergeTrees = FALSE,
  killVeryLargeTrees = TRUE,
  removeCutTrees = TRUE,
  pastGrowthMortalityEffect = FALSE,
  applyMortalityInManagedStands = TRUE,
  stochastic = FALSE,
  fire = FALSE,
  numRuns = 1,
  variable.radius = FALSE,
  sequence = FALSE,
  dead.table = FALSE,
  recr.labels = TRUE,
  speciesNames = TRUE,
  verbose = FALSE
)

Arguments

treeData

A data frame with tree records in rows and columns 'ID', 'Species', 'DBH' (in cm) and 'N' (ha-1). Additionally, column 'OIFFIN' may be defined to indicate trees that are signaled to be cut during the following step.

plotData

A data frame with plot 'ID' as row names and columns 'SWHC' (mm), 'Rad' (MJ), 'Temp' (degrees C), 'Prec' (mm), 'PET' (mm) and 'slope' (degrees). An additional column 'Step' with integer values ('1', '2', etc.) may be used to indicate temporal variation in environmental conditions. In this case 'ID' should also be provided as column, not row names, because plot IDs will not be unique. An additional column 'Province' may be used to specify Spanish province.

nb

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

NspNmatrix

A numeric matrix with the density proportion of each species (columns) in each plot (rows).

numYears

An integer or integer vector with the number of years corresponding to one time step (by default 10-yr time steps are assumed)

numSteps

Number of time steps to simulate (normally, 1 step = 10 years). If temporal variation of environmental data is desired, values of column 'Step' of plotData should be specified accordingly.

min.N

Minimum density (individuals/ha) to keep a tree record

ingrowth

Boolean flag to simulate ingrowth during simulation

thresholdIngrowth

Boolean flag to indicate that ingrowth should occur only when a given probability threshold is surpassed.

height

Boolean flag to estimate height of trees after dynamic simulation

heightgrowth

Boolean flag to estimate height increment whenever possible, instead of using static height models

useProvince

A flag to indicate that province information should be used in growth/height estimation.

useRP

A flag to indicate that "region de procedencia" should be used in growth/height estimation

mergeTrees

Flag to indicate that tree records of similar diameter, low density and the same species (not including ingrowth of the current step) should be merged to avoid accumulation of tree records.

killVeryLargeTrees

Flag to indicate that trees with diameters larger than species-specific thresholds should be forced to die.

removeCutTrees

Boolean flag to indicate that trees signaled as cut in 'OIFFIN' should be removed from the output

pastGrowthMortalityEffect

Flag to indicate that the model should use previous diameter increment to determine mortality (whenever possible).

applyMortalityInManagedStands

Flag to indicate that mortality should also be applied in stands with observed management (BAL.ext).

stochastic

Boolean flag to indicate that simulation of growth, mortality and ingrowth should be stochastic (i.e. non-deterministic)

fire

Boolean flag to indicate that simulations should include stochastic burning of plots (see IFNfire).

numRuns

Number of stochastic runs (only applicable if stochastic = TRUE)

variable.radius

A flag to indicate that sampling is with variable radius (this forces changes in density when growth in tree diameters involves changes in sampling radius).

sequence

Boolean flag to indicate that the sequence of tree lists by step should be returned, instead of only the final tree list. If sequence = TRUE, an additional column 'Step' is added to the output.

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.

recr.labels

Boolean flag to indicate whether ingrowth records should be labelled in the output. recr.labels = TRUE results in a true/false column 'Ingrowth' being added to the output.

speciesNames

Boolean flag to indicate that species names should be added to the output.

verbose

Boolean flag to indicate console output of the process

Details

The function checks whether plot IDs in treeData exist as row names of plotData and whether species codes in treeData have models defined. If plotData contains field 'Province', this will be used to overwrite any province especification in treeData. Option stochastic = TRUE causes the models to be run in stochastic mode, which means that: (a) binomial draws are made for each tree to determine survival; (b) predicted growth (e.g. diameter increment) is stochastic (Gamma distribution); (c) Ingrowth density is stochastic (Gamma distribution coupled to a binomial draw); (d) Ingrowth diameter is stochastic (Gamma distribution).

When running the function with spatial dependencies, local recruitment is still performed using submodel 'IFNingrowth' but colonization of new species is determined using submodel 'IFNingrowthdisp' (because this latter submodel underestimates recruitment from species already present in the plot).

Value

If dead.table=FALSE it returns a data frame with tree records in rows and columns 'ID', ('Step'), 'Species', ('Name'), 'DBH', 'N' , ('Ingrowth'), and ('H') depending on the selected output options (i.e. sequence, speciesNames, height and recr.labels). If dead.table=FALSE, it returns a list with two element, one named out with live trees (at the end of the simulation or, if sequence=TRUE the sequence of trees for all steps) and another called dead with dead trees for each time step.

See Also

IFNsubmodels

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Load example tree data (two forest plots)
data(exampleTreeData)
head(exampleTreeData)

# Load IFN environmental data
data(plotDataIFN)
head(plotDataIFN)

# Load Regiones de Procedencia for IFN plots
data(plotRPIFN)
# Add Regiones de Procedencia to plot data
plotDataIFN = cbind(plotDataIFN, plotRPIFN)

# Run
IFNdynamics(exampleTreeData, plotDataIFN)

# Run with dispersal effects
data(examplePlotCoords)
nb = IFNknn(examplePlotCoords, k = 1)
Nmatrix = tapply(exampleTreeData$N, list(exampleTreeData$ID, exampleTreeData$Species),
                 sum, na.rm=T)
NspNmatrix = sweep(Nmatrix, 1, rowSums(Nmatrix, na.rm=T), "/")
NspNmatrix = rbind(NspNmatrix,c(0.5, NA, NA, NA))
rownames(NspNmatrix)[4] = "80003"
NspNmatrix = cbind(NspNmatrix, c(NA,NA,NA,0.5))
colnames(NspNmatrix)[5] = "25"
IFNdynamics(exampleTreeData, plotDataIFN, nb = nb, NspNmatrix = NspNmatrix)

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