Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

SoilR (version 1.2.107)

linearScalarModel: Implementation of a general model for linear non-autonomous systems with scalar modifiers

Description

This function implements a linear model with scalar modifier for inputs and compartmental matrix.

Usage

linearScalarModel(
  t,
  A,
  C0,
  u,
  gamma,
  xi,
  xi_lag = 0,
  solver = deSolve.lsoda.wrapper
)

Value

A Model Object that can be further queried

Arguments

t

A vector containing the points in time where the solution is sought.

A

A square (n x n) matrix with compartmental structure

C0

A vector of length n containing the initial amount of carbon for the n pools.

u

A vector of length n with constant mass inputs for the n pools.

gamma

A scalar or data.frame object specifying the modifier for the mass inputs.

xi

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.

xi_lag

A time shift/delay for the automatically created time dependent function xi(t)

solver

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.

References

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.

See Also

RothCModel. There are other predefinedModels and also more general functions like Model.

Examples

Run this code
t=seq(0,52*200,1) # Fix me! Add an example.  

Run the code above in your browser using DataLab