Skip to content
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 12 runtime parameters for parameterization modules #294

Merged

Conversation

Hallberg-NOAA
Copy link
Member

@Hallberg-NOAA Hallberg-NOAA commented Dec 29, 2022

This PR adds 12 new runtime parameters to replace hard-coded dimensional parameters in 11 parameterization modules (MOM_lateral_mixing_coeffs.F90, MOM_internal_tides.F90, MOM_CVMix_KPP.F90, MOM_kappa_shear.F90, MOM_MEKE.F90, MOM_thickness_diffuse.F90, MOM_entrain_diffusive.F90, MOM_diabatic_aux.F90, MOM_bulk_mixed_layer.F90, MOM_ALE_sponge.F90 and MOM_regularize_layers.F90). The new runtime parameters that were added are MEKE_MIN_DEPTH_TOT, MEKE_LSCALE_MAX_VAL, EN_CHECK_TOLERANCE, MIN_DZ_FOR_SLOPE_N2, MEKE_MIN_DEPTH_DIFF, ENTRAIN_DIFFUSIVE_MAX_ENT, KD_SEED_KAPPA_SHEAR, KPP_LT_MLD_GUESS_MIN, REG_SFC_SUFFICIENT_ADJ, SALT_EXTRACTION_LIMIT, MECH_TKE_FLOOR and VARYING_SPONGE_MASK_THICKNESS).

This PR also includes a commit that makes the optional argument dz_subML to diagnoseMLDbyDensityDifference() in MOM_diabatic_aux.F90 mandatory (via an error message) if it will be used, and changes a tiny floor on the minimum thickness
over which to apply buoyancy forcing in applyBoundaryFluxesInOut() in a way that seems unlikely (but not impossible) to slightly change answers.

The doxygen trailer describing the MOM_diabatic_aux module had been inappropriately borrowed from another module and did not describe the contents of that module at all, so it was completely rewritten to describe what the routines in this module actually do. The missing doxygen description of the subroutine set_pen_shortwave() was also added.

All answers are bitwise identical in the MOM6-examples test suite, but there are new entries in the MOM_parameter_doc.all files for configurations using the ten impacted modules.

The commits in this PR include:

  • 80abd6ddf +Add runtime parameter VARYING_SPONGE_MASK_THICKNESS
  • 794f81a1f +Add runtime parameter MECH_TKE_FLOOR
  • f388abbc3 +Add runtime parameter SALT_EXTRACTION_LIMIT
  • 994c29cdd +Add runtime parameter REG_SFC_SUFFICIENT_ADJ
  • 48034c90f +Add runtime parameter KPP_LT_MLD_GUESS_MIN
  • be159dfad +Add runtime parameter ENTRAIN_DIFFUSIVE_MAX_ENT
  • 0e0a18ad5 +Add runtime parameter KD_SEED_KAPPA_SHEAR
  • b328b480c (*)Require dz_subML to calculate the sub-ML N2
  • 193d25ab2 +Add runtime parameter MEKE_MIN_DEPTH_DIFF
  • 5663d56e4 +Add runtime parameter MEKE_LSCALE_MAX_VAL
  • 4bec0ee43 +Add runtime parameter EN_CHECK_TOLERANCE
  • 48cd3ef36 +Add runtime parameter MIN_DZ_FOR_SLOPE_N2

@codecov
Copy link

codecov bot commented Dec 29, 2022

Codecov Report

Merging #294 (78f2b79) into dev/gfdl (ec7a57f) will increase coverage by 0.00%.
The diff coverage is 29.59%.

@@            Coverage Diff            @@
##           dev/gfdl     #294   +/-   ##
=========================================
  Coverage     37.07%   37.07%           
=========================================
  Files           263      263           
  Lines         73620    73656   +36     
  Branches      13720    13722    +2     
=========================================
+ Hits          27295    27311   +16     
- Misses        41287    41308   +21     
+ Partials       5038     5037    -1     
Impacted Files Coverage Δ
src/ice_shelf/MOM_ice_shelf_dynamics.F90 0.00% <0.00%> (ø)
...nitialization/MOM_tracer_initialization_from_Z.F90 0.00% <0.00%> (ø)
src/ocean_data_assim/MOM_oda_driver.F90 0.00% <0.00%> (ø)
...c/parameterizations/lateral/MOM_internal_tides.F90 0.00% <0.00%> (ø)
src/parameterizations/vertical/MOM_CVMix_KPP.F90 0.77% <0.00%> (+<0.01%) ⬆️
...rameterizations/vertical/MOM_regularize_layers.F90 4.84% <0.00%> (-0.02%) ⬇️
src/tracer/MOM_tracer_Z_init.F90 0.00% <0.00%> (ø)
src/tracer/RGC_tracer.F90 0.00% <0.00%> (ø)
src/tracer/advection_test_tracer.F90 0.00% <0.00%> (ø)
src/user/DOME2d_initialization.F90 0.00% <0.00%> (ø)
... and 22 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Hallberg-NOAA Hallberg-NOAA added documentation Improvements or additions to documentation Parameter change Input parameter changes (addition, removal, or description) labels Dec 29, 2022
@Hallberg-NOAA Hallberg-NOAA changed the title +Add 7 runtime params for parameterization modules +Add 8 runtime parameters for parameterization modules Dec 29, 2022
@Hallberg-NOAA Hallberg-NOAA force-pushed the explicit_parameterization_params branch from 92351e0 to b0576e8 Compare January 3, 2023 12:24
@Hallberg-NOAA Hallberg-NOAA changed the title +Add 8 runtime parameters for parameterization modules +Add 11 runtime parameters for parameterization modules Jan 3, 2023
  Added the new runtime parameters MIN_DZ_FOR_SLOPE_N2 to specify a previously
hard-coded dimensional parameter in the MOM_lateral_mixing_coeffs module.  By
default all answers are bitwise identical, but there is a new entry in the
MOM_parameter_doc.all files for configurations using the some forms of the
Eady growth rate slope calculation.
  Added the new runtime parameters EN_CHECK_TOLERANCE to specify a previously
hard-coded dimensional tolerance in the MOM_internal_tides module.  By default
all answers are bitwise identical, but there is a new entry in the
MOM_parameter_doc.all files for configurations using the MOM_internal_tides
module.
  Added the runtime parameters MEKE_LSCALE_MAX_VAL and MEKE_MIN_DEPTH_TOT to
specify two previously hard-coded dimensional parameters that are used with some
options of the MEKE parameterizations.  Also added or amended comments
annotating the units of some of the internal variables in the MEKE module.  By
default, all answers are bitwise identical, but there are new entries in the
MOM_parameter_doc.all files for some configurations using the MEKE
parameterization.
  Added the runtime parameter MEKE_MIN_DEPTH_DIFF to specify a previously
hard-coded dimensional parameter that is used to constrain the averaging of the
horizontal diffusivity used with the MEKE parameterizations.  By default, all
answers are bitwise identical, but there is a new entries in the
MOM_parameter_doc.all files for some configurations.
  Introduced a fatal error when diagnoseMLDbyDensityDifference is directed to
calculate the mean stratification in a region below the mixed layer but dz_subML
is not provided as the depth extent over which to average the stratification,
replacing the previous hard coded (but unused) default value of 50 m.   Also
replaced a hard coded floor on the minimum thickness over which to apply
boundary fluxes of 1e-30 m in applyBoundaryFluxesInOut with GV%H_subroundoff,
which is also a tiny value.   This floor is here just to avoid division by 0;
while it is possible for this to change answers in some cases where ANGSTROM=0,
even then there are other limiters that should apply so the solutions should
not change.  All answers are bitwise identical with for the MOM6-examples test
suite, and very likely for all existing MOM6 configurations.
  Added the new runtime parameter KD_SEED_KAPPA_SHEAR to specify a previously
hard-coded dimensional parameter used in the MOM_kappa_shear module.  By
default all answers are bitwise identical, but there is a new entry in the
MOM_parameter_doc.all files for configurations with USE_JACKSON_PARAM = True.
  Added the new runtime parameter ENTRAIN_DIFFUSIVE_MAX_ENT to specify a
previously hard-coded upper limit on the rate of entrainment in the buffer
layers with a bulk mixed layer in the MOM_entrainment_diffusive module.
By default all answers are bitwise identical, but there is a new entry in the
MOM_parameter_doc.all files for some layer-mode configurations with a bulk
mixed layer.
  Added the new runtime parameter KPP_LT_MLD_GUESS_MIN to specify a previously
hard-coded lower limit on the estimate of the boundary layer depth used to
calculate the Langmuir number for some options with KPP.  By default all answers
are bitwise identical, but there is a new entry in the MOM_parameter_doc.all
files for some configurations with a KPP and Langmuir enhanced turbulence.
  Added the new runtime parameter REG_SFC_SUFFICIENT_ADJ to specify a previously
hard-coded fraction of the target net entrainment to the mixed and buffer layers
that is enough to stop the search for additional mass from the interior layers
when regularizing the near-surface layers in layer-mode configurations.  By
default all answers are bitwise identical, but there is a new entry in the
MOM_parameter_doc.all files for some layer-mode configurations with
REGULARIZE_SURFACE_LAYERS=True.
  Added the new runtime parameter SALT_EXTRACTION_LIMIT to specify a previously
hard-coded limit on the fraction of the salt in a layer that can be extracted by
the surface fluxes within a timestep.  Also added do_not_log flags based on the
value of ENABLE_THERMODYNAMICS to avoid logging parameters that are only used if
thermodynamics are active in cases when it is not.  In addition, the doxygen
trailer describing this module had been inappropriately borrowed from another
module, so it was completely rewritten to describe what the routines in this
module actually do.  The missing doxygen description of set_pen_shortwave was
also added, and a number of spelling errors in comments were corrected.  By
default all answers are bitwise identical, but there is a new entry in the
MOM_parameter_doc.all files for some configurations and meaningless entries have
been removed from others.
  Added the new runtime parameter MECH_TKE_FLOOR to specify a previously
hard-coded tiny positive value for the remaining TKE when the bulk mixed does
not yet have HMIX_MIN of fluid during mechanical entrainment.  By default all
answers are bitwise identical, but the MOM_parameter_doc.all files for some
configurations with a bulk mixed layer and HMIX_MIN > 0 have a new entry.
@Hallberg-NOAA Hallberg-NOAA force-pushed the explicit_parameterization_params branch from 2b8370c to 794f81a Compare January 3, 2023 23:21
  Added the new runtime parameter VARYING_SPONGE_MASK_THICKNESS to specify a
previously hard-coded input file thickness below which the target values in
time-varying sponges are replaced with those from the layer above.  By default
all answers are bitwise identical, but the MOM_parameter_doc.all files for
configurations with time-varying sponges have a new entry.
@Hallberg-NOAA Hallberg-NOAA changed the title +Add 11 runtime parameters for parameterization modules +Add 12 runtime parameters for parameterization modules Jan 3, 2023
@marshallward marshallward self-requested a review January 4, 2023 17:02
@marshallward
Copy link
Member

Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/17880 ✔️ 🟡

@marshallward marshallward merged commit 3cecac4 into NOAA-GFDL:dev/gfdl Jan 5, 2023
@Hallberg-NOAA Hallberg-NOAA deleted the explicit_parameterization_params branch February 2, 2023 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation Parameter change Input parameter changes (addition, removal, or description)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants