Closed sashahafner closed 1 month ago
Trying this instead, extrapolating with constant slurry mass:
pars$slurry_mass <- rbind(c(0, pars$slurry_mass[1]), pars$slurry_mass)
That fixes it. Did it in dev but will now merge with master.
I have been trying to figure out why methanogen concentrations at the start and end of a simulation did not match when using
startup = 2
. They should! This was with v2.0.8 (but looks the same in latest commit 0fcc737e5594b54d46abe38bba3f9eb1c39eb4ab).I think the problem is here in abm.R, where a time 0 with 0 slurry mass is added:
https://github.com/AU-BCE-EE/ABM/blob/0fcc737e5594b54d46abe38bba3f9eb1c39eb4ab/R/abm.R#L245
That was kind of stupid of us! The
abm_variable()
will go from 0 slurry up to the quantity given at time = 1 or whatever the first value is. And any concentrations from the end of the last startup simulation are swamped by fresh concentrations.