Fix double diffusion density ratio (not critical, since double diffusion is not used by default )#943
Open
patrickscholz wants to merge 1 commit into
Open
Conversation
…f absolute T/S ddmix computed alphaDT and betaDS from single-level absolute tracer values, making Rrho a ratio of absolute T and S rather than of their vertical density gradients. This triggered salt-fingering and diffusive-convection mixing continuously across virtually the entire ocean whenever double_diffusion=.true., regardless of actual stratification stability. Replace with the gradient form (T(nz-1)-T(nz), S(nz-1)-S(nz)) so that the scheme activates only at interfaces where the destabilising gradient exceeds the stabilising one, as the physics requires. Note: double diffusion is off by default (double_diffusion=.false.), so this bug has no effect on standard production runs.
JanStreffing
approved these changes
Jun 25, 2026
suvarchal
approved these changes
Jun 25, 2026
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.
Fix double diffusion density ratio using vertical gradients instead of absolute T/S
ddmix computed alphaDT and betaDS from single-level absolute tracer values, making Rrho a ratio of absolute T and S rather than of their vertical density gradients. This triggered salt-fingering and diffusive-convection mixing continuously across virtually the entire ocean whenever double_diffusion=.true., regardless of actual stratification stability.
Replace with the gradient form (T(nz-1)-T(nz), S(nz-1)-S(nz)) so that the scheme activates only at interfaces where the destabilising gradient exceeds the stabilising one, as the physics requires.
Note: double diffusion is off by default (double_diffusion=.false.), so this bug has no effect on standard production runs.