-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move MLD diagnostics out of MOM_diabatic_aux and add the option to use non-surface density in MLD_003 #691
Move MLD diagnostics out of MOM_diabatic_aux and add the option to use non-surface density in MLD_003 #691
Conversation
@@ -3248,6 +3252,15 @@ subroutine diabatic_driver_init(Time, G, GV, US, param_file, useALEalgorithm, di | |||
'Squared buoyancy frequency below mixed layer', units='s-2', conversion=US%s_to_T**2) | |||
CS%id_MLD_user = register_diag_field('ocean_model', 'MLD_user', diag%axesT1, Time, & | |||
'Mixed layer depth (used defined)', units='m', conversion=US%Z_to_m) | |||
if (CS%id_MLD_003 > 0) then | |||
call get_param(param_file, mdl, "HREF_FOR_MLD", CS%ref_h_mld, & | |||
"Refernced depth used to calculate the potential density used to find the mixed layer depth "//& |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note typo
7b73cbc
to
64dc13c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev/gfdl #691 +/- ##
============================================
+ Coverage 36.99% 40.90% +3.90%
============================================
Files 272 42 -230
Lines 82433 5286 -77147
Branches 15421 1013 -14408
============================================
- Hits 30496 2162 -28334
+ Misses 46246 2939 -43307
+ Partials 5691 185 -5506 ☔ View full report in Codecov by Sentry. |
After discussing with Bob, Brandon, and Alistair some changes have been made to this PR incuding fixing typos, whitespace, and line length. The commit history has been cleaned up so that two clean commits can be merged in. Since the OMIP7 MLD definition was unclear when this PR was created it is possible that more changes to the MLD diagnstcs may be needed for OMIP7. In addition, the optional arguments that I added to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the purpose of this PR, and after inspecting the code I believe it to be correct. Moreover, I agree that this should be treated via two distinct commits.
A new parameter is added to diagnoseMLDbyDensityDifference that allows a user to specify a reference for the surface density that is not the top model layer. This feature should make the MLD_003 diagnostic more consistent with the de Boyer Montégut MLD climatology. In addition, new diagnostics have been added to save the actual depth of the density used and the "surface" density used in the MLD calculation. These options have only been added for the MLD_003 option.
Move the calculation of density difference and energy difference based MLD diagnostics out of MOM_diabatic_aux and into a new module MOM_diagnose_MLD.F90. Because this new module includes only the calculation of mixed layer depths that will be primarily used as diagnostics, it will be in the diagnostics subfolder. This change will allow the diagnose MLD routines to be used in the generic tracers.
64dc13c
to
02f3ae7
Compare
This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/24341 with the expected warnings about new diagnostics and new runtime parameters. |
This PR moves the
diagnoseMLDbyEnergy
anddiagnoseMLDbyDensityDifference
out of theMOM_diabatic_aux
module and into a newly createdMOM_diagnose_mld
module which is located in the diagnostics folder. This is to allow the MLD diagnostic codes to be used within the generic tracer routines.In addition, a new parameter is added to
diagnoseMLDbyDensityDifference
that allows a user to specify a reference for the "surface" density that is not the top model layer. This feature should make the MLD_003 diagnostic more consistent with the de Boyer Montégut MLD climatology which uses a reference depth of 10m (see deBoyer Montegut et al. 2004 and 2022). In addition, new diagnostics have been added to save the actual depth of the density used and the "surface" density used in the MLD calculation. These options have only been added for the MLD_003 diagnostic.The new parameter added
HREF_FOR_MLD
is the target depth for the "surface" density used in the density difference calculation. The default is zero which means the density of the surface layer is used. IfHREF_FOR_MLD
is not present whendiagnoseMLDbyDensityDifference
is called, the density of the surface layer is used. Where the ocean is shallower thanHREF_FOR_MLD
the density in the surface layer is used. The pressure atHREF_FOR_MLD
is used as the reference pressure for the potential density.Two new diagnostics have been added:
MLD_003_refZ
andMLD_003_refRho
. The first is used mainly for debugging and should be equal toHREF_FOR_MLD
except where the ocean is shallower. The other diagnosticMLD_003_refRho
is the two-diimensional potential density at the "surface" which is used in the density difference. This is saved because a user may want to compare the density difference betweenHREF_FOR_MLD
and the density in the top layer.These changes do not change the model solution but if
HREF_FOR_MLD
is not zero, it will change the MLD_003 diagnostic.A one year (1993) test in the Northeast Pacfic (NEP) regional domain showed deeper MLD when
HREF_FOR_MLD=10.0
(h=0 vs. h=10). Overall the MLD is too shallow compared to the de Boyer Montégut 2022 MLD climatology (DBM on the plot below), so a slight deepening is likely to help with the bias. The figure below show the annual average MLD for the NEP domain in meters for 1993.Thanks to @amoebaliz for this test domain.