From 1c5cd88d665299dbe75188c70cc7860dcf6b7c47 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 3 Oct 2025 17:22:25 -0600 Subject: [PATCH 1/3] Add three new CVMix parameters CVMix moved three hard-coded fortran parameters to user-defined parameters than can be set via cvmix_init_kpp(). This PR allows users to set those three parameters via MOM_input / MOM_override, but the MOM6 default values match the CVMix default values (which match the previously-hardcoded values) --- src/parameterizations/vertical/MOM_CVMix_KPP.F90 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/parameterizations/vertical/MOM_CVMix_KPP.F90 b/src/parameterizations/vertical/MOM_CVMix_KPP.F90 index a7c1b4e610..10fff05c0f 100644 --- a/src/parameterizations/vertical/MOM_CVMix_KPP.F90 +++ b/src/parameterizations/vertical/MOM_CVMix_KPP.F90 @@ -125,6 +125,9 @@ module MOM_CVMix_KPP real :: MLD_guess_min !< The minimum estimate of the mixed layer depth used to !! calculate the Langmuir number for Langmuir turbulence !! enhancement with KPP [Z ~> m] + real :: KPP_ER_Cb ! Entrainment Rule TKE buoyancy production weight [nondim] + real :: KPP_ER_Cs ! Entrainment Rule TKE Stokes production weight [nondim] + real :: KPP_ER_Cu ! Entrainment Rule TKE shear production weight [nondim] logical :: STOKES_MIXING !< Flag if model is mixing down Stokes gradient !! This is relevant for which current to use in RiB integer :: answer_date !< The vintage of the order of arithmetic in the CVMix KPP @@ -532,6 +535,16 @@ logical function KPP_init(paramFile, G, GV, US, diag, Time, CS, passive) 'Parameter for Stokes MOST convection entrainment (unresolved shear)', & units="nondim", default=1.6) + call get_param(paramFile, mdl, "KPP_ER_Cb", CS%KPP_ER_Cb, & + 'Entrainment Rule TKE buoyancy production weight', & + units="nondim", default=0.96) + call get_param(paramFile, mdl, "KPP_ER_Cs", CS%KPP_ER_Cs, & + 'Entrainment Rule TKE Stokes production weight', & + units="nondim", default=0.038) + call get_param(paramFile, mdl, "KPP_ER_Cu", CS%KPP_ER_Cu, & + 'Entrainment Rule TKE shear production weight', & + units="nondim", default=0.023) + call get_param(paramFile, mdl, "ANSWER_DATE", CS%answer_date, & "The vintage of the order of arithmetic in the CVMix KPP calculations. Values "//& "below 20240501 recover the answers from early in 2024, while higher values "//& @@ -548,6 +561,9 @@ logical function KPP_init(paramFile, G, GV, US, diag, Time, CS, passive) vonKarman=CS%vonKarman, & surf_layer_ext=CS%surf_layer_ext, & CVt2=CS%KPP_CVt2, & + ER_Cb=CS%KPP_ER_Cb, & + ER_Cs=CS%KPP_ER_Cs, & + ER_Cu=CS%KPP_ER_Cu, & interp_type=CS%interpType, & interp_type2=CS%interpType2, & lEkman=CS%computeEkman, & From 19c2210cbd6af730ad784b728294866971942d77 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Mon, 20 Oct 2025 08:47:27 -0600 Subject: [PATCH 2/3] Update CVMix external in pkg/ Need updated CVMix API that includes ER_Cb, ER_Cs, and ER_Cu arguments to CVMix_init_kpp() --- pkg/CVMix-src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/CVMix-src b/pkg/CVMix-src index d20b9898f4..9187de96a4 160000 --- a/pkg/CVMix-src +++ b/pkg/CVMix-src @@ -1 +1 @@ -Subproject commit d20b9898f46d0ec3f5df2eab7f38eb4aac567254 +Subproject commit 9187de96a40ca55ec7b43524a2bf0ace10bcae67 From de909f40307859b45fd61ec1a80f51755d01225d Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Mon, 20 Oct 2025 08:54:15 -0600 Subject: [PATCH 3/3] Description comments weren't in right format The comments describing the new variables of the KPP_Cs class were "!" not "!<" so doxygen didn't recognize them --- src/parameterizations/vertical/MOM_CVMix_KPP.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parameterizations/vertical/MOM_CVMix_KPP.F90 b/src/parameterizations/vertical/MOM_CVMix_KPP.F90 index 10fff05c0f..1eb83c3db8 100644 --- a/src/parameterizations/vertical/MOM_CVMix_KPP.F90 +++ b/src/parameterizations/vertical/MOM_CVMix_KPP.F90 @@ -125,9 +125,9 @@ module MOM_CVMix_KPP real :: MLD_guess_min !< The minimum estimate of the mixed layer depth used to !! calculate the Langmuir number for Langmuir turbulence !! enhancement with KPP [Z ~> m] - real :: KPP_ER_Cb ! Entrainment Rule TKE buoyancy production weight [nondim] - real :: KPP_ER_Cs ! Entrainment Rule TKE Stokes production weight [nondim] - real :: KPP_ER_Cu ! Entrainment Rule TKE shear production weight [nondim] + real :: KPP_ER_Cb !< Entrainment Rule TKE buoyancy production weight [nondim] + real :: KPP_ER_Cs !< Entrainment Rule TKE Stokes production weight [nondim] + real :: KPP_ER_Cu !< Entrainment Rule TKE shear production weight [nondim] logical :: STOKES_MIXING !< Flag if model is mixing down Stokes gradient !! This is relevant for which current to use in RiB integer :: answer_date !< The vintage of the order of arithmetic in the CVMix KPP