Repository navigation
g24 Model3: stop deglaciation at zero ice volume - #60
Merged
Merged
Conversation
Ganopolski (2024) requires v >= 0: in regime k=2 ice volume declines linearly to zero and then stays ice-free until f < f1 restarts glaciation. Previously dv/dt = -vc/t2 kept driving v negative. Adds a regression test that v stays >= 0 (up to one step of overshoot) while glacial cycles still develop. Refs #58 (the regime-switching redesign itself is still open). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #58. This fixes one g24 behaviour; the regime-switching redesign tracked in #58 is still open.
Problem
In the deglaciation regime (
k = 2),Model3.dydtreturneddv/dt = -vc / t2unconditionally, so ice volume kept decreasing past zero untilf < f1restarted glaciation. Ganopolski (2024) requiresv >= 0: ice volume declines linearly to zero and then stays ice-free.Change
dvdt = -vc / t2 if v > 0 else 0.0in regimek = 2; docstring updated ("until v = 0").TestSignalModelsG24NonNegativeIce: with the orbital forcing (calc_f) and time-varyingvcover t = −2000…0 kyr (RK45,max_step=0.5),vstays ≥ 0, up to one solver step of overshoot (min > -0.1), while glacial cycles still develop (max > 1).Notes
dydt, so with an adaptive solvervcan overshoot zero by up to one step before the tendency switches off; the test tolerance reflects that. An exact stop atv = 0would need event handling, which fits naturally with the event-driven regime switching proposed in g24 Model3: regime switching depends on solver internals (hidden state in dydt) #58.Reference: Ganopolski, A., 2024: Toward generalized Milankovitch theory, Clim. Past, 20, 151–185, doi:10.5194/cp-20-151-2024.
🤖 Generated with Claude Code