This function implements a linear model with scalar modifier for inputs and compartmental matrix.
linearScalarModel(
t,
A,
C0,
u,
gamma,
xi,
xi_lag = 0,
solver = deSolve.lsoda.wrapper
)
A Model Object that can be further queried
A vector containing the points in time where the solution is sought.
A square (n x n) matrix with compartmental structure
A vector of length n containing the initial amount of carbon for the n pools.
A vector of length n with constant mass inputs for the n pools.
A scalar or data.frame object specifying the modifier for the mass inputs.
A scalar, data.frame, function or anything that can be
converted to a scalar function of time ScalarTimeMap
object specifying the external (environmental and/or edaphic) effects on
decomposition rates.
A time shift/delay for the automatically created time dependent function xi(t)
A function that solves the system of ODEs. This can be
euler
or deSolve.lsoda.wrapper
or any other user
provided function with the same interface.
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.
RothCModel
. There are other
predefinedModels
and also more general functions like
Model
.
t=seq(0,52*200,1) # Fix me! Add an example.
Run the code above in your browser using DataLab