cavity: reset restart hnode to the mesh nominal in restart_thickness_ale (moving cavity) - #958
Draft
JanStreffing wants to merge 1 commit into
Draft
cavity: reset restart hnode to the mesh nominal in restart_thickness_ale (moving cavity)#958JanStreffing wants to merge 1 commit into
JanStreffing wants to merge 1 commit into
Conversation
…_ale Cavity columns and their open-ocean edge ring (ulevels_nod2D_max>1, the same exclusion class as the per-step hnode<->hnode_new sync) keep layer thicknesses fixed at the mesh nominal. A restart hnode deviating from that nominal (e.g. remapped from a formerly ice-free zstar column after a moving-cavity mesh change) persists forever, and the tracer T* update turns the mismatch into a multiplicative content drain every step (both tracers decay by (hnode_new-hnode)/hnode_new per step; validated with per-operator probes). Reset hnode to hnode_new after the restart read and rebuild the depth arrays.
JanStreffing
marked this pull request as draft
July 23, 2026 10:07
Collaborator
Author
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.

What
Fixes a persistent tracer-content drain when restarting a run whose ice-shelf cavity geometry has changed between legs — i.e. a moving-cavity coupled setup (FESOM ↔ an ice-sheet model such as PISM, where the ice-shelf draft is updated and the mesh regenerated/remapped each coupling leg).
Why it only bites a moving cavity
In
restart_thickness_ale, cavity columns (and their open-ocean edge ring — any node touching a cavity element,ulevels_nod2D_max > 1) keep their layer thicknesses fixed at the mesh nominal (hnode_newfrominit_thickness_ale, the same exclusion class as the per-stephnode↔hnode_newsync loop). The previous codecycled these columns on the restart read.With a static mesh that is harmless: the restart
hnodeequals the nominal, so nothing drifts. But when the cavity moves, a column that was open-ocean zstar in the leg that wrote the restart can be cavity (or edge-ring) in the leg that reads it, so its remapped restarthnodeno longer matches the new mesh's nominal. Because the column iscycled, that mismatch persists forever, and the tracerT*update then applies it as a multiplicative content drain every step.Fix
For cavity/edge-ring columns, force restart
hnodeto the nominal (hnode_new) and rebuild the depth arrays (zbar_3d_n,Z_3d_n) beforecycle. Open-ocean columns are unchanged, so static-mesh and non-cavity runs are entirely unaffected.