Skip to content

Add minimum thickness clamp in mixedlayer_restrat_Bodner#61

Open
dougiesquire wants to merge 1 commit into
2026.05from
bodner-nan
Open

Add minimum thickness clamp in mixedlayer_restrat_Bodner#61
dougiesquire wants to merge 1 commit into
2026.05from
bodner-nan

Conversation

@dougiesquire

Copy link
Copy Markdown
Collaborator

This PR clamps minimum layer thicknesses in MOM_mixed_layer_restrat::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.

Note, while the mixedlayer_restrat_OM4 and mixedlayer_restrat_BML routines apply a floor at 0.5 Angstrom, this change implements a 1 Angstrom floor for mixedlayer_restrat_Bodner due 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 when USE_BODNER23 =True and BODNER_HMIN_BUG = False.

Closes #60

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.
@dougiesquire dougiesquire self-assigned this Jun 11, 2026
@dougiesquire

Copy link
Copy Markdown
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.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bodner mixed-layer restratification scheme can produce negative layer thicknesses

1 participant