This vignette provides an overview of the
R package functions. We provide a working examples to demonstrates the
basic functionality and use of the package.
rTRIPLEXCWFlux package encodes the carbon uptake
submodule and evapotranspiration submodule of the
TRIPLEX-CW-Flux model to run the simulation of carbon-water
TRIPLEX-CW-Flux model is based on two
TRIPLEX-Flux model (Zhou et al.,
Penman–Monteith model (Monteith,
1965). In the R script, the user only needs to download and load the
rTRIPLEX-CW-Flux package, and then input the variables and
parameters of the model to obtain simulated results. This package
accelerates the running speed of the model and facilitates the
estimation of carbon sequestration and water consumption in different
forest ecosystems using extensive flux observed data.This could make
TRIPLEX-CW-Flux model free available and more popular in
To display the basic functionality of
package, a simple simulation will be performed using TRIPLEX-CW-Flux
model. The function of run TRIPLEX-CW-Flux model from R is
TRIPLEX_CW_Flux. After called, the function will run and
return the simulated results and charts for NEP and ET at 30 min scale,
and monthly variation of the input environmental factors.
Before running the
rTRIPLEXCWFlux R package, users need
to prepare the input variables and parameters required by the model, and
check whether the column name is consistent with that in internal data
in advance. You can use
data("Inputvariable") to see the information and format of
input variables and parameters tables, respectively.
In this example, we run a simulation for a Chinese fir plantation.
The input data are provided as internal data in
library(rTRIPLEXCWFlux) <-TRIPLEX_CW_Flux (Input_variable=Inputvariable, outInput_parameter=Inputpara, overyear = TRUE) head(out)
overyear=TRUE means that the input data is more than one
overyear=TRUE, The outputs of the
TRIPLEX_CW_Flux function are a long format dataframe and
charts of simulated result for net ecosystem productivity (NEP) and
evapotranspiration (ET) at 30 min scale, and monthly variation of the
input environmental factors. The first 18 columns of the dataframe are
input variables. The column names, definition for the table of input
variables is described in
data(Inputvariable) can load the table. The nineteenth and
twentieth columns are season and the number of seasons. The twenty-first
and twenty-second columns are the observed NEP and ET after the
conversion unit. The twenty-third column is the simulated net ecosystem
productivity, the twenty-fourth column is the simulated ET, the
twenty-fifth column is the estimated gross ecosystem productivity, and
the twenty-sixth column is the estimated ecosystem respiration.
i. the graph of Simulated ET results at 30 min scale in four seasons.
ii. the graph of Simulated NEP results at 30 min scale in four seasons.
iii. the graph of Simulated NEP and ET at 30 min scale during whole studied period.
iv. the graph of diurnal dynamics for observed and simulated NEP at 30 min scale during whole studied period.
v. the graph of diurnal dynamics for observed and simulated ET at 30 min scale during whole studied period.
vi. the graph of environmental factors during whole studied period.