Code
library(tidyverse)
library(tidyverse)
Here we define productivity and mortality as:
\[ flux(t) = \omega \cdot stocks(t) + \nu \cdot STP(t)\] where \(stocks(t)\) is the stocks value at time \(t\); \(\nu\) is either 0 (control plots) or 1 (logged plots).
The short term process (STP) is an intermediary process caused by logging operations, that disappears over time.
For productivity, we define it as: \(STP_P = \delta \cdot(\frac{t}{\tau}exp(1-\frac{t}{\tau}))^2\)
For mortality, we define it as \(STP_M = \alpha\cdot exp(-\lambda\cdot t)\)
Because we expect stocks to reach an equilibrium value at \(t \rightarrow +\infty\), we have:
\[lim_{+\infty}(prod) = lim_{+\infty}(mort)\] Therefore, \(\omega\) is the same for productivity and mortality.
We therefore have:
\[stocks(t) = stocks(0) + \int_0^t \left(\delta \cdot(\frac{x}{\tau}exp(1-\frac{x}{\tau}))^2 - \alpha\cdot exp(-\lambda\cdot x)\right)dx\]
The integral calculation is done in the Appendix.
The resulting stocks are:
\[ stocks(t) = stocks(0) + \frac{\delta \cdot e^{2} \cdot\tau}{4} - \delta \cdot e^{(1-\frac{t}{\tau})2} \left(\frac{t^2}{2\tau}+\frac{t}{2}+\frac{\tau}{4}\right) - \frac{\alpha}{\lambda}(1-exp(-\lambda\cdot t))\] The equilibrium value is
\[stocks(\infty) = stocks(0) + \frac{e^{2}}{4} (\delta \cdot \tau) - \frac{\alpha}{\lambda}\]
The figure below illustrates the resulting stocks and fluxes with parameters set to:
<- 100
agb0 <- 15
tau <- 4
delta <- 3
alpha <- 0.2
lambda <- 0.02
omega
<- agb0 + exp(2) / 4 * delta * tau - alpha / lambda
agbinf
<- function(time, delta, tau) {
stp * (time / tau * exp(1 - time / tau))^2
delta
}<- function(time, y0, delta, tau, lambda, alpha) {
stocks + delta * tau * exp(2) / 4 -
y0 * exp((1 - time / tau) * 2) *
delta ^2 / (2 * tau) + time / 2 + tau / 4) -
(time/ lambda * (1 - exp(-lambda * time))
alpha
}
<- c(
facet_labs "agb" = "Stocks",
"prod" = "Productivity",
"mort" = "Mortality"
)<- data.frame(
ann_segment t = 50, tinf = 100, value = agbinf, name = "agb"
)
data.frame(t = seq(0, 100, length.out = 200)) |>
mutate(
prod = stp(t, delta, tau) +
* stocks(t, agb0, delta, tau, lambda, alpha),
omega mort = alpha * exp(-lambda * t) +
* stocks(t, agb0, delta, tau, lambda, alpha),
omega agb = stocks(t, agb0, delta, tau, lambda, alpha)
|>
) pivot_longer(-t) |>
ggplot(aes(t, value)) +
geom_segment(data = ann_segment, aes(xend = tinf), lty = 2) +
geom_line() +
facet_wrap(~name,
scales = "free", nrow = 3,
labeller = labeller(name = facet_labs),
strip.position = "left"
+
) labs(x = "Recovery time [yr]", y = NULL) +
theme_minimal() +
theme(strip.placement = "outside")