Description Usage Arguments Value Author(s) References See Also Examples
This function creates a model for one pool. It is a wrapper for the more general function GeneralModel
.
1 2 | OnepModel(t, k, C0, In, xi = 1, solver = deSolve.lsoda.wrapper,
pass = FALSE)
|
t |
A vector containing the points in time where the solution is sought. |
k |
A scalar with the decomposition rate of the pool. |
C0 |
A scalar containing the initial amount of carbon in the pool. |
In |
A scalar or a data.frame object specifying the amount of litter inputs by time. |
xi |
A scalar or a data.frame specifying the external (environmental and/or edaphic) effects on decomposition rates. |
solver |
A function that solves the system of ODEs. This can be |
pass |
if TRUE forces the constructor to create the model even if it is invalid |
A Model Object that can be further queried
Carlos A. Sierra, Markus Mueller
Sierra, C.A., M. Mueller, S.E. Trumbore. 2012. Models of soil organic matter decomposition: the SoilR package version 1.0. Geoscientific Model Development 5, 1045-1060.
TwopParallelModel
,TwopFeedbackModel
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 34 35 36 37 38 39 40 41 | t_start=0
t_end=10
tn=50
timestep=(t_end-t_start)/tn
t=seq(t_start,t_end,timestep)
k=0.8
C0=100
In = 30
Ex=OnepModel(t,k,C0,In)
Ct=getC(Ex)
Rt=getReleaseFlux(Ex)
Rc=getAccumulatedRelease(Ex)
plot(
t,
Ct,
type="l",
ylab="Carbon stocks (arbitrary units)",
xlab="Time (arbitrary units)",
lwd=2
)
plot(
t,
Rt,
type="l",
ylab="Carbon released (arbitrary units)",
xlab="Time (arbitrary units)",
lwd=2
)
plot(
t,
Rc,
type="l",
ylab="Cummulative carbon released (arbitrary units)",
xlab="Time (arbitrary units)",
lwd=2
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.