modelInput {medfate}R Documentation

Input for simulation models

Description

Functions spwbInput() and growthInput() take an object of class forest and a soil data input to create input objects for simulation functions spwb (or pwb) and growth, respectively.

Usage

spwbInput(x, soil, SpParams, control)

growthInput(x, soil, SpParams, control)

Arguments

x

An object of class forest.

soil

An object of class data.frame or soil, containing soil parameters per soil layer.

SpParams

A data frame with species parameters (see SpParamsDefinition and SpParamsMED).

control

A list with default control parameters (see defaultControl).

Details

Functions spwbInput() and growthInput() initialize inputs differently depending on control parameters.

IMPORTANT NOTE: Older function names forest2spwbInput and forest2growthInput are now deprecated, but they can still be used for back-compatibility.

Value

Function spwbInput() returns a list of class spwbInput with the following elements (rows of data frames are identified as specified by function plant_ID):

Function growthInput() returns a list of class growthInput with the same elements as spwbInput, but with additional information.

Author(s)

Miquel De Cáceres Ainsa, CREAF

See Also

resetInputs, spwb, soil, forest, SpParamsMED, defaultSoilParams, plant_ID

Examples

#Load example plot plant data
data(exampleforest)

# Example of aboveground parameters taken from a forest
# described using LAI and crown ratio
data(exampleforest2)

#Default species parameterization
data(SpParamsMED)


# Define soil with default soil params (4 layers)
examplesoil <- defaultSoilParams(4)

# Initialize control parameters using 'Granier' transpiration mode
control <- defaultControl("Granier")

# Prepare spwb input
spwbInput(exampleforest, examplesoil, SpParamsMED, control)
                
# Prepare input for 'Sperry' transpiration mode
control <- defaultControl("Sperry")
spwbInput(exampleforest,examplesoil,SpParamsMED, control)

# Prepare input for 'Sureau' transpiration mode
control <- defaultControl("Sureau")
spwbInput(exampleforest,examplesoil,SpParamsMED, control)

# Example of initialization from a forest 
# described using LAI and crown ratio
control <- defaultControl("Granier")
spwbInput(exampleforest2, examplesoil, SpParamsMED, control)


[Package medfate version 4.4.0 Index]