Skip to content

Commit 30edcf8

Browse files
committed
+Rename visc%TKE_BBL to visc%BBL_meanKE_loss
Revised the name of visc%TKE_BBL to visc%BBL_meanKE_loss to better reflect what these variables contain, and the fact that the efficiency of the conversion from mean kinetic energy loss to turbulent kinetic energy has not been applied yet. The units of visc%BBL_meanKE_loss are [H L2 T-3 ~> m3 s-3 or W m-2], whereas those of visc%TKE_BBL were [H Z2 T-3 ~> m3 s-3 or W m-2]. The factor rescaling between the units of mean kinetic energy and those of turbulent kinetic energy have been incorporated into set_diffusivity_CS%BBL_effic and energetic_PBL_CS%ePBL_BBL_effic. All answers are bitwise identical.
1 parent 54feb6f commit 30edcf8

File tree

4 files changed

+33
-26
lines changed

4 files changed

+33
-26
lines changed

src/core/MOM_variables.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ module MOM_variables
237237
kv_bbl_v, & !< The bottom boundary layer viscosity at the v-points [H Z T-1 ~> m2 s-1 or Pa s]
238238
ustar_BBL, & !< The turbulence velocity in the bottom boundary layer at
239239
!! h points [H T-1 ~> m s-1 or kg m-2 s-1].
240-
TKE_BBL, & !< A term related to the bottom boundary layer source of turbulent kinetic
241-
!! energy, currently in [H Z2 T-3 ~> m3 s-3 or W m-2].
240+
BBL_meanKE_loss, & !< The viscous loss of mean kinetic energy in the bottom boundary layer
241+
!! [H L2 T-3 ~> m3 s-3 or W m-2].
242242
taux_shelf, & !< The zonal stresses on the ocean under shelves [R Z L T-2 ~> Pa].
243243
tauy_shelf !< The meridional stresses on the ocean under shelves [R Z L T-2 ~> Pa].
244244
real, allocatable, dimension(:,:) :: tbl_thick_shelf_u

src/parameterizations/vertical/MOM_energetic_PBL.F90

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ module MOM_energetic_PBL
162162
real :: Max_Enhance_M = 5. !< The maximum allowed LT enhancement to the mixing [nondim].
163163

164164
!/ Bottom boundary layer mixing related options
165-
real :: ePBL_BBL_effic !< The efficiency of bottom boundary layer mixing via ePBL [nondim]
165+
real :: ePBL_BBL_effic !< The efficiency of bottom boundary layer mixing via ePBL, times
166+
!! conversion factors between the natural units of mean kinetic energy
167+
!! and those those used for TKE [Z2 L-2 ~> nondim].
166168
logical :: Use_BBLD_iteration !< If true, use the proximity to the top of the actively turbulent
167169
!! bottom boundary layer to constrain the mixing lengths.
168170
real :: TKE_decay_BBL !< The ratio of the natural Ekman depth to the TKE decay scale for
@@ -654,7 +656,7 @@ subroutine energetic_PBL(h_3d, u_3d, v_3d, tv, fluxes, visc, dt, Kd_int, G, GV,
654656
if (CS%ePBL_BBL_effic > 0.0) then
655657
if (CS%MLD_iteration_guess .and. (CS%BBL_depth(i,j) > 0.0)) BBLD_io = CS%BBL_depth(i,j)
656658
BBLD_in = BBLD_io
657-
BBL_TKE = CS%ePBL_BBL_effic * GV%H_to_RZ * dt * visc%TKE_BBL(i,j)
659+
BBL_TKE = CS%ePBL_BBL_effic * GV%H_to_RZ * dt * visc%BBL_meanKE_loss(i,j)
658660
u_star_BBL = max(visc%ustar_BBL(i,j), CS%ustar_min*GV%Z_to_H)
659661
call ePBL_BBL_column(h, dz, u, v, T0, S0, dSV_dT_1d, dSV_dS_1d, SpV_dt, absf, dt, Kd, BBL_TKE, &
660662
u_star_BBL, Kd_BBL, BBLD_io, mixvel_BBL, mixlen_BBL, GV, US, CS, eCD)
@@ -730,7 +732,7 @@ subroutine energetic_PBL(h_3d, u_3d, v_3d, tv, fluxes, visc, dt, Kd_int, G, GV,
730732
mixvel, mixlen, GV, US, CS_tmp2, eCD_tmp, Waves, G, i, j)
731733
else
732734
BLD_1 = BBLD_in ; BLD_2 = BBLD_in
733-
BBL_TKE = CS%ePBL_BBL_effic * GV%H_to_RZ * dt * visc%TKE_BBL(i,j)
735+
BBL_TKE = CS%ePBL_BBL_effic * GV%H_to_RZ * dt * visc%BBL_meanKE_loss(i,j)
734736
u_star_BBL = max(visc%ustar_BBL(i,j), CS%ustar_min*GV%Z_to_H)
735737
call ePBL_BBL_column(h, dz, u, v, T0, S0, dSV_dT_1d, dSV_dS_1d, SpV_dt, absf, dt, Kd, BBL_TKE, &
736738
u_star_BBL, Kd_1, BLD_1, mixvel_BBL, mixlen_BBL, GV, US, CS_tmp1, eCD_tmp)
@@ -760,7 +762,8 @@ subroutine energetic_PBL(h_3d, u_3d, v_3d, tv, fluxes, visc, dt, Kd_int, G, GV,
760762
enddo ! j-loop
761763

762764
if (CS%debug .and. (CS%ePBL_BBL_effic > 0.0)) then
763-
call hchksum(visc%TKE_BBL, "ePBL visc%TKE_BBL", G%HI, unscale=GV%H_to_MKS*US%Z_to_m**2*US%s_to_T**3)
765+
call hchksum(visc%BBL_meanKE_loss, "ePBL visc%BBL_meanKE_loss", G%HI, &
766+
unscale=GV%H_to_MKS*US%L_T_to_m_s**2*US%s_to_T)
764767
call hchksum(visc%ustar_BBL, "ePBL visc%ustar_BBL", G%HI, unscale=GV%H_to_MKS*US%s_to_T)
765768
call hchksum(Kd_int, "End of ePBL Kd_int", G%HI, unscale=GV%H_to_MKS*US%Z_to_m*US%s_to_T)
766769
call hchksum(diag_Velocity_Scale, "ePBL Velocity_Scale", G%HI, unscale=US%Z_to_m*US%s_to_T)
@@ -3670,7 +3673,7 @@ subroutine energetic_PBL_init(Time, G, GV, US, param_file, diag, CS)
36703673
call get_param(param_file, mdl, "EPBL_BBL_EFFIC", CS%ePBL_BBL_effic, &
36713674
"The efficiency of bottom boundary layer mixing via ePBL. Setting this to a "//&
36723675
"value that is greater than 0 to enable bottom boundary layer mixing from EPBL.", &
3673-
units="nondim", default=0.0)
3676+
units="nondim", default=0.0, scale=US%L_to_Z**2)
36743677
no_BBL = (CS%ePBL_BBL_effic<=0.0)
36753678
call get_param(param_file, mdl, "USE_BBLD_ITERATION", CS%Use_BBLD_iteration, &
36763679
"A logical that specifies whether or not to use the distance to the top of the "//&

src/parameterizations/vertical/MOM_set_diffusivity.F90

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ module MOM_set_diffusivity
7575
logical :: LOTW_BBL_use_omega !< If true, use simpler/less precise, BBL diffusivity.
7676
real :: Von_Karm !< The von Karman constant as used in the BBL diffusivity calculation
7777
!! [nondim]. See (http://en.wikipedia.org/wiki/Von_Karman_constant)
78-
real :: BBL_effic !< efficiency with which the energy extracted
79-
!! by bottom drag drives BBL diffusion in the original BBL scheme [nondim]
78+
real :: BBL_effic !< Efficiency with which the energy extracted
79+
!! by bottom drag drives BBL diffusion in the original BBL scheme, times
80+
!! conversion factors between the natural units of mean kinetic energy
81+
!! and those those used for TKE [Z2 L-2 ~> nondim].
8082
real :: ePBL_BBL_effic !< efficiency with which the energy extracted
8183
!! by bottom drag drives BBL diffusion in the ePBL BBL scheme [nondim]
8284
real :: cdrag !< quadratic drag coefficient [nondim]
@@ -1412,10 +1414,10 @@ subroutine add_drag_diffusivity(h, u, v, tv, fluxes, visc, j, TKE_to_Kd, maxTKE,
14121414
! If ustar_h = 0, this is land so this value doesn't matter.
14131415
I2decay(i) = 0.5*CS%IMax_decay
14141416
endif
1415-
TKE(i) = ((CS%BBL_effic * cdrag_sqrt) * exp(-I2decay(i)*h(i,j,nz)) ) * visc%TKE_BBL(i,j)
1417+
TKE(i) = ((CS%BBL_effic * cdrag_sqrt) * exp(-I2decay(i)*h(i,j,nz)) ) * visc%BBL_meanKE_loss(i,j)
14161418

14171419
if (associated(fluxes%TKE_tidal)) &
1418-
TKE(i) = TKE(i) + fluxes%TKE_tidal(i,j) * GV%RZ_to_H * &
1420+
TKE(i) = TKE(i) + US%Z_to_L**2*fluxes%TKE_tidal(i,j) * GV%RZ_to_H * &
14191421
(CS%BBL_effic * exp(-I2decay(i)*h(i,j,nz)))
14201422

14211423
! Distribute the work over a BBL of depth 20^2 ustar^2 / g' following
@@ -1471,7 +1473,7 @@ subroutine add_drag_diffusivity(h, u, v, tv, fluxes, visc, j, TKE_to_Kd, maxTKE,
14711473
else ; TKE_to_layer = 0.0 ; endif
14721474

14731475
! TKE_Ray has been initialized to 0 above.
1474-
if (Rayleigh_drag) TKE_Ray = 0.5*CS%BBL_effic * US%L_to_Z**2 * G%IareaT(i,j) * &
1476+
if (Rayleigh_drag) TKE_Ray = 0.5*CS%BBL_effic * G%IareaT(i,j) * &
14751477
(((G%areaCu(I-1,j) * visc%Ray_u(I-1,j,k) * u(I-1,j,k)**2) + &
14761478
(G%areaCu(I,j) * visc%Ray_u(I,j,k) * u(I,j,k)**2)) + &
14771479
((G%areaCv(i,J-1) * visc%Ray_v(i,J-1,k) * v(i,J-1,k)**2) + &
@@ -1576,6 +1578,8 @@ subroutine add_LOTW_BBL_diffusivity(h, u, v, tv, fluxes, visc, j, N2_int, Rho_bo
15761578
real :: dz(SZI_(G),SZK_(GV)) ! Height change across layers [Z ~> m]
15771579
real :: dz_above(SZK_(GV)+1) ! Distance from each interface to the surface [Z ~> m]
15781580
real :: TKE_column ! net TKE input into the column [H Z2 T-3 ~> m3 s-3 or W m-2]
1581+
real :: BBL_meanKE_dis ! Sum of tidal and mean kinetic energy dissipation in the bottom boundary layer, which
1582+
! can act as a source of TKE [H L2 T-3 ~> m3 s-3 or W m-2]
15791583
real :: TKE_remaining ! remaining TKE available for mixing in this layer and above [H Z2 T-3 ~> m3 s-3 or W m-2]
15801584
real :: TKE_consumed ! TKE used for mixing in this layer [H Z2 T-3 ~> m3 s-3 or W m-2]
15811585
real :: TKE_Kd_wall ! TKE associated with unlimited law of the wall mixing [H Z2 T-3 ~> m3 s-3 or W m-2]
@@ -1639,14 +1643,14 @@ subroutine add_LOTW_BBL_diffusivity(h, u, v, tv, fluxes, visc, j, N2_int, Rho_bo
16391643
if ((ustar > 0.0) .and. (absf > CS%IMax_decay * ustar)) Idecay = absf / ustar
16401644

16411645
! Energy input at the bottom [H Z2 T-3 ~> m3 s-3 or W m-2].
1642-
! (Note that visc%TKE_BBL is in [H Z2 T-3 ~> m3 s-3 or W m-2], set in set_BBL_TKE().)
1643-
! I am still unsure about sqrt(cdrag) in this expressions - AJA
1644-
TKE_column = cdrag_sqrt * visc%TKE_BBL(i,j)
1646+
! (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)
16451649
! Add in tidal dissipation energy at the bottom [H Z2 T-3 ~> m3 s-3 or W m-2].
16461650
! Note that TKE_tidal is in [R Z3 T-3 ~> W m-2].
16471651
if (associated(fluxes%TKE_tidal)) &
1648-
TKE_column = TKE_column + fluxes%TKE_tidal(i,j) * GV%RZ_to_H
1649-
TKE_column = CS%BBL_effic * TKE_column ! Only use a fraction of the mechanical dissipation for mixing.
1652+
BBL_meanKE_dis = BBL_meanKE_dis + US%Z_to_L**2*fluxes%TKE_tidal(i,j) * GV%RZ_to_H
1653+
TKE_column = CS%BBL_effic * BBL_meanKE_dis ! Only use a fraction of the mechanical dissipation for mixing.
16501654

16511655
TKE_remaining = TKE_column
16521656
if (CS%LOTW_BBL_answer_date > 20240630) then
@@ -1670,7 +1674,7 @@ subroutine add_LOTW_BBL_diffusivity(h, u, v, tv, fluxes, visc, j, N2_int, Rho_bo
16701674

16711675
! Add in additional energy input from bottom-drag against slopes (sides)
16721676
if (Rayleigh_drag) TKE_remaining = TKE_remaining + &
1673-
0.5*CS%BBL_effic * US%L_to_Z**2 * G%IareaT(i,j) * &
1677+
0.5*CS%BBL_effic * G%IareaT(i,j) * &
16741678
(((G%areaCu(I-1,j) * visc%Ray_u(I-1,j,k) * u(I-1,j,k)**2) + &
16751679
(G%areaCu(I,j) * visc%Ray_u(I,j,k) * u(I,j,k)**2)) + &
16761680
((G%areaCv(i,J-1) * visc%Ray_v(i,J-1,k) * v(i,J-1,k)**2) + &
@@ -1949,8 +1953,8 @@ subroutine set_BBL_TKE(u, v, h, tv, fluxes, visc, G, GV, US, CS, OBC)
19491953
if (allocated(visc%ustar_BBL)) then
19501954
do j=js,je ; do i=is,ie ; visc%ustar_BBL(i,j) = 0.0 ; enddo ; enddo
19511955
endif
1952-
if (allocated(visc%TKE_BBL)) then
1953-
do j=js,je ; do i=is,ie ; visc%TKE_BBL(i,j) = 0.0 ; enddo ; enddo
1956+
if (allocated(visc%BBL_meanKE_loss)) then
1957+
do j=js,je ; do i=is,ie ; visc%BBL_meanKE_loss(i,j) = 0.0 ; enddo ; enddo
19541958
endif
19551959
return
19561960
endif
@@ -2075,7 +2079,7 @@ subroutine set_BBL_TKE(u, v, h, tv, fluxes, visc, G, GV, US, CS, OBC)
20752079
(G%areaCu(I,j)*(ustar(I)*ustar(I)))) + &
20762080
((G%areaCv(i,J-1)*(vstar(i,J-1)*vstar(i,J-1))) + &
20772081
(G%areaCv(i,J)*(vstar(i,J)*vstar(i,J)))) ) )
2078-
visc%TKE_BBL(i,j) = US%L_to_Z**2 * &
2082+
visc%BBL_meanKE_loss(i,j) = &
20792083
((((G%areaCu(I-1,j)*(ustar(I-1)*u2_bbl(I-1))) + &
20802084
(G%areaCu(I,j) * (ustar(I)*u2_bbl(I)))) + &
20812085
((G%areaCv(i,J-1)*(vstar(i,J-1)*v2_bbl(i,J-1))) + &
@@ -2358,9 +2362,9 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
23582362
"velocity field to the bottom stress. CDRAG is only used "//&
23592363
"if BOTTOMDRAGLAW is true.", units="nondim", default=0.003)
23602364
call get_param(param_file, mdl, "BBL_EFFIC", CS%BBL_effic, &
2361-
"The efficiency with which the energy extracted by "//&
2362-
"bottom drag drives BBL diffusion. This is only "//&
2363-
"used if BOTTOMDRAGLAW is true.", units="nondim", default=0.20)
2365+
"The efficiency with which the energy extracted by bottom drag drives BBL "//&
2366+
"diffusion. This is only used if BOTTOMDRAGLAW is true.", &
2367+
units="nondim", default=0.20, scale=US%L_to_Z**2)
23642368
call get_param(param_file, mdl, "EPBL_BBL_EFFIC", CS%ePBL_BBL_effic, &
23652369
units="nondim", default=0.0,do_not_log=.true.)
23662370
call get_param(param_file, mdl, "BBL_MIXING_MAX_DECAY", decay_length, &

src/parameterizations/vertical/MOM_set_viscosity.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3139,7 +3139,7 @@ subroutine set_visc_init(Time, G, GV, US, param_file, diag, visc, CS, restart_CS
31393139
allocate(visc%kv_bbl_u(IsdB:IedB,jsd:jed), source=0.0)
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)
3142-
allocate(visc%TKE_bbl(isd:ied,jsd:jed), source=0.0)
3142+
allocate(visc%BBL_meanKE_loss(isd:ied,jsd:jed), source=0.0)
31433143

31443144
CS%id_bbl_thick_u = register_diag_field('ocean_model', 'bbl_thick_u', &
31453145
diag%axesCu1, Time, 'BBL thickness at u points', 'm', conversion=US%Z_to_m)
@@ -3214,7 +3214,7 @@ subroutine set_visc_end(visc, CS)
32143214
if (associated(visc%Kv_shear)) deallocate(visc%Kv_shear)
32153215
if (associated(visc%Kv_shear_Bu)) deallocate(visc%Kv_shear_Bu)
32163216
if (allocated(visc%ustar_bbl)) deallocate(visc%ustar_bbl)
3217-
if (allocated(visc%TKE_bbl)) deallocate(visc%TKE_bbl)
3217+
if (allocated(visc%BBL_meanKE_loss)) deallocate(visc%BBL_meanKE_loss)
32183218
if (allocated(visc%taux_shelf)) deallocate(visc%taux_shelf)
32193219
if (allocated(visc%tauy_shelf)) deallocate(visc%tauy_shelf)
32203220
if (allocated(visc%tbl_thick_shelf_u)) deallocate(visc%tbl_thick_shelf_u)

0 commit comments

Comments
 (0)