input_module: Module that process initial input information for future...

Description Usage Arguments Value Author(s) References Examples

View source: R/input_module.R

Description

It process input information for all future stand- or tree-level current calculations or simulations from the user. It completes missing information that is required later. It also makes the inventory processing of a given tree plot data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
input_module(
  ZONE = NA,
  AD = NA,
  AF = NA,
  HD = NA,
  SI = NA,
  N = NA,
  BA = NA,
  area = NA,
  type = "stand",
  comptype = "PY",
  ddiam = FALSE,
  NHA_model = 3,
  V_model = 1,
  T_model = 2,
  IADBH_model = 1,
  ATHIN = NA,
  BARp = NA,
  QD_ba = NA,
  FT.thin = NA,
  tree.list = NA
)

Arguments

ZONE

Growth zone (1, 2, 3, 4)

AD

Dominant age (years) of the stand at present

AF

Final dominant age (years) for simulation (if AD = AF no simulation is performed)

HD

Dominant height (m) of dominant specie in the current stand

SI

Site index (in m) at reference dominant age of 20 years of the stand

N

Vector of number of trees (trees/ha) of the stand (1: Rauli, 2: Roble, 3: Coigue, 4:Others)

BA

Vector of basal area (m2/ha) of the stand (1: Rauli, 2: Roble, 3: Coigue, 4:Others)

area

Area of plot from tree-list data (m2) (required only for type = 'tree' or 'comp')

type

Type of simulation required ('stand': stand-level, 'tree': tree-level, 'comp': compatibility) (default = 'stand')

comptype

Compatibility algorithm type ('PY': Proportional Yield, 'PG': Proportional Growth) (default = 'PY')

ddiam

If TRUE a diameter distribution is generated (required only for type = 'stand') (default = FALSE)

NHA_model

Number of model for N estimation (1:Original Reineke, 2:Re-fitted Reineke, 3:Reineke with correction factor) (default = 3)

V_model

Number of stand-level volume to use (1:with PNHAN, 2:without PNHAN) (required only for type = 'stand') (default = 1)

T_model

Type of selected taper model (1:zone specific, 2:all zones) (default = 2)

IADBH_model

Model to use for annual DBH increment (1, 2, 3, 4) (required only for type = 'tree' or 'comp') (default = 1)

ATHIN

Age for thinning (years) (must be between AD and AF)

BARp

Percentage of total basal area to remove (0-100) (required for ATHIN)

QD_ba

Ratio of quadratic diameter of stand before against after thinning

FT.thin

Vector of thinning decision for each tree belonging to the tree.list (0:to thin, 1:not to thin)

tree.list

Tree-list for a plot with columns: ID, SPECIE, DBH, HT, SS, FT (required only for type = 'tree')

Value

List of data input and parameters to be traspassed for downstream modules (mainly core_module)

Author(s)

S.A Gezan, S. Palmas and P. Moreno

References

Gezan, S.A. and Ortega, A. (2001). Desarrollo de un Simulador de Rendimiento para Renovales de Roble, Rauli y Coigue. Reporte Interno. Projecto FONDEF D97I1065. Chile

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
# Example 1: Input stand-level data to predict volume all from stand-level functions
BA <- c(36.5, 2.8, 1.6, 2.4)
N <- c(464, 23, 16, 48)
input <- input_module(ZONE=1, AD=28, HD=18.5, AF=40, N=N, BA=BA, type='stand',
                      ddiam=FALSE, V_model=1)
input$SI
input$sp.table
input$data.sim

# Example 2: Input stand-level data to predict volume by generating a diameter distribution
BA <- c(36.5, 2.8, 1.6, 2.4)
N <- c(464, 23, 16, 48)
stand <- input_module(ZONE=1, AD=28, HD=18.5, AF=28, N=N, BA=BA, type='stand',
                      ddiam=TRUE, T_model=2)
stand$sp.table
stand$data.sim
stand$DDist[5,,]
barplot(stand$DDist[5,,5], main='Diameter Distribution all species', xlab='DBH Class',
        names.arg=stand$DDist[5,,3], col='blue')

# Example 3: Input plot-level data to process inventory (no simulation)
tree.data <- plot_example
head(tree.data,10)  # Original data
tree.inv <- input_module(ZONE=1, AD=28, type='tree', area=500, tree.list=tree.data, T_model=2)
tree.inv$DOM.SP    # Dominant specie
tree.inv$SI        # Site index
tree.inv$SDIP      # Stand density index
tree.inv$data.sim  # Summary data
tree.inv$sp.table  # Stand-level table by species
head(tree.inv$tree.list,10) # Completed tree-level data
plot(tree.inv$tree.list$DBH, tree.inv$tree.list$HT, ylab='HT (m)', xlab='DBH (cm)',
     xlim=c(0,40), ylim=c(0, 25), type='p', col='blue')
tree.inv$DDist[5,,] # Generated diameter distribution for all trees

sgezan/Nothopack documentation built on April 25, 2021, 8:03 a.m.