This document describes how to run a growth model of medfate
. This document is meant to teach users to run the simulation model within R. All the details of the model design and formulation can be found at https://vegmod.ctfc.cat/software/medfate.
Any forest growth model needs information on climate, vegetation and soils of the forest stand to be simulated. Moreover, since models in medfate
differentiate between species, information on species-specific model parameters is also needed. In this subsection we explain the different steps (including optional pathways) to prepare all the data needed to run function growth()
.
Simulation models in medfate
require information on the physical attributes of soil, namely soil depth, texture, bulk density and rock fragment content. Soil information needs to be entered as a data frame with soil layers in rows and physical attributes in columns. The model accepts different layer definitions (from one to five layers). Soil physical attributes can be initialized to default values, for a given number of layers, using function defaultSoilParams()
:
## widths clay sand om bd rfc
## 1 300 25 25 NA 1.5 20
## 2 700 25 25 NA 1.5 40
where widths
are soil layer widths in mm; clay
and sand
are the percentage of clay and sand, in percent of dry weight, om
stands for organic matter, bd
is bulk density (in g·cm\(^{-3}\)) and rfc
the percentage of rock fragments. Because soil properties vary strongly at fine spatial scales, ideally soil physical attributes should be measured on samples taken at the forest stand to be simulated. For those users lacking such data, soil properties modelled at larger scales are available via soilgrids.org (see function soilgridsParams()
).
The soil input for function growth()
is actually an object of class soil
that is created using a function with the same name:
## [1] "SoilDepth" "W" "SWE" "Temp" "Ksoil"
## [6] "Gsoil" "dVec" "sand" "clay" "om"
## [11] "usda_Type" "VG_alpha" "VG_n" "VG_theta_res" "VG_theta_sat"
## [16] "macro" "rfc"
In addition to the physical soil description, this object contains soil parameters needed for soil water balance simulations. For example, macro
specifies the macroporosity of each layer; Gsoil
and Ksoil
are parameters needed to model infiltration of water into the soil. With VG_PTF = "Toth"
, we specify that van Genuchten parameters are estimated from texture using the pedotransfer functions of Toth et al (2015). The details of all elements in the soil object can be found in the help page for function soil()
.
The soil object is also used to store the moisture degree of each soil layer. In particular, W
contains the state variable that represents moisture (i.e. the proportion of moisture relative to field capacity), which is normally initialized to 1 for each layer:
## [1] 1 1
Analogously, Temp
contains the temperature (in degrees) of soil layers, initialized to missing values:
## [1] NA NA
It is important to remember that, unlike normal objects in R, any simulation will modify the values of state variables in soil object. That is, the state of the soil at the end of the simulated process (i.e. W
) will be stored (the same for Temp
). Hence, one can use the same object to simulate water balance sequentially and the final state of one simulation is the initial state of the next.
At any time, one can print the status of the soil object using its print
function:
## Soil depth (mm): 1000
##
## Layer 1 [ 0 to 300 mm ]
## clay (%): 25 silt (%): 50 sand (%): 25 organic matter (%): NA [ Silt loam ]
## Rock fragment content (%): 20 Macroporosity (%): 5
## Theta WP (%): 14 Theta FC (%): 30 Theta SAT (%): 49 Theta current (%) 30
## Vol. WP (mm): 34 Vol. FC (mm): 73 Vol. SAT (mm): 118 Vol. current (mm): 73
## Temperature (Celsius): NA
##
## Layer 2 [ 300 to 1000 mm ]
## clay (%): 25 silt (%): 50 sand (%): 25 organic matter (%): NA [ Silt loam ]
## Rock fragment content (%): 40 Macroporosity (%): 5
## Theta WP (%): 14 Theta FC (%): 30 Theta SAT (%): 49 Theta current (%) 30
## Vol. WP (mm): 60 Vol. FC (mm): 127 Vol. SAT (mm): 207 Vol. current (mm): 127
## Temperature (Celsius): NA
##
## Total soil saturated capacity (mm): 325
## Total soil water holding capacity (mm): 200
## Total soil extractable water (mm): 126
## Total soil current Volume (mm): 200
## Water table depth (mm): 1000
##
## Snow pack water equivalent (mm): 0
The modelled moisture content of the soil depends on the water retention curve used to represent the relationship between soil volumetric water content (\(\theta\); %) and soil water potential (\(\Psi\); MPa). By default the Saxton equations are used as water retention curve, but the user may choose to follow Van Genuchten - Mualem equations, which will give different values for the same texture:
## Soil depth (mm): 1000
##
## Layer 1 [ 0 to 300 mm ]
## clay (%): 25 silt (%): 50 sand (%): 25 organic matter (%): NA [ Silt loam ]
## Rock fragment content (%): 20 Macroporosity (%): 5
## Theta WP (%): 13 Theta FC (%): 29 Theta SAT (%): 42 Theta current (%) 29
## Vol. WP (mm): 32 Vol. FC (mm): 68 Vol. SAT (mm): 102 Vol. current (mm): 68
## Temperature (Celsius): NA
##
## Layer 2 [ 300 to 1000 mm ]
## clay (%): 25 silt (%): 50 sand (%): 25 organic matter (%): NA [ Silt loam ]
## Rock fragment content (%): 40 Macroporosity (%): 5
## Theta WP (%): 13 Theta FC (%): 30 Theta SAT (%): 42 Theta current (%) 30
## Vol. WP (mm): 54 Vol. FC (mm): 127 Vol. SAT (mm): 178 Vol. current (mm): 127
## Temperature (Celsius): NA
##
## Total soil saturated capacity (mm): 280
## Total soil water holding capacity (mm): 196
## Total soil extractable water (mm): 128
## Total soil current Volume (mm): 196
## Water table depth (mm): 1000
##
## Snow pack water equivalent (mm): 0
While Saxton equations use texture and organic matter as inputs, the Van Genuchten-Mualem equations need other parameters, which are estimated using pedotransfer functions and their names start with VG_
. Functions soil_psi2thetaSX()
and soil_psi2thetaVG()
(and their counterparts) can be used to calculate volumetric soil moisture from the water potential using the two models. When simulating soil water balance, the user can choose among the two models (see control parameters below). The soil water balance model described in this vignette uses the van Genuchten-Mualem equations for water retention curves and rhizosphere conductance.
Simulation models in medfate
require a data frame with species parameter values. The package provides a default data set of parameter values for 89 Mediterranean species (rows), resulting from bibliographic search, fit to empirical data or expert-based guesses:
These species commonly occur in the Spanish forest inventory of Catalonia, but may not be sufficient for other areas. A large number of parameters (columns) can be found in SpParamsMED
:
## [1] "Name" "IFNcodes" "SpIndex"
## [4] "Group" "Order" "Family"
## [7] "GrowthForm" "Hmed" "Hmax"
## [10] "Z50" "Z95" "Zmax"
## [13] "a_ash" "a_bsh" "b_bsh"
## [16] "cr" "a_fbt" "b_fbt"
## [19] "c_fbt" "d_fbt" "a_cr"
## [22] "b_1cr" "b_2cr" "b_3cr"
## [25] "c_1cr" "c_2cr" "a_cw"
## [28] "b_cw" "PhenologyType" "LeafDuration"
## [31] "Sgdd" "SLA" "LeafDensity"
## [34] "r635" "pDead" "Al2As"
## [37] "WoodDensity" "LeafWidth" "minFMC"
## [40] "maxFMC" "LeafPI0" "LeafEPS"
## [43] "LeafAF" "StemPI0" "StemEPS"
## [46] "StemAF" "LigninPercent" "ParticleDensity"
## [49] "LeafLitterFuelType" "Flammability" "SAV"
## [52] "HeatContent" "gammaSWR" "alphaSWR"
## [55] "kPAR" "g" "Psi_Extract"
## [58] "Psi_Critic" "WUE" "pRootDisc"
## [61] "Gwmin" "Gwmax" "VCleaf_kmax"
## [64] "VCleaf_c" "VCleaf_d" "Kmax_stemxylem"
## [67] "VCstem_c" "VCstem_d" "Kmax_rootxylem"
## [70] "VCroot_c" "VCroot_d" "Narea"
## [73] "Vmax298" "Jmax298" "WoodC"
## [76] "RGRmax" "fHDmin" "fHDmax"
Not all parameters are needed for all models. The user can find parameter definitions in the help page of this data set. However, to fully understand the role of parameters in the model, the user should read the details of model design and formulation (https://vegmod.github.io/software/medfate).
Models included in medfate
were primarily designed to be ran on forest inventory plots. In this kind of data, the vegetation of a sampled area is described in terms of woody plants (trees and shrubs) along with their size and species identity. Forest plots in medfate
are assumed to be in a format that follows closely the Spanish forest inventory. Each forest plot is represented in an object of class forest
, a list that contains several elements. Among them, the most important items are two data frames, treeData
(for trees) and shrubData
for shrubs:
## $ID
## [1] "1"
##
## $patchsize
## [1] 10000
##
## $treeData
## Species N DBH Height Z50 Z95
## 1 54 168 37.55 800 750 3000
## 2 68 384 14.60 660 750 3000
##
## $shrubData
## Species Cover Height Z50 Z95
## 1 65 3.75 30 300 1500
##
## $herbCover
## [1] 10
##
## $herbHeight
## [1] 20
##
## attr(,"class")
## [1] "forest" "list"
Trees are expected to be primarily described in terms of species, diameter (DBH) and height, whereas shrubs are described in terms of species, percent cover and mean height.
Because the forest plot format is rather specific, simulation functions in medfate
allow starting in a more general way using two data frames, one with aboveground information (i.e. the leave area and size of plants) and the other with belowground information (i.e. root distribution). The aboveground data frame does not distinguish between trees and shrubs. It includes, for each plant cohort to be considered in rows, its species identity, height and leaf area index (LAI). While users can build their input data themselves, we use function forest2aboveground()
on the object exampleforestMED
to show how should the data look like:
## SP N DBH Cover H CR LAI_live LAI_expanded LAI_dead
## T1_54 54 168.000 37.55 NA 800 0.7150421 0.81670117 0.81670117 0
## T2_68 68 384.000 14.60 NA 660 0.6055642 0.79779523 0.79779523 0
## S1_65 65 5503.456 NA 3.75 30 0.9738889 0.08913325 0.08913325 0
Note that the call to forest2aboveground()
included species parameters, because species-specific values are needed to calculate leaf area from tree diameters or shrub cover. Columns N
, DBH
and Cover
are required for simulating growth, but not for soil water balance, which only requires columns SP
, H
(in cm), CR
(i.e. the crown ratio), LAI_live
, LAI_expanded
and LAI_dead
. Here plant cohorts are given unique codes that tell us whether they correspond to trees or shrubs, but the user can use other row identifiers as long as they are unique. In practice, the user only needs to worry to calculate the values for LAI_live
. LAI_live
and LAI_expanded
can contain the same LAI values, and LAI_dead
is normally zero. This is so because models update LAI_expanded
and LAI_dead
according to the leaf phenology of species.
Regarding belowground information, a matrix describing for each plant cohort, the proportion of fine roots in each soil layer. As before, we use function forest2belowground()
on the object exampleforestMED
to show how should the data look like:
## [1] 3000 3000
## 1 2
## T1_54 0.1933638 0.8066362
## T2_68 0.1933638 0.8066362
## S1_65 0.5554389 0.4445611
Function forest2belowground()
internally takes values of Z50
and Z95
and calls function root_ldrDistribution()
to estimate the distribution of fine roots according to the linear dose response model. For example the first row is:
root_ldrDistribution(exampleforestMED$treeData$Z50[1],
exampleforestMED$treeData$Z95[1],
examplesoil$dVec)
## [,1] [,2]
## [1,] 0.1933638 0.8066362
An analogous function root_conicDistribution()
can be used to estimate fine root distribution according to a cone. The user is free to build any numeric matrix for root distribution, as long as values in rows sum always one (i.e. we have proportions). Otherwise, functions root_conicDistribution()
and root_ldrDistribution()
can be used to calculate root distribution under specific assumptions.
Soil water simulations require daily weather inputs. The weather variables that are required depend on the complexity of the soil water balance model we are using. The complex simulation model requires precipitation, radiation, wind speed, min/max temparature and relative humitidy. Here we show an example of meteorological forcing data.
## MeanTemperature MinTemperature MaxTemperature Precipitation
## 2001-01-01 3.57668969 -0.5934215 6.287950 4.869109
## 2001-01-02 1.83695972 -2.3662458 4.569737 2.498292
## 2001-01-03 0.09462563 -3.8541036 2.661951 0.000000
## 2001-01-04 1.13866156 -1.8744860 3.097705 5.796973
## 2001-01-05 4.70578690 0.3288287 7.551532 1.884401
## 2001-01-06 4.57036721 0.5461322 7.186784 13.359801
## MeanRelativeHumidity MinRelativeHumidity MaxRelativeHumidity
## 2001-01-01 78.73709 65.15411 100.00000
## 2001-01-02 69.70800 57.43761 94.71780
## 2001-01-03 70.69610 58.77432 94.66823
## 2001-01-04 76.89156 66.84256 95.80950
## 2001-01-05 76.67424 62.97656 100.00000
## 2001-01-06 89.01940 74.25754 100.00000
## Radiation WindSpeed WindDirection PET
## 2001-01-01 12.89251 2.000000 172 1.3212770
## 2001-01-02 13.03079 7.662544 278 2.2185985
## 2001-01-03 16.90722 2.000000 141 1.8045176
## 2001-01-04 11.07275 2.000000 172 0.9200627
## 2001-01-05 13.45205 7.581347 321 2.2914449
## 2001-01-06 12.84841 6.570501 141 1.7255058
Simulation models in medfate
have been designed to work along with data generated from package meteoland
. The user is strongly recommended to resort to this package to obtain suitable weather input for soil water balance simulations.
Apart from data inputs, the behaviour of simulation models can be controlled using a set of global parameters. The default parameterization is obtained using function defaultControl()
:
The names of all control parameters are:
## [1] "verbose" "subdailyResults"
## [3] "defaultWindSpeed" "soilFunctions"
## [5] "snowpack" "drainage"
## [7] "unlimitedSoilWater" "plantWaterPools"
## [9] "poolOverlapFactor" "leafPhenology"
## [11] "unfoldingDD" "transpirationMode"
## [13] "cavitationRefill" "refillMaximumRate"
## [15] "verticalLayerSize" "gainModifier"
## [17] "costModifier" "costWater"
## [19] "cochard" "capacitance"
## [21] "klatstem" "klatleaf"
## [23] "taper" "numericParams"
## [25] "fracLeafResistance" "fracRootResistance"
## [27] "averageFracRhizosphereResistance" "Catm"
## [29] "ndailysteps" "thermalCapacityLAI"
## [31] "allocationStrategy" "nonStomatalPhotosynthesisLimitation"
## [33] "k_floem" "nonSugarConc"
## [35] "minimumSugarConc" "equilibriumLeafTotalConc"
## [37] "equilibriumSapwoodTotalConc"
Most of these parameters should normally be left to their default value. However, there are some that deserve explanation here:
verbose = FALSE
.transpirationMode
.A last step is needed before calling simulation functions. It consists in the compilation of all aboveground and belowground parameters and the specification of additional parameter values for each plant cohort, such as their light extinction coefficient or their response to drought. This is done by calling function growthInput()
and taking species parameter values from species parameter data:
If one has a forest
object, the growthInput
object can be generated in directly from it, avoiding the need to explicitly build aboveground and belowground data frames:
All the input information for forest data and species parameter values can be inspected by printing different elements of the input object, which are:
## [1] "control" "canopy" "cohorts"
## [4] "above" "below" "paramsPhenology"
## [7] "paramsAnatomy" "paramsInterception" "paramsTranspiration"
## [10] "paramsWaterStorage" "paramsGrowth" "paramsAllometries"
## [13] "internalPhenology" "internalWater" "internalCarbon"
## [16] "internalAllocation" "rings"
First, information about the cohort species is found in element cohorts
(i.e. code, species and name):
## SP Name
## T1_54 54 Pinus halepensis
## T2_68 68 Quercus ilex
## S1_65 65 Quercus coccifera
Element above
contains the aboveground structure data that we already know, but with additional columns that describe the estimated initial amount of sapwood area and carbon reserves (if required):
## SP N DBH Cover H CR LAI_live LAI_expanded LAI_dead
## T1_54 54 168.000 37.55 NA 800 0.7150421 0.81670117 0.81670117 0
## T2_68 68 384.000 14.60 NA 660 0.6055642 0.79779523 0.79779523 0
## S1_65 65 5503.456 NA 3.75 30 0.9738889 0.08913325 0.08913325 0
## SA Status
## T1_54 368.9739198 alive
## T2_68 82.6881515 alive
## S1_65 0.6445956 alive
As with the soil input object, the growthInput
object will be modified during simulations. In the case of growth()
, these modifications concern SA
, fastCstorage
, slowCstorage
, LAI_expanded
and LAI_dead
in element above
, as well as canopy variables.
Aboveground parameters related to plant transpiration can be seen in paramsTransp
:
## Psi_Extract Psi_Critic WUE pRootDisc
## T1_54 -2 -5.140000 6 0
## T2_68 -3 -7.130000 6 0
## S1_65 -4 -7.936105 6 0
Belowground parameters can be seen in below
and include root distribution as well as maximum root and rhizosphere conductances by soil layer:
## $Z
## [1] 300 300 150
##
## $V
## 1 2
## T1_54 0.1933638 0.8066362
## T2_68 0.1933638 0.8066362
## S1_65 0.5554389 0.4445611
##
## $Wpool
## 1 2
## T1_54 1 1
## T2_68 1 1
## S1_65 1 1
Parameters related to plant growth can be seen in paramsGrowth
and paramsAllometries
:
## WoodC RGRmax fHDmin fHDmax
## T1_54 0.4963636 0.001 100 120
## T2_68 0.4934416 0.001 100 120
## S1_65 0.4934416 0.001 NA NA
## Hmax Zmax Aash Absh Bbsh r635 Acr B1cr
## T1_54 2000.0 7500 NA NA NA 1.964226 1.50576 -0.706481
## T2_68 1421.8 3700 1.533547 0.6134487 0.7558145 1.805872 1.98539 -0.552000
## S1_65 180.0 NA 0.757100 0.6388122 0.5609432 2.289452 NA NA
## B2cr B3cr C1cr C2cr Acw Bcw
## T1_54 -0.078039 0.000182000 -0.007262 0.00000 0.6415296 0.7310
## T2_68 -0.013860 -0.000110736 -0.006850 -0.20101 0.5681897 0.7974
## S1_65 NA NA NA NA NA NA
Finally, note that one can play with plant-specific parameters for growth simulation (instead of using species-level values) by modifying manually the parameter values in this object.
In this vignette we will use one year of example meteorological data with the following precipitation and temperature seasonal trends:
## Initial soil water content (mm): 200.239
## Initial snowpack content (mm): 0
## Performing daily simulations ..................................... [update structural variables] done.
## Final soil water content (mm): 182.552
## Final snowpack content (mm): 0
## Change in soil water content (mm): -17.687
## Soil water balance result (mm): -17.687
## Change in snowpack water content (mm): 0
## Snowpack water balance result (mm): 0
## Water balance components:
## Precipitation (mm) 513
## Rain (mm) 462 Snow (mm) 51
## Interception (mm) 82 Net rainfall (mm) 380
## Infiltration (mm) 423 Runoff (mm) 8 Deep drainage (mm) 120
## Soil evaporation (mm) 42 Transpiration (mm) 279
In addition to all the plots that were available for result of simulations with function spwb()
, one can display the following information out of the output of function growth()
:
To inspect components of the plant carbon balance we can first display gross photosynthesis expressed as assimilation relative to biomass:
Then we can draw the respiration costs (maintenance and growth) in the same units:
Finally we can display the daily negative or positive balance of the plant, which determines changes in plant carbon pools:
Carbon assimilation and respiration rates define the dynamics of stored carbon, which in medfate is divided into two organs (leaves and sapwood) and two chemical compounds (soluble sugars and starch):
Leaf and sapwood area dynamics arising from the interplay between growth and senescence of tissues can be inspected using:
The corresponding daily growth rates can also be displayed:
The output object returned by function growth()
contains information of the year-by-year stand (aboveground) structure, starting with the initial one:
## $Initial
## SP N DBH Cover H CR LAI_live LAI_expanded LAI_dead
## T1_54 54 168.000 37.55 NA 800 0.7150421 0.81670117 0.81670117 0
## T2_68 68 384.000 14.60 NA 660 0.6055642 0.79779523 0.79779523 0
## S1_65 65 5503.456 NA 3.75 30 0.9738889 0.08913325 0.08913325 0
## SA Status
## T1_54 368.9739198 alive
## T2_68 82.6881515 alive
## S1_65 0.6445956 alive
##
## $Year_1
## SP N DBH Cover H CR LAI_live LAI_expanded
## T1_54 54 168.000 37.55 NA 800.00000 0.7150421 0.68466155 0.68466155
## T2_68 68 384.000 14.60 NA 660.00000 0.6055642 0.66969561 0.66969561
## S1_65 65 5503.456 NA 3.25654 27.95657 0.9738889 0.06331128 0.06331128
## LAI_dead SA Status
## T1_54 0.002549624 352.45134 alive
## T2_68 0.002493892 79.03993 alive
## S1_65 0.000534263 0.64215 alive
We can also display summarized stand information (leaf area index, basal area, etc.) using:
## $Initial
## SP N DBH Cover H CR LAI_live LAI_expanded LAI_dead
## T1_54 54 168.000 37.55 NA 800 0.7150421 0.81670117 0.81670117 0
## T2_68 68 384.000 14.60 NA 660 0.6055642 0.79779523 0.79779523 0
## S1_65 65 5503.456 NA 3.75 30 0.9738889 0.08913325 0.08913325 0
## SA Status
## T1_54 368.9739198 alive
## T2_68 82.6881515 alive
## S1_65 0.6445956 alive
##
## $Year_1
## SP N DBH Cover H CR LAI_live LAI_expanded
## T1_54 54 168.000 37.55 NA 800.00000 0.7150421 0.68466155 0.68466155
## T2_68 68 384.000 14.60 NA 660.00000 0.6055642 0.66969561 0.66969561
## S1_65 65 5503.456 NA 3.25654 27.95657 0.9738889 0.06331128 0.06331128
## LAI_dead SA Status
## T1_54 0.002549624 352.45134 alive
## T2_68 0.002493892 79.03993 alive
## S1_65 0.000534263 0.64215 alive