Package 'sitreeE'

Title: Sitree Extensions
Description: Provides extensions for package 'sitree' for allometric variables, growth, mortality, recruitment, management, tree removal and external modifiers functions.
Authors: Clara Anton Fernandez [aut, cre]
Maintainer: Clara Anton Fernandez <[email protected]>
License: GPL (>= 2)
Version: 0.0-8
Built: 2024-11-08 03:11:25 UTC
Source: https://github.com/cran/sitreeE

Help Index


Climate-sensitive site index models for Norway

Description

Implementation of models for climate-sensitive site index models for Norway as described in Antón-Fernández et al. (2016).

Usage

AM2016ClimateSensitiveSINorway(soilquality, t.early.summer, waterbal, SI.spp)

Arguments

soilquality

A factor with levels 1 to 5 indicating the soilquality category. 1 being the poorest soils and 5 the best soils

t.early.summer

A vector with sum temperatures (in C) in spring and early summer (april, june and july)

waterbal

A vector with the montly moisture surplus in June (difference between the 30-year mean precipitation in June and mean potential evapotranspiration in June.).

SI.spp

SI species, that is, the species for which SI should be calculated. 1 = spruce, 2 = pine, 3 = birch.

Value

Returns a vector with the estimated SI.

Author(s)

Clara Anton-Fernandez

References

Anton-Fernandez, Clara, Blas Mola-Yudego, Lise Dalsgaard, and Rasmus Astrup. 2016. “Climate-Sensitive Site Index Models for Norway.” Canadian Journal of Forest Research 46 (6). doi: 10.1139/cjfr-2015-0155

Examples

AM2016ClimateSensitiveSINorway (soilquality = as.factor(c(1,2,3,4)),
                                t.early.summer = c(10,20,30,10),
                                waterbal = c(-40, 20,10,10),
                                SI.spp = c(1,2,2,3))

Marklund's biomass equations

Description

Implements Marklund's (1988) biomass equations for above-ground biomass and Petersson and Ståhl (2006) for below-ground biomass.

Usage

biomass.spruce.M1988(dbh.cm, H.m)
biomass.pine.M1988(dbh.cm, H.m)
biomass.birch.M1988(dbh.cm, H.m)

Arguments

dbh.cm

A vector with the dbh (diameter at breast height) of the trees, in cm.

H.m

A vector with the heights of the trees, in meters.

Value

It returns a data.frame with the following biomass components in kg: living.branches, dead.branches, stem.wood, stump.roots, bark, usoil, rot1, rot2, and foliage.

Author(s)

Clara Anton Fernandez [email protected]

References

Marklund, L. G. 1988. “Biomassafunktioner för tall, gran och björk i Sverige [Biomass functions for pine, spruce and birch in Sweden].” Report 45. Umeå, Sweden: Swedish University of Agricultural Sciences. Department of Forest Survey. Petersson, Hans, and Göran Ståhl. 2006. “Functions for Below-Ground Biomass of Pinus Sylvestris, Picea Abies, Betula Pendula and Betula Pubescens in Sweden.” Scandinavian Journal of Forest Research 21 (S7): 84–93.

Examples

biomass.spruce.M1988(dbh.cm = c(10, 20), H.m = c(8, 12))

Implements biomass functions for birch for Norway from Smith et al (2014, 2016)

Description

Implements biomass functions for birch for Norway from Smith et al (2014, 2016). Total biomass aboveground does include stump calculated using biomass.birch.M1988. Total biomass belowground does not include stump.

Usage

biomass.birch.S2014(dbh.cm, H.m)

Arguments

dbh.cm

dbh (diameter at breast height) in cm.

H.m

Tree height in meters.

Details

It uses stump.roots from biomass.birch.M1988 to calculate aboveground biomass (in kg) and belowground biomass (in kg). Aboveground biomass is calculated as Smith's aboveground biomass (2014) + stump.roots. Belowground biomass is calcualted as Smith's belowground biomass (2016) - stump.roots.

Value

Returns a data.frame with the following biomass components: biomass.total.kg, biomass.aboveground.kg.S2014, biomass.belowground.kg.S2014, biomass.belowground.kg, biomass.aboveground.kg, living.branches, dead.branches, stem.wood, stump.roots, bark, usoil, rot1, rot2, foliage)

Author(s)

Clara Anton Fernandez ([email protected])

References

Smith, Aaron, Aksel Granhus, and Rasmus Astrup. 2016. “Functions for Estimating Belowground and Whole Tree Biomass of Birch in Norway.” Scandinavian Journal of Forest Research 31 (6): 568–82. https://doi.org/10.1080/02827581.2016.1141232 Smith, Aaron, Aksel Granhus, Rasmus Astrup, Ole Martin Bollandsås, and Hans Petersson. 2014. “Functions for Estimating Aboveground Biomass of Birch in Norway.” Scandinavian Journal of Forest Research 29 (6): 565–78. http://dx.doi.org/10.1080/02827581.2014.951389

See Also

biomass.birch.M1988

Examples

biomass.birch.S2014(dbh.cm = c(10, 20), H.m = c(12, 16))

Calculates biomass for trees using the Norwegian biomass equations

Description

Calculates biomass for trees using the Norwegian biomass equations.

Usage

biomass.norway.sitree(dbh.mm, height.dm, tree.sp)

Arguments

dbh.mm

Diameter at breast height in mm.

height.dm

Tree height in dm.

tree.sp

Tree species according to the Norwegian NFI. It will use biomass.spruce.M1988 when tree.sp is 1, 2, 3, 21, or 29, biomass.pine.M1988 when tree.sp is 10, 11, or 20, and biomass.birch.S2014 otherwise.

Value

Returns a data.table containing the 12 columns resulting from applying the biomass functions.

See Also

biomass.birch.S2014, biomass.pine.M1988, biomass.spruce.M1988

Examples

bio.nor <- biomass.norway.sitree (dbh.mm = c(50, 60, 100 ), height.dm = c(40, 60,
                                 80),
                       tree.sp = c(1, 10, 30))

Biomass for live, dead, or removed trees using Norwegian biomass functions

Description

Calculates biomass for trees using the Norwegian biomass equations.

Usage

biomass.sitree(tr, plot.data)

Arguments

tr

A trList or trListDead object.

plot.data

A data.frame or list with plot information. It should have at least plot.id and tree2ha.

Value

Returns a data.table containing the 12 columns resulting from applying the biomass functions.

Author(s)

Clara Anton Fernandez [email protected]

See Also

biomass.birch.S2014, biomass.birch.M1988, biomass.pine.M1988, biomass.spruce.M1988, biomass.norway.sitree

Examples

library(sitree)
 result.sitree <- sitree (tree.df   = stand.west.tr,
                            stand.df  = stand.west.st,
                            functions = list(
                              fn.growth     = 'grow.dbhinc.hgtinc',
                              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,
                            fn.dbh.inc = "dbhi.BN2009",
                            fn.hgt.inc =  "height.korf"
                          )

biom <- biomass.sitree(tr = result.sitree$live, plot.data = result.sitree$plot.data)

Mean height of X tallest trees

Description

It calculates the mean height of the X tallest trees by grouping variable (e.g. the plot ID)

Usage

height.of.X.tallest.trees(height, uplotID, num.trees)

Arguments

height

A vector with heights

uplotID

A vector with the grouping variable, most often this would be the plot ID.

num.trees

Number of trees used to calculate the mean height.

Value

It returns a data.frame with two columns containing the uplotID and the mean height of the X tallest trees.

Note

This function can be used to calculate the average of the X largest values of any variable grouped by a grouping variable. It is mostly a wrapper for aggregate.

Author(s)

Clara Antón Fernández ([email protected])

See Also

lorey.height

Examples

library(sitree)
height.of.X.tallest.trees(height = tr$height,
                               uplotID = tr$plot.id, 5)

Lorey's height

Description

Calculates Lorey's height (mean height weigted by basal area). If group.id is not NULL, it will calculate Lorey's height for each group.

Usage

lorey.height(BA, height, group.id = NULL)

Arguments

BA

A vector with the basal areas of the trees

height

A vector with the height of the trees

group.id

An optional vector with a grouping variable.

Value

If a grouping variable is provided it returns a data frame with two columns (group.id, and lorey.height). If a grouping variable is not provided it will return the Lorey's height.

Author(s)

Clara Anton Fernandez ([email protected])

See Also

height.of.X.tallest.trees

Examples

library(sitree)
BA <- pi*(tr$dbh/2)^2
lorey.height(BA, tr$height)
lorey.height(BA, tr$height, tr$plot.id)

Basal area of larger trees

Description

It calculates the basal area of larger trees for a plot.

Usage

PBAL(BA)

Arguments

BA

A vector of tree's basal area.

Value

It returns a vector with the sum of the basal areas of larger trees. Trees with similar BA are not considered larger.

Examples

PBAL(c(1,2,3,4,4))

Basal area of larger trees which are at least X cm larger than the tree of interest

Description

Calculates the basal area (in cm2 if dbh is in mm) of trees that are at least X (in the same units as dbh) larger than the tree of interest for a list of trees.

Usage

PBAL.dbh.greater(dbh.mm, dbh.mm.diff)

Arguments

dbh.mm

a vector of dbh in mm

dbh.mm.diff

minimum dbh difference between the tree and the tree of interest to be considered

Details

It estimates the basal area (in cm2) of trees that are at least dbh.mm.diff mm larger than the tree of interest.

Value

It returns a list with the basal area of larger trees.

Author(s)

Cara Antón-Fernández (email: [email protected])

See Also

PBAL

Examples

library(sitree)
PBAL.dbh.greater(c(100,89,51,74,4), 3)

aggregate(dbh ~ plot.id, data = tr, FUN = PBAL.dbh.greater, dbh.mm.diff = 2)

Convert Plot data to a data.frame/data.table format

Description

It attemps to convert the plot level information to a data.frame/data.list format. For example, if management is an element of the plot list (pd) it will melt it to a long format.

Usage

PlotDataToLong(pd)

Arguments

pd

A list with plot information. It especifically looks for two elements 'stand.age.years' and 'management'.

Value

It returns a data.table with all vector from pd as columns, and dataframes melted.

Examples

library(sitree)

result.sitree <- sitree (tree.df   = tr,stand.df  = fl,
                         functions = list(fn.growth     ='grow.dbhinc.hgtinc',
                                          fn.mort       ='mort.B2007',
                                          fn.recr       ='recr.BBG2008',
                                          fn.management ='management.prob',
                                          fn.tree.removal ='mng.tree.removal',
                                          fn.modif      = NULL,
                                          fn.prep.common.vars ='prep.common.vars.fun'),
                         n.periods = 5,
                         period.length = 5,mng.options = NA,
                         print.comments = FALSE,
                         fn.dbh.inc = "dbhi.BN2009",
                         fn.hgt.inc =  "height.korf",
                         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",per.vol.harv = 0.83)

PlotDataToLong(result.sitree$plot.data)

Top height of the n thickest trees

Description

Average height of the n thickest trees per ha

Usage

top.height(thickness, height, num.trees.per.ha, plot.id, plot.size.m2)

Arguments

thickness

A vector with the thickness for every tree. Other variables can be used instead to thickness. This is only used to order the trees.

height

Height of the trees.

num.trees.per.ha

Number of trees per ha that the top height should correspond to. E.g. 100 trees per ha.

plot.id

Vector with the plot.id to which every tree corresponds to.

plot.size.m2

Plot size in square meters. It can be either a single number if all plots have the same size of a vector of equal length as thickness, height, and plot.id with the corresponding plot size for each tree.

Details

thickness, height, and plot.id should have the same length, that is, one value per tree.

Value

It returns a data.frame with two columns: top.heights in the same units as height, and plot.id.

Examples

top.height(thickness = runif(100, 10,40), height = runif(100, 12, 45), 
    num.trees.per.ha = 100, plot.id = 1, plot.size.m2 = 250)

EStimation of individual tree age

Description

Estimates individual tree age of trees within a plot based on basal area, site index, species, and development class.

Usage

tree.age(stand.age.years, plot.id, tree.BA.m2, dbh.mm,
SI.spp, SI.m, spp, dev.class, apply.correction = TRUE)

Arguments

stand.age.years

The age of the stand in years.

plot.id

The unique ID of the stand

tree.BA.m2

A vector with the basal areas of each tree in m2.

dbh.mm

A vector with the DBH in mm of each tree.

SI.spp

Species for which SI has been calculated (1, 2, 3).

SI.m

Site index (SI) in m.

spp

Species group classification.

dev.class

Development class.

apply.correction

TRUE/FALSE. If a correction to age should be applied

Value

A vector with the estimated ages of trees

Author(s)

Clara Anton Fernandez [email protected]

Examples

tree.age(stand.age.years = 40,
        plot.id = c(1,1), tree.BA.m2 = c(0.05, 0.5),dbh.mm
        = c(50,150), SI.spp = 2, 
        SI.m = 11, spp = c(1,1), dev.class = 3, apply.correction = TRUE)

Volume for sitree output for Norwegian conditions

Description

It calculates volume following the Norwegian national forest inventory equations for a trList or trListDead object

Usage

volume.sitree(tr, plot.data)

Arguments

tr

a trListDead or trList object

plot.data

a list or data.frame containing at least a 'kom' and 'tree2ha' column/element. kom is the kommune (municipality) code, and tree2ha should be the expansion factor to go from tree to per ha basis.

Details

It uses the volume.norway function to estimate the volume for all trees with dbh.mm greater than 0. It returns NA when dbh.mm is 0 or lower. tree2ha is included to facilitate the calculation of per ha values.

Value

It returns a data.table with columns for treeid, plot.id, dbh.mm, height.dm, kom, tree2ha, tree.sp, vol.w.tr.m3 (volume with bark in m3 per tree), and vol.wo.tr.m3 (volume without bark in m3 per tree)

Author(s)

Clara Antón-Fernández (email: [email protected])

Examples

library(sitree)
res <- sitree (tree.df   = tr,
               stand.df  = fl,
               functions = list(
                 fn.growth     = 'grow.dbhinc.hgtinc',
                 fn.mort       = 'mort.B2007',
                 fn.recr       = 'recr.BBG2008',
                 fn.management = 'management.prob',
                 fn.tree.removal = 'mng.tree.removal',
                 fn.modif      = NULL, 
                 fn.prep.common.vars = 'prep.common.vars.fun'
               ),
               n.periods = 5,
               period.length = 5,
               mng.options = NA,
               print.comments = FALSE,
               fn.dbh.inc = "dbhi.BN2009",
               fn.hgt.inc =  "height.korf", 
               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",
                  per.vol.harv = 0.83
               )
volume.sitree(tr = res$live, plot.data = res$plot.data)