-
Notifications
You must be signed in to change notification settings - Fork 59
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
+(*)Add new viscosity options and discourage the use of KVML #201
Conversation
Added a new argument to set_diffusivity_init and bkgnd_mixing_init to specify when a physically based ocean surface boundary layer mixing scheme, like KPP, ePBL or a bulk mixed layer is in use, and use this to restrict when a constant diffusivity is used as a crude parameterization of the surface boundary layer. This constant mixed layer diffusivity was formerly set with KDML, but is now set with KD_ML_TOT, but KDML will still work for input but is no longer logged and triggers a warning message if it is used. Also removed KDML from the description of the ADIABATIC option. This leads to changes in the entries of several MOM_parameter_doc files, and it could lead to answer changes that set a non-default value of KDML and use ePBL or KPP, but it seems unlikely that any such cases would exist.
Replaced the runtime parameter KVBBL, which sets the total viscosity in the bottom boundary layer when BOTTOMDRAGLAW is false, with KV_EXTRA_BBL, which sets the viscosity anomaly relative to KV or other turbulent viscosities, and has a default value of 0 m2/s, instead of the previous nonzero default for KVBBL. Specifying KVBBL will still give equivalent results, but is no longer logged and triggers a warning message if it is used. This leads to changes in the entries of several MOM_parameter_doc files, and while all existing solutions are bitwise identical, by changing the definition of KVBBL there could be some changes at the level of roundoff for cases that do not use BOTTOMDRAGLAW = True.
Corrected a spelling error, from HARMOINIC to HARMONIC, in the get_param description of one of the valid options for PORBAR_ETA_INTERP, and a few other spelling errors in comments in MOM_porous_barriers.F90. All answers are bitwise identical, but an entry in some MOM_parameter_doc files will change.
Renamed the runtime parameter KVML with KV_ML_INVZ2 and modified the comments describing it to more clearly indicate what it does and to explicitly discourage its use. Specifying KVML will still give identical results, but is no longer logged and triggers a warning message if it is used. The two descriptions of the HBBL runtime parameter in MOM_vert_friction and MOM_set_viscosity were also made consistent. Also added units to several comments describing real variables and corrected some spelling errors in comments in MOM_vert_friction.F90. This commit leads to changes in the entries of several MOM_parameter_doc files, but all existing solutions are bitwise identical.
Refactored the way that find_coupling_coef sets the viscous coupling in the surface boundary layer, in preparation for adding new options. All answers are bitwise identical.
Added the new runtime parameters FIXED_DEPTH_LOTW_ML and LOTW_VISCOUS_ML_FLOOR to turn on a law-of-the-wall based scheme to specify the viscosity in a boundary layer of thickness HMIX_FIXED, and to apply a law-of-the-wall based lower bound on the viscous coupling strengths across interfaces that are within the surface boundary layer thickness, as determined in one of several different ways. Because these are false by default, all answers are bitwise identical, but there are new entries in some MOM_parameter_doc files.
Set the friction velocity, ustar, when the wind stresses are specified via wind_forcing_2gyre and wind_forcing_2gyre. This was done by adding the new subroutine stresses_to_ustar to start to standardize the calculation of the friction velocities from the wind stresses. Neverworld_wind_forcing and wind_forcing_gyres were already using the same expressions for ustar as are in stresses_to_ustar, so the new routine is now used in these cases. In other routines that set ustar, the answers differ at roundoff due to the difference between division by a reference density and multiplication by its reciprocal, so using the new subroutine in those cases should be wrapped in an answer_date flag, which is being left for a later commit. This is being added now as a result of a new commit that uses ustar as a part of the specification of viscosities even in idealized cases. All answers in the MOM6-examples test suite are bitwise identical.
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #201 +/- ##
============================================
- Coverage 37.55% 37.23% -0.33%
============================================
Files 262 262
Lines 71388 72590 +1202
Branches 13306 13564 +258
============================================
+ Hits 26807 27026 +219
- Misses 39625 40550 +925
- Partials 4956 5014 +58
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
32e7ff1
to
edd1df2
Compare
Made the von Karman constant into a runtime parameter, specified with VON_KARMAN_CONST or VON_KARMAN_BBL, replacing a hard-coded value in multiple places. By default, all answers are bitwise identical, but there are one or two new entries in the MOM_parameter_doc files.
edd1df2
to
59b8b06
Compare
Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/16719 ✔️ 🟡 |
I may have merged this prematurely, since @MJHarrison-GFDL was still reviewing it. |
I was not assigned as a reviewer, so no foul. I am examining these changes in the context of some ice shelf configurations. The LOTW profile for the viscosities and layer coupling coefficient are working as intended. Since There is no explicit floor on u*, the coupling between massless layers and the finite underlying layer could potentially be zero in some configurations. |
This is a series of commits designed to add new capabilities to handle the
near-surface viscous coupling between thin near-surface layers when there is a
wind stress, and to strongly discourage the use of the KVML-derived viscosities
that scale with the inverse of the distance from the free surface squared.
These new capabilities have been determined to work as intended in variants of
the double gyre test case with additional thin layers added in the lightest
density range. These changes should allow us to address the source of the
problems that have plaguing runs with an ice-shelf that do not use a bulk
mixed layer.
In addition, the friction velocity, forces%ustar, is now being set with several
idealized wind forcing prescriptions where it previously had not been set.
Also, the von Karman constant had been used as a hard-coded constant in several
places, and it has now been replaced with variables that can be set via run-time
parameters.
All answers are bitwise identical in the MOM6-examples test suite, and are
unlikely to change in any realistic configurations, but there are new or
corrected entries in the MOM_parameter_doc files.
The commits in this PR include: