Skip to content

Commit 2a510f9

Browse files
committed
+(*)EPBL_BBL_EFFIC_BUG & DRAG_DIFFUSIVITY_ANSWER_DATE
Previously, visc%BBL_meanKE_loss (which was called visc%TKE_BBL before it was renamed) was missing a factor of the square root of the drag coefficient compared with the net loss of kinetic energy. This was compensated for by multiplication by factors of the square root of the drag coefficient in add_drag_diffusivity and add_LOTW_BBL_diffusivity, but when an equivalent expression was added in the ePBL BBL code this was erroneously omitted. Moreover, Alistair has had a comment questioning this added factor in add_LOTW_BBL_diffusivity for a decade without adequate resolution. To correct this confusing situation, visc%BBL_meanKE_loss has been changed to include the missing factor of the square root of the drag coefficient, while the new variable visc%BBL_meanKE_loss_sqrtCd was added to allow for the previous answers to be recovered when the new runtime parameter EPBL_BBL_EFFIC_BUG is set to true and DRAG_DIFFUSIVITY_ANSWER_DATE is set below 20250302. Because the ePBL bottom boundary layer was only added to dev/gfdl a month ago and has not yet been merged into main, we can be confident that it has only received very limited use as yet, so the default for EPBL_BBL_EFFIC_BUG is false but this default will change answers when EPBL_BBL_EFFIC > 0. The default for DRAG_DIFFUSIVITY_ANSWER_DATE is 20250101, which will preserve the previous answers, but the default should later be taken from DEFAULT_ANSWER_DATE. By default, answers are unchanged in any cases that are more than a month old, but answers can change by default in a few very recent experiments. There are two new runtime parameters in some MOM_parameter_doc files.
1 parent 2d6adc4 commit 2a510f9

File tree

4 files changed

+49
-7
lines changed

4 files changed

+49
-7
lines changed

src/core/MOM_variables.F90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ module MOM_variables
239239
!! h points [H T-1 ~> m s-1 or kg m-2 s-1].
240240
BBL_meanKE_loss, & !< The viscous loss of mean kinetic energy in the bottom boundary layer
241241
!! [H L2 T-3 ~> m3 s-3 or W m-2].
242+
BBL_meanKE_loss_sqrtCd, & !< The viscous loss of mean kinetic energy in the bottom boundary layer
243+
!! divided by the square root of the drag coefficient [H L2 T-3 ~> m3 s-3 or W m-2].
244+
!! This is being set only to retain old answers, and should be phased out.
242245
taux_shelf, & !< The zonal stresses on the ocean under shelves [R Z L T-2 ~> Pa].
243246
tauy_shelf !< The meridional stresses on the ocean under shelves [R Z L T-2 ~> Pa].
244247
real, allocatable, dimension(:,:) :: tbl_thick_shelf_u

src/parameterizations/vertical/MOM_energetic_PBL.F90

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ module MOM_energetic_PBL
198198
!! energetics that accounts for an exponential decay of TKE from a
199199
!! near-bottom source and an assumed piecewise linear linear profile
200200
!! of the buoyancy flux response to a change in a diffusivity.
201+
logical :: BBL_effic_bug !< If true, overestimate the efficiency of the non-tidal ePBL bottom boundary
202+
!! layer diffusivity by a factor of 1/sqrt(CDRAG), which is often a factor of
203+
!! about 18.3.
201204

202205
!/ Options for documenting differences from parameter choices
203206
integer :: options_diff !< If positive, this is a coded integer indicating a pair of
@@ -662,7 +665,11 @@ subroutine energetic_PBL(h_3d, u_3d, v_3d, tv, fluxes, visc, dt, Kd_int, G, GV,
662665
if (BBL_mixing) then
663666
if (CS%MLD_iteration_guess .and. (CS%BBL_depth(i,j) > 0.0)) BBLD_io = CS%BBL_depth(i,j)
664667
BBLD_in = BBLD_io
665-
BBL_TKE = CS%ePBL_BBL_effic * GV%H_to_RZ * dt * visc%BBL_meanKE_loss(i,j)
668+
if (CS%BBL_effic_bug) then
669+
BBL_TKE = CS%ePBL_BBL_effic * GV%H_to_RZ * dt * visc%BBL_meanKE_loss_sqrtCd(i,j)
670+
else
671+
BBL_TKE = CS%ePBL_BBL_effic * GV%H_to_RZ * dt * visc%BBL_meanKE_loss(i,j)
672+
endif
666673
u_star_BBL = max(visc%ustar_BBL(i,j), CS%ustar_min*GV%Z_to_H)
667674

668675
! Add in tidal dissipation energy at the bottom, noting that fluxes%BBL_tidal_dis is
@@ -3752,6 +3759,10 @@ subroutine energetic_PBL_init(Time, G, GV, US, param_file, diag, CS)
37523759
"length scale by rotation in the bottom boundary layer. Making this larger "//&
37533760
"decreases the bottom boundary layer diffusivity.", &
37543761
units="nondim", default=CS%Ekman_scale_coef, do_not_log=no_BBL)
3762+
call get_param(param_file, mdl, "EPBL_BBL_EFFIC_BUG", CS%BBL_effic_bug, &
3763+
"If true, overestimate the efficiency of the non-tidal ePBL bottom boundary "//&
3764+
"layer diffusivity by a factor of 1/sqrt(CDRAG), which is often a factor of "//&
3765+
"about 18.3.", default=.false., do_not_log=(CS%ePBL_BBL_effic<=0.0))
37553766

37563767
call get_param(param_file, mdl, "DECAY_ADJUSTED_BBL_TKE", CS%decay_adjusted_BBL_TKE, &
37573768
"If true, include an adjustment factor in the bottom boundary layer energetics "//&

src/parameterizations/vertical/MOM_set_diffusivity.F90

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,17 @@ module MOM_set_diffusivity
163163
!! calculations. Values below 20190101 recover the answers from the
164164
!! end of 2018, while higher values use updated and more robust forms
165165
!! of the same expressions. Values above 20240630 use more accurate
166-
!! expressions for cases where USE_LOTW_BBL_DIFFUSIVITY is true.
166+
!! expressions for cases where USE_LOTW_BBL_DIFFUSIVITY is true. Values
167+
!! above 20250301 use less confusing expressions to set the bottom-drag
168+
!! generated diffusivity when USE_LOTW_BBL_DIFFUSIVITY is false.
167169
integer :: LOTW_BBL_answer_date !< The vintage of the order of arithmetic and expressions
168170
!! in the LOTW_BBL calculations. Values below 20240630 recover the
169171
!! original answers, while higher values use more accurate expressions.
170172
!! This only applies when USE_LOTW_BBL_DIFFUSIVITY is true.
173+
integer :: drag_diff_answer_date !< The vintage of the order of arithmetic in the drag diffusivity
174+
!! calculations. Values above 20250301 use less confusing expressions
175+
!! to set the bottom-drag generated diffusivity when
176+
!! USE_LOTW_BBL_DIFFUSIVITY is false.
171177

172178
character(len=200) :: inputdir !< The directory in which input files are found
173179
type(user_change_diff_CS), pointer :: user_change_diff_CSp => NULL() !< Control structure for a child module
@@ -1414,7 +1420,11 @@ subroutine add_drag_diffusivity(h, u, v, tv, fluxes, visc, j, TKE_to_Kd, maxTKE,
14141420
! If ustar_h = 0, this is land so this value doesn't matter.
14151421
I2decay(i) = 0.5*CS%IMax_decay
14161422
endif
1417-
TKE(i) = ((CS%BBL_effic * cdrag_sqrt) * exp(-I2decay(i)*h(i,j,nz)) ) * visc%BBL_meanKE_loss(i,j)
1423+
if (CS%drag_diff_answer_date <= 20250301) then
1424+
TKE(i) = ((CS%BBL_effic * cdrag_sqrt) * exp(-I2decay(i)*h(i,j,nz)) ) * visc%BBL_meanKE_loss_sqrtCd(i,j)
1425+
else
1426+
TKE(i) = (CS%BBL_effic * exp(-I2decay(i)*h(i,j,nz)) ) * visc%BBL_meanKE_loss(i,j)
1427+
endif
14181428

14191429
if (associated(fluxes%BBL_tidal_dis)) &
14201430
TKE(i) = TKE(i) + fluxes%BBL_tidal_dis(i,j) * GV%RZ_to_H * &
@@ -1644,8 +1654,7 @@ subroutine add_LOTW_BBL_diffusivity(h, u, v, tv, fluxes, visc, j, N2_int, Rho_bo
16441654

16451655
! Energy input at the bottom [H Z2 T-3 ~> m3 s-3 or W m-2].
16461656
! (Note that visc%BBL_meanKE_loss is in [H L2 T-3 ~> m3 s-3 or W m-2], set in set_BBL_TKE().)
1647-
!### I am still unsure about sqrt(cdrag) in this expressions - AJA
1648-
BBL_meanKE_dis = cdrag_sqrt * visc%BBL_meanKE_loss(i,j)
1657+
BBL_meanKE_dis = visc%BBL_meanKE_loss(i,j)
16491658
! Add in tidal dissipation energy at the bottom [H Z2 T-3 ~> m3 s-3 or W m-2].
16501659
! Note that BBL_tidal_dis is in [R Z L2 T-3 ~> W m-2].
16511660
if (associated(fluxes%BBL_tidal_dis)) &
@@ -1956,6 +1965,9 @@ subroutine set_BBL_TKE(u, v, h, tv, fluxes, visc, G, GV, US, CS, OBC)
19561965
if (allocated(visc%BBL_meanKE_loss)) then
19571966
do j=js,je ; do i=is,ie ; visc%BBL_meanKE_loss(i,j) = 0.0 ; enddo ; enddo
19581967
endif
1968+
if (allocated(visc%BBL_meanKE_loss_sqrtCd)) then
1969+
do j=js,je ; do i=is,ie ; visc%BBL_meanKE_loss_sqrtCd(i,j) = 0.0 ; enddo ; enddo
1970+
endif
19591971
return
19601972
endif
19611973

@@ -2079,7 +2091,13 @@ subroutine set_BBL_TKE(u, v, h, tv, fluxes, visc, G, GV, US, CS, OBC)
20792091
(G%areaCu(I,j)*(ustar(I)*ustar(I)))) + &
20802092
((G%areaCv(i,J-1)*(vstar(i,J-1)*vstar(i,J-1))) + &
20812093
(G%areaCv(i,J)*(vstar(i,J)*vstar(i,J)))) ) )
2082-
visc%BBL_meanKE_loss(i,j) = &
2094+
visc%BBL_meanKE_loss(i,j) = cdrag_sqrt * &
2095+
((((G%areaCu(I-1,j)*(ustar(I-1)*u2_bbl(I-1))) + &
2096+
(G%areaCu(I,j) * (ustar(I)*u2_bbl(I)))) + &
2097+
((G%areaCv(i,J-1)*(vstar(i,J-1)*v2_bbl(i,J-1))) + &
2098+
(G%areaCv(i,J) * (vstar(i,J)*v2_bbl(i,J)))) )*G%IareaT(i,j))
2099+
! The following line could be omitted if SET_DIFF_ANSWER_DATE > 20250301 and EPBL_BBL_EFFIC_BUG is false.
2100+
visc%BBL_meanKE_loss_sqrtCd(i,j) = &
20832101
((((G%areaCu(I-1,j)*(ustar(I-1)*u2_bbl(I-1))) + &
20842102
(G%areaCu(I,j) * (ustar(I)*u2_bbl(I)))) + &
20852103
((G%areaCv(i,J-1)*(vstar(i,J-1)*v2_bbl(i,J-1))) + &
@@ -2289,7 +2307,9 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
22892307
call get_param(param_file, mdl, "SET_DIFF_ANSWER_DATE", CS%answer_date, &
22902308
"The vintage of the order of arithmetic and expressions in the set diffusivity "//&
22912309
"calculations. Values below 20190101 recover the answers from the end of 2018, "//&
2292-
"while higher values use updated and more robust forms of the same expressions.", &
2310+
"while higher values use updated and more robust forms of the same expressions. "//&
2311+
"Values above 20250301 also use less confusing expressions to set the bottom-drag "//&
2312+
"generated diffusivity when USE_LOTW_BBL_DIFFUSIVITY is false.", &
22932313
default=default_answer_date, do_not_log=.not.GV%Boussinesq)
22942314
if (.not.GV%Boussinesq) CS%answer_date = max(CS%answer_date, 20230701)
22952315

@@ -2405,6 +2425,12 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
24052425
"USE_LOTW_BBL_DIFFUSIVITY is true.", &
24062426
default=20190101, do_not_log=.not.CS%use_LOTW_BBL_diffusivity)
24072427
!### Set default as default=default_answer_date, or use SET_DIFF_ANSWER_DATE.
2428+
call get_param(param_file, mdl, "DRAG_DIFFUSIVITY_ANSWER_DATE", CS%drag_diff_answer_date, &
2429+
"The vintage of the order of arithmetic in the drag diffusivity calculations. "//&
2430+
"Values above 20250301 use less confusing expressions to set the bottom-drag "//&
2431+
"generated diffusivity when USE_LOTW_BBL_DIFFUSIVITY is false. ", &
2432+
default=20250101, do_not_log=CS%use_LOTW_BBL_diffusivity.or.(CS%BBL_effic<=0.0))
2433+
!### Set default as default=default_answer_date, or use SET_DIFF_ANSWER_DATE.
24082434

24092435
CS%id_Kd_BBL = register_diag_field('ocean_model', 'Kd_BBL', diag%axesTi, Time, &
24102436
'Bottom Boundary Layer Diffusivity', 'm2 s-1', conversion=GV%HZ_T_to_m2_s)

src/parameterizations/vertical/MOM_set_viscosity.F90

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3140,6 +3140,7 @@ subroutine set_visc_init(Time, G, GV, US, param_file, diag, visc, CS, restart_CS
31403140
allocate(visc%kv_bbl_v(isd:ied,JsdB:JedB), source=0.0)
31413141
allocate(visc%ustar_bbl(isd:ied,jsd:jed), source=0.0)
31423142
allocate(visc%BBL_meanKE_loss(isd:ied,jsd:jed), source=0.0)
3143+
allocate(visc%BBL_meanKE_loss_sqrtCd(isd:ied,jsd:jed), source=0.0)
31433144

31443145
CS%id_bbl_thick_u = register_diag_field('ocean_model', 'bbl_thick_u', &
31453146
diag%axesCu1, Time, 'BBL thickness at u points', 'm', conversion=US%Z_to_m)
@@ -3215,6 +3216,7 @@ subroutine set_visc_end(visc, CS)
32153216
if (associated(visc%Kv_shear_Bu)) deallocate(visc%Kv_shear_Bu)
32163217
if (allocated(visc%ustar_bbl)) deallocate(visc%ustar_bbl)
32173218
if (allocated(visc%BBL_meanKE_loss)) deallocate(visc%BBL_meanKE_loss)
3219+
if (allocated(visc%BBL_meanKE_loss_sqrtCd)) deallocate(visc%BBL_meanKE_loss_sqrtCd)
32183220
if (allocated(visc%taux_shelf)) deallocate(visc%taux_shelf)
32193221
if (allocated(visc%tauy_shelf)) deallocate(visc%tauy_shelf)
32203222
if (allocated(visc%tbl_thick_shelf_u)) deallocate(visc%tbl_thick_shelf_u)

0 commit comments

Comments
 (0)