File: Aquaphy.R

package info (click to toggle)
r-cran-desolve 1.40-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,592 kB
  • sloc: fortran: 18,729; ansic: 4,956; makefile: 11
file content (22 lines) | stat: -rw-r--r-- 691 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
aquaphy <- function(times, y, parms, PAR=NULL, ...) {

  if (length(y) != 4)
    stop ("length of state variable vector should be 4")
  if (length(parms) != 19)
    stop ("length of parameter vector should be 19")

  names(y) <- c("DIN","PROTEIN","RESERVE","LMW")
  outnames <- c("PAR","TotalN","PhotoSynthesis",
                "NCratio","ChlCratio","Chlorophyll")
  if (is.null(PAR))
    ode(y,times,dllname="deSolve",
      func="aquaphy",initfunc="iniaqua",
      parms=parms,nout=6,outnames=outnames,...)
  else
    ode(y,times,dllname="deSolve",
      func="aquaphyforc",initfunc="iniaqua",
      initforc="initaqforc",forcings=PAR,
      parms=parms,nout=6,outnames=outnames,...)

}