| 1 |
\name{aquaphy} |
| 2 |
\alias{aquaphy} |
| 3 |
\title{A Physiological Model of Unbalanced Algal Growth} |
| 4 |
\description{A phytoplankton model with uncoupled carbon and nitrogen |
| 5 |
assimilation as a function of light and Dissolved Inorganic Nitrogen |
| 6 |
(DIN) concentration. |
| 7 |
|
| 8 |
Algal biomass is described via 3 different state variables: |
| 9 |
\itemize{ |
| 10 |
\item low molecular weight carbohydrates (LMW), the product of |
| 11 |
photosynthesis, |
| 12 |
\item storage molecules (RESERVE) and |
| 13 |
\item the biosynthetic and photosynthetic apparatus (PROTEINS). |
| 14 |
} |
| 15 |
All algal state variables are expressed in |
| 16 |
\eqn{\rm mmol\, C\, m^{-3}}{mmol C / m^3}. |
| 17 |
Only proteins contain nitrogen and |
| 18 |
chlorophyll, with a fixed stoichiometric ratio. As the relative |
| 19 |
amount of proteins changes in the algae, so does the N:C and the Chl:C |
| 20 |
ratio. |
| 21 |
|
| 22 |
An additional state variable, dissolved inorganic nitrogen (DIN) has |
| 23 |
units of \eqn{\rm mmol\, N\, m^{-3}}{mmol N / m^3}. |
| 24 |
|
| 25 |
The algae grow in a dilution culture (chemostat): there is constant |
| 26 |
inflow of DIN and outflow of culture water, including DIN and algae, |
| 27 |
at the same rate. |
| 28 |
|
| 29 |
Two versions of the model are included. |
| 30 |
|
| 31 |
\itemize{ |
| 32 |
\item In the default model, there is a day-night illumination regime, i.e. |
| 33 |
the light is switched on and off at fixed times (where the sum of |
| 34 |
illuminated + dark period = 24 hours). |
| 35 |
\item In another version, the light is imposed as a forcing function data |
| 36 |
set. |
| 37 |
} |
| 38 |
|
| 39 |
This model is written in \code{FORTRAN}. |
| 40 |
} |
| 41 |
\usage{aquaphy(times, y, parms, PAR = NULL, ...)} |
| 42 |
\arguments{ |
| 43 |
\item{times}{time sequence for which output is wanted; the first value |
| 44 |
of times must be the initial time,} |
| 45 |
\item{y}{the initial (state) values ("DIN", "PROTEIN", "RESERVE", |
| 46 |
"LMW"), in that order,} |
| 47 |
\item{parms }{vector or list with the aquaphy model parameters; see |
| 48 |
the example for the order in which these have to be defined.} |
| 49 |
\item{PAR }{a data set of the photosynthetically active radiation |
| 50 |
(light intensity), if \code{NULL}, on-off PAR is used, } |
| 51 |
\item{...}{any other parameters passed to the integrator \code{ode} |
| 52 |
(which solves the model).} |
| 53 |
} |
| 54 |
\author{Karline Soetaert <[email protected]>} |
| 55 |
\examples{ |
| 56 |
## ====================================================== |
| 57 |
## |
| 58 |
## Example 1. PAR an on-off function |
| 59 |
## |
| 60 |
## ====================================================== |
| 61 |
|
| 62 |
|
| 63 |
## ----------------------------- |
| 64 |
## the model parameters: |
| 65 |
## ----------------------------- |
| 66 |
|
| 67 |
parameters <- c(maxPhotoSynt = 0.125, # mol C/mol C/hr |
| 68 |
rMortPHY = 0.001, # /hr |
| 69 |
alpha = -0.125/150, # uEinst/m2/s/hr |
| 70 |
pExudation = 0.0, # - |
| 71 |
maxProteinSynt = 0.136, # mol C/mol C/hr |
| 72 |
ksDIN = 1.0, # mmol N/m3 |
| 73 |
minpLMW = 0.05, # mol C/mol C |
| 74 |
maxpLMW = 0.15, # mol C/mol C |
| 75 |
minQuotum = 0.075, # mol C/mol C |
| 76 |
maxStorage = 0.23, # /h |
| 77 |
respirationRate= 0.0001, # /h |
| 78 |
pResp = 0.4, # - |
| 79 |
catabolismRate = 0.06, # /h |
| 80 |
dilutionRate = 0.01, # /h |
| 81 |
rNCProtein = 0.2, # mol N/mol C |
| 82 |
inputDIN = 10.0, # mmol N/m3 |
| 83 |
rChlN = 1, # g Chl/mol N |
| 84 |
parMean = 250., # umol Phot/m2/s |
| 85 |
dayLength = 15. # hours |
| 86 |
) |
| 87 |
|
| 88 |
## ----------------------------- |
| 89 |
## The initial conditions |
| 90 |
## ----------------------------- |
| 91 |
|
| 92 |
state <- c(DIN = 6., # mmol N/m3 |
| 93 |
PROTEIN = 20.0, # mmol C/m3 |
| 94 |
RESERVE = 5.0, # mmol C/m3 |
| 95 |
LMW = 1.0) # mmol C/m3 |
| 96 |
|
| 97 |
## ----------------------------- |
| 98 |
## Running the model |
| 99 |
## ----------------------------- |
| 100 |
|
| 101 |
times <- seq(0, 24*20, 1) |
| 102 |
|
| 103 |
out <- as.data.frame(aquaphy(times, state, parameters)) |
| 104 |
|
| 105 |
## ----------------------------- |
| 106 |
## Plotting model output |
| 107 |
## ----------------------------- |
| 108 |
|
| 109 |
par(mfrow = c(2, 2), oma = c(0, 0, 3, 0)) |
| 110 |
col <- grey(0.9) |
| 111 |
ii <- 1:length(out$PAR) |
| 112 |
|
| 113 |
plot(times[ii], out$Chlorophyll[ii], type = "l", |
| 114 |
main = "Chlorophyll", xlab = "time, hours",ylab = "ug/l") |
| 115 |
polygon(times[ii], out$PAR[ii]-10, col = col, border = NA); box() |
| 116 |
lines(times[ii], out$Chlorophyll[ii], lwd = 2 ) |
| 117 |
|
| 118 |
|
| 119 |
plot (times[ii], out$DIN[ii], type = "l", main = "DIN", |
| 120 |
xlab = "time, hours",ylab = "mmolN/m3") |
| 121 |
polygon(times[ii], out$PAR[ii]-10, col = col, border = NA); box() |
| 122 |
lines(times[ii], out$DIN[ii], lwd = 2 ) |
| 123 |
|
| 124 |
|
| 125 |
plot (times[ii], out$NCratio[ii], type = "n", main = "NCratio", |
| 126 |
xlab = "time, hours", ylab = "molN/molC") |
| 127 |
polygon(times[ii], out$PAR[ii]-10, col = col, border = NA); box() |
| 128 |
lines(times[ii], out$NCratio[ii], lwd = 2 ) |
| 129 |
|
| 130 |
|
| 131 |
plot (times[ii], out$PhotoSynthesis[ii],type = "l", |
| 132 |
main = "PhotoSynthesis", xlab = "time, hours", |
| 133 |
ylab = "mmolC/m3/hr") |
| 134 |
polygon(times[ii], out$PAR[ii]-10, col = col, border = NA); box() |
| 135 |
lines(times[ii], out$PhotoSynthesis[ii], lwd = 2 ) |
| 136 |
|
| 137 |
mtext(outer = TRUE, side = 3, "AQUAPHY, PAR= on-off", cex = 1.5) |
| 138 |
|
| 139 |
## ----------------------------- |
| 140 |
## Summary model output |
| 141 |
## ----------------------------- |
| 142 |
t(summary(out)) |
| 143 |
|
| 144 |
## ====================================================== |
| 145 |
## |
| 146 |
## Example 2. PAR a forcing function data set |
| 147 |
## |
| 148 |
## ====================================================== |
| 149 |
|
| 150 |
times <- seq(0, 24*20, 1) |
| 151 |
|
| 152 |
## ----------------------------- |
| 153 |
## create the forcing functions |
| 154 |
## ----------------------------- |
| 155 |
|
| 156 |
ftime <- seq(0,500,by=0.5) |
| 157 |
parval <- pmax(0,250 + 350*sin(ftime*2*pi/24)+ |
| 158 |
(runif(length(ftime))-0.5)*250) |
| 159 |
Par <- matrix(nc=2,c(ftime,parval)) |
| 160 |
|
| 161 |
|
| 162 |
state <- c(DIN = 6., # mmol N/m3 |
| 163 |
PROTEIN = 20.0, # mmol C/m3 |
| 164 |
RESERVE = 5.0, # mmol C/m3 |
| 165 |
LMW = 1.0) # mmol C/m3 |
| 166 |
|
| 167 |
out <- aquaphy(times, state, parameters, Par) |
| 168 |
|
| 169 |
plot(out, which = c("PAR", "Chlorophyll", "DIN", "NCratio"), |
| 170 |
xlab = "time, hours", |
| 171 |
ylab = c("uEinst/m2/s", "ug/l", "mmolN/m3", "molN/molC")) |
| 172 |
|
| 173 |
mtext(outer = TRUE, side = 3, "AQUAPHY, PAR=forcing", cex = 1.5) |
| 174 |
|
| 175 |
# Now all variables plotted in one figure... |
| 176 |
plot(out, which = 1:9, type = "l") |
| 177 |
|
| 178 |
par(mfrow = c(1, 1)) |
| 179 |
|
| 180 |
} |
| 181 |
\references{ |
| 182 |
Lancelot, C., Veth, C. and Mathot, S. (1991). Modelling ice-edge |
| 183 |
phytoplankton bloom in the Scotia-Weddel sea sector of the Southern |
| 184 |
Ocean during spring 1988. Journal of Marine Systems 2, 333--346. |
| 185 |
|
| 186 |
Soetaert, K. and Herman, P. (2008). A practical guide to ecological |
| 187 |
modelling. Using R as a simulation platform. Springer. |
| 188 |
} |
| 189 |
\details{ |
| 190 |
The model is implemented primarily to demonstrate the linking of |
| 191 |
FORTRAN with \R-code. |
| 192 |
|
| 193 |
The source can be found in the \file{doc/examples/dynload} subdirectory of the package. |
| 194 |
} |
| 195 |
\seealso{ |
| 196 |
\code{\link{ccl4model}}, the CCl4 inhalation model. |
| 197 |
} |
| 198 |
\keyword{models} |
| 199 |
|