Add minimum thickness clamp in mixedlayer_restrat_Bodner#61
Open
dougiesquire wants to merge 1 commit into
Open
Add minimum thickness clamp in mixedlayer_restrat_Bodner#61dougiesquire wants to merge 1 commit into
mixedlayer_restrat_Bodner#61dougiesquire wants to merge 1 commit into
Conversation
Added code to clamp minimum layer thicknesses at GV%Angstrom_H in mixedlayer_restrat_Bodner. The mixedlayer_restrat_OM4 and mixedlayer_restrat_BML routines already apply such a clamp, but it was absent from the Bodner scheme, leading to negative layer thickness in certain circumstances. All answers are bitwise identical by default; answers change when USE_BODNER23 is true and BODNER_HMIN_BUG is set to false.
Collaborator
Author
|
@anton-seaice feel free to handball the review to someone else (maybe @angus-g?) |
dougiesquire
added a commit
that referenced
this pull request
Jun 12, 2026
Added code to clamp minimum layer thicknesses at GV%Angstrom_H in mixedlayer_restrat_Bodner. The mixedlayer_restrat_OM4 and mixedlayer_restrat_BML routines already apply such a clamp, but it was absent from the Bodner scheme, leading to negative layer thickness in certain circumstances. All answers are bitwise identical by default; answers change when USE_BODNER23 is true and BODNER_HMIN_BUG is set to false.
14 tasks
dougiesquire
added a commit
that referenced
this pull request
Jun 15, 2026
Added code to clamp minimum layer thicknesses at GV%Angstrom_H in mixedlayer_restrat_Bodner. The mixedlayer_restrat_OM4 and mixedlayer_restrat_BML routines already apply such a clamp, but it was absent from the Bodner scheme, leading to negative layer thickness in certain circumstances. All answers are bitwise identical by default; answers change when USE_BODNER23 is true and BODNER_HMIN_BUG is set to false.
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.
This PR clamps minimum layer thicknesses in
MOM_mixed_layer_restrat::mixedlayer_restrat_Bodner. Themixedlayer_restrat_OM4andmixedlayer_restrat_BMLroutines already apply such a clamp, but it was absent from the Bodner scheme, leading to negative layer thickness in certain circumstances.Note, while the
mixedlayer_restrat_OM4andmixedlayer_restrat_BMLroutines apply a floor at 0.5 Angstrom, this change implements a 1 Angstrom floor formixedlayer_restrat_Bodnerdue to the comments in the former routines "This should be GV%Angstrom_H, but that value would change answers". Given we're changing answers anyway, I chose to use 1 Angstrom.The fix is controlled by the new parameter
MLE%BODNER_HMIN_BUG(default true, preserving existing answers). Answers may change whenUSE_BODNER23 =TrueandBODNER_HMIN_BUG = False.Closes #60