Functions to calculate PP rates in aquatic ecosystems. DO.PP.pond is a model functions are used as part of argument model to call simulation functions.

1 2 3 4 5 6 7 8 | ```
PP.Smith(L, Pmax, alpha)
PP.Thornley(L, Pmax, alpha, ksi)
PP.Steele(L, Pmax, Lopt)
PP.Eilers(L, Pmax, alpha, Lopt)
PPT.Smith(Ls,k,z,Pmax,alpha)
PPT.Steele(Ls,k,z,Pmax,Lopt)
PPrates.depth(z, param,sw.plot=T)
DO.PP.pond(t,p,x)
``` |

`L` |
sunlight intensity |

`Pmax` |
maximum rate |

`alpha` |
slope at L=0 |

`ksi` |
shape parameter |

`Lopt` |
sunlight at which PP is maximum |

`Ls` |
sunlight at the surface (actually just below surface) |

`k` |
sunlight attenuation coefficient |

`z` |
depth |

`param` |
parameter array c(k,Ls, Pmax,alpha,Lopt) |

`sw.plot` |
logical variable to decide whether to plot |

For DO.PP.pond

`t` |
time |

`p` |
parameters, an array |

`x` |
state variable |

The four functions PP.Smith, PP.Thornley, PP.Steele, and PP.Eilers calculate the response to sunlight by the Smith, Thornley, Steele, and Eilers-Peeters models.

PPT.Smith and PPT.Steele functions implement depth-averaged Smith and Steele models. In addition to the model parameters, they use sunlight at the subsurface, attenuation coefficient, and depth as arguments.

PPrates.depth calculates productivity as a function of depth using PPT.Smith and PPT.Steele.

PP and PPT functions return primary productivity rate. PPrates.depth returns a data.frame with z,L,PP,PPT Model functions: Rate of change or derivative of model.

Model functions are employed mainly to define the ODE to be simulated by sim, simd, simt and other simulation functions.

Nominal parameter values are defined in input files. Variation of param values are defined in lists.

Input files are in 'datafiles.zip' in directory 'datafiles' and organized by chapters of Acevedo (2012). Input files are required to run the examples below.

Miguel F. Acevedo Acevedo@unt.edu

Acevedo M.F. 2012. Simulation of Ecological and Environmental Models. CRC Press.

Simulation functions `sim`

, `simd`

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 42 43 44 | ```
## Not run:
L <- seq(0,300,10);nL <- length(L)
# Smith model
Pmax=1; alpha <- c(0.01,0.02,0.03)
np <- length(alpha)
PP <- matrix(nrow=nL,ncol=np)
for(i in 1:np)
PP[,i] <- PP.Smith(L,Pmax,alpha[i])
# Thornley NRH model
L <- seq(0,300,1);nL <- length(L)
Pmax=1; alpha <-c(0.01,0.02,0.03); ksi <- 0.1
np <- length(alpha)
PP <- matrix(nrow=nL,ncol=np)
for(i in 1:np)
PP[,i] <- PP.Thornley(L,Pmax,alpha[i],ksi)
# Steele model
Pmax=1; Lopt <- c(150,200,250)
np <- length(Lopt)
PP <- matrix(nrow=nL,ncol=np)
for(i in 1:np)
PP[,i] <- PP.Steele(L,Pmax,Lopt[i])
# Eiler-Peeters
Pmax=1; Lopt <- c(150,200,250); alpha=0.02
np <- length(Lopt)
PP <- matrix(nrow=nL,ncol=np)
for(i in 1:np)
PP[,i] <- PP.Eilers(L,Pmax,alpha,Lopt[i])
z <- seq(0,3,0.1)
k = 0.5; Ls=300
Pmax =1; alpha =0.02
Pmax =1; Lopt = 200
PPrates.depth(z, param=c(k,Ls,Pmax,alpha,Lopt))
# cool water
pond <- list(f=DO.PP.pond);param <- list(plab="Rsp",pval=c(0.18,0.2,0.22))
t.X <- sim(pond,"chp14/DO-PP-inp.csv", param)
## End(Not run)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.