sitree: Individual Tree Simulator

Description Usage Arguments Value Author(s) Examples

View source: R/sitree.R

Description

Simulates the growth of individual trees in several plots, including management and keeping record of dead and removed trees. It can also include the effect of external modifiers such as climate change.

Usage

1
2
sitree(tree.df, stand.df, functions, n.periods = 5, period.length,
mng.options = NA, print.comments = FALSE,..., ext.mod.first = TRUE)

Arguments

tree.df

A data frame with individual tree data. It should include four columns named 'plot.id' (an ID for the plot/stand that the tree belongs to), treeid (a unique ID for the tree), dbh (a measure of horizontal dimension), height (a measure of vertical dimension), tree.sp (tree species)

stand.df

A data frame or list with neccessary data on the stand (e.g. slope, site index). It should include a 'plot.id' that matches the one in tree.df and a 'plot.size.m2', the plot size in m2. 'plot.size.m2' is only used in the summary.sitree function to calculate figures by ha.

functions

A list describing the basic functions. It should include a minimum of a function for growth (fn.growth), for diameter (or basal area) increment, for height increment (height.korf), mortality (fn.mort), recruitment (fn.recr), management (fn.management), tree removal (fn.tree.removal), and external modifiers (fn.modif). fn.management, fn.tree.removal, and fn.modif, can be missing.

n.periods

Number of periods to simulte (numeric).

period.length

The length of the periods (e.g. 5 years).

mng.options

Management options and definitions to be passed further.

print.comments

TRUE/FALSE Print comments. It is meant to help debugging new functions.

...

Further arguments to pass to functions used during simulation.

ext.mod.first

If TRUE (default) the external modifier functions will be run before fn.prep.common.vars.

Value

Returns a list with all live, dead, removed trees, and some plot information like stand age in years at each period, and management applied at each plot at each period.

Author(s)

Clara Anton Fernandez [email protected]

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
result.sitree <- sitree (tree.df   = tr,
                           stand.df  = fl,
                           functions = list(
                             fn.growth     = 'grow.dbhinc.hgtinc',
                             fn.dbh.inc = "dbhi.BN2009",
                             fn.hgt.inc =  "height.korf", 
                             fn.mort       = 'mort.B2007',
                             fn.recr       = 'recr.BBG2008',
                             fn.management = 'management.prob',
                             fn.tree.removal = 'mng.tree.removal',
                             fn.modif      = NULL, #'ext.modif.fun',
                             fn.prep.common.vars = 'prep.common.vars.fun'
                           ),
                           n.periods = 5,
                           period.length = 5,
                           mng.options = NA,
                           print.comments = FALSE,
                           species.spruce = c(1, 2, 3),
                           species.pine = c(10, 11, 20, 21, 29),
                           species.harw = c(30, 31),
                           fun.final.felling = "harv.prob",
                           fun.thinning      = "thin.prob",
                           'BN2009',
                           'BBG2008', 'SBA.m2.ha', 'spp','pr.spru.ba', 'QMD.cm',
                           per.vol.harv = 0.83
                           )
str(result.sitree)
set.seed(2017)
result.sitree <- sitree (tree.df   = stand.west.tr,
                           stand.df  = stand.west.st,
                           functions = list(
                             fn.growth     = 'grow.dbhinc.hgtinc',
                             fn.dbh.inc = "dbhi.BN2009",
                             fn.hgt.inc =  "height.korf", 
                             fn.mort       = 'mort.B2007',
                             fn.recr       = 'recr.BBG2008',
                             fn.management = NULL,
                             fn.tree.removal = NULL,
                             fn.modif      = NULL, 
                             fn.prep.common.vars = 'prep.common.vars.fun'
                           ),
                           n.periods = 20,
                           period.length = 5,
                           mng.options = NA,
                           print.comments = FALSE,
                           species.spruce = c(1, 2, 3),
                           species.pine = c(10, 11, 20, 21, 29),
                           species.harw = c(30, 31),
                           'BN2009',
                           'BBG2008', 'SBA.m2.ha', 'spp','pr.spru.ba', 'QMD.cm'
                         )

sitree documentation built on Oct. 25, 2018, 5:04 p.m.