Usage
algae_height(Nf, spec_params)
Arguments
- Nf
Fixed nitrogen (mg m\(^{-3}\))
- spec_params
A vector of named numbers. Must include the parameters:
h_max
, maximum species height. Can be NA
.
h_a
, h_b
and h_c
, parameters governing height change with N_f
. If not supplied algae height will always be h_max
.
Value
a scalar of macroalgae height (m)
Details
Calculates macroalgae height as \(h_m = \left(\frac{N_f}{h_a}\right)^{h_b} + h_c\) up to a maximum of h_max
.
Defaults are \(h_a=1000\), \(h_b=1\) and \(h_c=0\).
Algae height therefore defaults to \(N_f \times 10^{-3}\) if no parameters are supplied.
Examples
my_species <- c(h_a = 750, h_b = 0.5, h_c = 0.01, h_max = 1)
Nf <- seq(100, 1000, 10)
height <- sapply(X = Nf, FUN = algae_height, spec_params = my_species)
plot(Nf, height)