diff --git a/src/core/MOM_variables.F90 b/src/core/MOM_variables.F90 index cabda1cf58..30e40313bb 100644 --- a/src/core/MOM_variables.F90 +++ b/src/core/MOM_variables.F90 @@ -228,8 +228,6 @@ module MOM_variables !> Vertical viscosities, drag coefficients, and related fields. type, public :: vertvisc_type - real :: Prandtl_turb !< The Prandtl number for the turbulent diffusion - !! that is captured in Kd_shear [nondim]. real, allocatable, dimension(:,:) :: & bbl_thick_u, & !< The bottom boundary layer thickness at the u-points [Z ~> m]. bbl_thick_v, & !< The bottom boundary layer thickness at the v-points [Z ~> m]. diff --git a/src/parameterizations/vertical/MOM_kappa_shear.F90 b/src/parameterizations/vertical/MOM_kappa_shear.F90 index 8efde6352f..b3f8fb4da1 100644 --- a/src/parameterizations/vertical/MOM_kappa_shear.F90 +++ b/src/parameterizations/vertical/MOM_kappa_shear.F90 @@ -1969,7 +1969,7 @@ function kappa_shear_init(Time, G, GV, US, param_file, diag, CS) default=13, do_not_log=just_read) call get_param(param_file, mdl, "PRANDTL_TURB", CS%Prandtl_turb, & "The turbulent Prandtl number applied to shear instability.", & - units="nondim", default=1.0, do_not_log=.true.) + units="nondim", default=1.0, do_not_log=just_read) call get_param(param_file, mdl, "VEL_UNDERFLOW", CS%vel_underflow, & "A negligibly small velocity magnitude below which velocity components are set "//& "to 0. A reasonable value might be 1e-30 m/s, which is less than an "//& diff --git a/src/parameterizations/vertical/MOM_set_viscosity.F90 b/src/parameterizations/vertical/MOM_set_viscosity.F90 index 0d5b3362b4..398fb66345 100644 --- a/src/parameterizations/vertical/MOM_set_viscosity.F90 +++ b/src/parameterizations/vertical/MOM_set_viscosity.F90 @@ -416,6 +416,7 @@ subroutine set_viscous_BBL(u, v, h, tv, visc, G, GV, US, CS, pbv) if (.not.use_BBL_EOS) Rml_vel(:,:) = 0.0 + ! Resetting Ray_[uv] is required by body force drag. if (allocated(visc%Ray_u)) visc%Ray_u(:,:,:) = 0.0 if (allocated(visc%Ray_v)) visc%Ray_v(:,:,:) = 0.0 @@ -582,6 +583,21 @@ subroutine set_viscous_BBL(u, v, h, tv, visc, G, GV, US, CS, pbv) endif endif ; endif + ! Set the "back ground" friction velocity scale to either the tidal amplitude or place-holder constant + if (CS%BBL_use_tidal_bg) then + do i=is,ie ; if (do_i(i)) then ; if (m==1) then + u2_bg(I) = 0.5*( G%mask2dT(i,j)*(CS%tideamp(i,j)*CS%tideamp(i,j))+ & + G%mask2dT(i+1,j)*(CS%tideamp(i+1,j)*CS%tideamp(i+1,j)) ) + else + u2_bg(i) = 0.5*( G%mask2dT(i,j)*(CS%tideamp(i,j)*CS%tideamp(i,j))+ & + G%mask2dT(i,j+1)*(CS%tideamp(i,j+1)*CS%tideamp(i,j+1)) ) + endif ; endif ; enddo + else + do i=is,ie ; if (do_i(i)) then + u2_bg(i) = CS%drag_bg_vel * CS%drag_bg_vel + endif ; enddo + endif + if (use_BBL_EOS .or. CS%body_force_drag .or. .not.CS%linear_drag) then ! Calculate the mean velocity magnitude over the bottommost CS%Hbbl of ! the water column for determining the quadratic bottom drag. @@ -591,18 +607,6 @@ subroutine set_viscous_BBL(u, v, h, tv, visc, G, GV, US, CS, pbv) dztot_vel = 0.0 ; dzwtot = 0.0 Thtot = 0.0 ; Shtot = 0.0 ; SpV_htot = 0.0 - ! Set the "back ground" friction velocity scale to either the tidal amplitude or place-holder constant - if (CS%BBL_use_tidal_bg) then - if (m==1) then - u2_bg(I) = 0.5*( G%mask2dT(i,j)*(CS%tideamp(i,j)*CS%tideamp(i,j))+ & - G%mask2dT(i+1,j)*(CS%tideamp(i+1,j)*CS%tideamp(i+1,j)) ) - else - u2_bg(i) = 0.5*( G%mask2dT(i,j)*(CS%tideamp(i,j)*CS%tideamp(i,j))+ & - G%mask2dT(i,j+1)*(CS%tideamp(i,j+1)*CS%tideamp(i,j+1)) ) - endif - else - u2_bg(i) = CS%drag_bg_vel * CS%drag_bg_vel - endif do k=nz,1,-1 if (htot_vel>=CS%Hbbl) exit ! terminate the k loop @@ -802,19 +806,6 @@ subroutine set_viscous_BBL(u, v, h, tv, visc, G, GV, US, CS, pbv) if (m==1) then ; C2f = G%CoriolisBu(I,J-1) + G%CoriolisBu(I,J) else ; C2f = G%CoriolisBu(I-1,J) + G%CoriolisBu(I,J) ; endif - ! Set the "back ground" friction velocity scale to either the tidal amplitude or place-holder constant - if (CS%BBL_use_tidal_bg) then - if (m==1) then - u2_bg(I) = 0.5*( G%mask2dT(i,j)*(CS%tideamp(i,j)*CS%tideamp(i,j))+ & - G%mask2dT(i+1,j)*(CS%tideamp(i+1,j)*CS%tideamp(i+1,j)) ) - else - u2_bg(i) = 0.5*( G%mask2dT(i,j)*(CS%tideamp(i,j)*CS%tideamp(i,j))+ & - G%mask2dT(i,j+1)*(CS%tideamp(i,j+1)*CS%tideamp(i,j+1)) ) - endif - else - u2_bg(i) = CS%drag_bg_vel * CS%drag_bg_vel - endif - ! The thickness of a rotation limited BBL ignoring stratification is ! h_f ~ Cn u* / f (limit of KW99 eq. 2.20 for N->0). ! The buoyancy limit of BBL thickness (h_N) is already in the variable htot from above. @@ -2956,9 +2947,6 @@ subroutine set_visc_init(Time, G, GV, US, param_file, diag, visc, CS, restart_CS CS%RiNo_mix = kappa_shear_is_used(param_file) endif - call get_param(param_file, mdl, "PRANDTL_TURB", visc%Prandtl_turb, & - "The turbulent Prandtl number applied to shear "//& - "instability.", units="nondim", default=1.0) call get_param(param_file, mdl, "DEBUG", CS%debug, default=.false.) call get_param(param_file, mdl, "DYNAMIC_VISCOUS_ML", CS%dynamic_viscous_ML, & diff --git a/src/parameterizations/vertical/MOM_vert_friction.F90 b/src/parameterizations/vertical/MOM_vert_friction.F90 index 8a9b93faab..454e39371d 100644 --- a/src/parameterizations/vertical/MOM_vert_friction.F90 +++ b/src/parameterizations/vertical/MOM_vert_friction.F90 @@ -2105,11 +2105,7 @@ subroutine find_coupling_coef(a_cpl, hvel, do_i, h_harm, bbl_thick, kv_bbl, z_i, dhc = hvel(i,nz)*0.5 ! These expressions assume that Kv_tot(i,nz+1) = CS%Kv, consistent with ! the suppression of turbulent mixing by the presence of a solid boundary. - if (dhc < bbl_thick(i)) then - a_cpl(i,nz+1) = kv_bbl(i) / ((dhc+h_neglect) + I_amax*kv_bbl(i)) - else - a_cpl(i,nz+1) = kv_bbl(i) / ((bbl_thick(i)+h_neglect) + I_amax*kv_bbl(i)) - endif + a_cpl(i,nz+1) = kv_bbl(i) / ((min(dhc, bbl_thick(i)) + h_neglect) + I_amax*kv_bbl(i)) endif ; enddo do K=nz,2,-1 ; do i=is,ie ; if (do_i(i)) then ! botfn determines when a point is within the influence of the bottom