The MOM_mixed_layer_restrat::mixedlayer_restrat_Bodner routine does not clamp layer thicknesses after applying the transport, unlike mixedlayer_restrat_OM4 and mixedlayer_restrat_BML which both apply a floor at 0.5 Angstrom. This can lead to negative thicknesses which can lead to issues such as NaNs (e.g. see here)
A simple fix is to mirror the approach already used in the other two routines. However, those include the comment:
h_min = 0.5*GV%Angstrom_H ! This should be GV%Angstrom_H, but that value would change answers.
so we may want to clamp at one Angstrom, rather than 0.5.
This will change answers so will require the introduction of a parameter to preserve old answers.
The
MOM_mixed_layer_restrat::mixedlayer_restrat_Bodnerroutine does not clamp layer thicknesses after applying the transport, unlikemixedlayer_restrat_OM4andmixedlayer_restrat_BMLwhich both apply a floor at 0.5 Angstrom. This can lead to negative thicknesses which can lead to issues such as NaNs (e.g. see here)A simple fix is to mirror the approach already used in the other two routines. However, those include the comment:
so we may want to clamp at one Angstrom, rather than 0.5.
This will change answers so will require the introduction of a parameter to preserve old answers.