-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RK3 for the hydrostatic free surface model #3874
Conversation
For the moment this works only with the substep 1:
substep 2
substep 3
|
It is indeed equivalent in terms of results: when testing tracer advection with a fixed velocity it looks like the profiles are identical for this timestepper in the HydrostaticModel and a NonhydrostaticModel (so probably it is good to have just one rk3 timestepper type) There is some difference in the nomenclature which I think allows a better understanding of how to split the barotropic and baroclinic modes, because the previous old field are stored and used to restart the substeps instead of having two different tendencies that are averaged at each substep. |
There are some differences between how this algorithm is implemented and how we do the stepping for the In particular, it seems that the intermediate predictor velocities Oceananigans.jl/src/TimeSteppers/runge_kutta_3.jl Lines 57 to 62 in d66ed9b
PS |
Ah sorry after I wrote that (a now deleted comment) I realized there were some subtle differences which I noted above. |
Perhaps worth stating here that I think RK3 is vastly superior to AB2 not only because of the faster time-to-solution but also because it is "self-starting" (does not depend on tendencies from previous time-steps), checkpointing is cheaper and simplified, and the chance of bugs (which cost us nearly 6 months during parameterization development in the past) wherein "restarted" simulations can fail when the prior tendencies have NaN even if we attempt to start with an Euler time-step. So RK3 is both faster and simpler. |
… into ss/hydrostatic-rk3
This PR is a little stale, I ll open a version two that is cleaner and close this one. |
closed in favor of #3930 |
paired with a splitting of the barotropic- baroclinic mode described in
https://www.sciencedirect.com/science/article/abs/pii/S0021999122001127?fr=RR-2&ref=pdf_download&rr=8d81dd3bab0dba9a which seems to ensure consistency in the forcing of the barotropic and baroclinic mode.
The algorithm follows:
substep 1
substep 2
substep 3
The proof of concept in this PR is working and allowing a much larger CFL than the AB2 code we use (with the added benefit of reducing the implicit diffusion of the AB2 scheme and being self-starting from time-step
n
).This is just a PR thrown together to check this numerical scheme works. I would like to do a couple of improvements on the SplitExplicit code before bringing this PR to a mergeable state. The suggested improvements are described in issue #3873