View source: R/cfp_layers_map.R
cfp_layers_map | R Documentation |
A function to create a cfp_layers_map object that defines the
layers of both fg_flux()
and pro_flux()
models.
cfp_layers_map(x, ...)
## S3 method for class 'cfp_dat'
cfp_layers_map(x, ...)
## S3 method for class 'data.frame'
cfp_layers_map(
x,
id_cols,
gas = NULL,
lowlim = NULL,
highlim = NULL,
layer_couple = 0,
...
)
A cfp_layered_profile()
data.frame
with the columns
described above as well as layer
and pmap
columns that identify
each layer with an integer (ascending from bottom to top).
Sometimes it is practical to model different gases with different limits. For example, it is a reasonable assumption that CO2 is not consumed in relevant amounts in most soils, whereas CH4 may be both produced or consumed. Therefore we may want to limit production rates of CO2 to only positive values, whereas allowing for negative CH4 production rates (i.e. consumption) as well.
To make this setup easy, you can provide a gas
vector to the function
together with highlim
and lowlim
vectors of the same length.
The provided layers_map
data.frame
will then be replicated for
each gas with the respective values of the production limits provided.
Other data formats:
cfp_dat()
,
cfp_gasdata()
,
cfp_layered_profile()
,
cfp_profile()
,
cfp_soilphys()
cfp_layers_map(
ConFluxPro::layers_map,
gas = "CO2",
lowlim = 0,
highlim = 1000,
id_cols = "site")
### add multiple gases at once
cfp_layers_map(
ConFluxPro::layers_map,
id_cols = "site",
gas = c("CO2", "CH4"),
lowlim = c(0, -1000),
highlim = c(1000, 1000))
### Extract from an existing cfp_dat
cfp_layers_map(ConFluxPro::base_dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.