How to determine the maximum stable time step for biogeochemistry dynamics? #360
ali-ramadhan
started this conversation in
General
Replies: 1 comment
|
Hi Ali, Sorry, I completely missed this before. As far as I'm aware it's not generally possible to determine a stable timestep and it would be very involved to compute it. This is why I came up with the |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I was just playing around a LOBSTER box model (basically the first example in the docs) and noticed that I was getting some super negative values. Turns out it's probably numerical instability due to the time step because reducing the time step eventually leads to convergence (although sometimes blowup at intermediate time step sizes).
I'm curious if there's a way to determine the maximum stable time step for biogeochemistry dynamics (e.g. LOBSTER). This way we could take it into account when computing time step sizes for adaptive time-stepping.
If not, maybe the solution is an equivalent of the
NaNCheckerthat stops a simulation if a tracer becomes too negative?cc @suki-atdepthmrv @almacarolina
MWE:
With a time step of 15 mins (super negative NO3, Alk, and DIC):
With a time step of 5 mins (crash and NaNs after ~0.5 days):
With a time step of 1 min (seems fine):
With a time step of 10 seconds (seems converged):
Environment:
OceanBioME.jl
mainbranch withAll reactions