Skip to content

Commit c56450a

Browse files
Deletes all code related to Jansen15_drag
1 parent 21fd427 commit c56450a

File tree

1 file changed

+24
-51
lines changed

1 file changed

+24
-51
lines changed

src/parameterizations/lateral/MOM_MEKE.F90

Lines changed: 24 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ module MOM_MEKE
4343
real :: MEKE_min_gamma!< Minimum value of gamma_b^2 allowed [nondim]
4444
real :: MEKE_Ct !< Coefficient in the \f$\gamma_{bt}\f$ expression [nondim]
4545
logical :: visc_drag !< If true use the vertvisc_type to calculate bottom drag.
46-
logical :: Jansen15_drag !< If true use the bottom drag formulation from Jansen et al. (2015)
4746
logical :: MEKE_GEOMETRIC !< If true, uses the GM coefficient formulation from the GEOMETRIC
4847
!! framework (Marshall et al., 2012)
4948
logical :: GM_src_alt !< If true, use the GM energy conversion form S^2*N^2*kappa rather
@@ -326,37 +325,22 @@ subroutine step_forward_MEKE(MEKE, h, SN_u, SN_v, visc, dt, G, GV, US, CS, hu, h
326325
if (use_drag_rate) then
327326
! Calculate a viscous drag rate (includes BBL contributions from mean flow and eddies)
328327
!$OMP do
329-
if (CS%Jansen15_drag) then
330-
do j=js,je ; do i=is,ie
331-
drag_rate(i,j) = (cdrag2/MAX(1.0,G%bathyT(i,j))) * sqrt(CS%MEKE_Uscale**2 + drag_rate_visc(i,j)**2 + &
332-
2.0*bottomFac2(i,j)*MEKE%MEKE(i,j)) * 2.0 * bottomFac2(i,j)*MEKE%MEKE(i,j)
333-
enddo ; enddo
334-
else
335-
do j=js,je ; do i=is,ie
336-
drag_rate(i,j) = (Rho0 * I_mass(i,j)) * sqrt( drag_rate_visc(i,j)**2 &
337-
+ cdrag2 * ( max(0.0, 2.0*bottomFac2(i,j)*MEKE%MEKE(i,j)) + CS%MEKE_Uscale**2 ) )
338-
enddo ; enddo
339-
endif
328+
do j=js,je ; do i=is,ie
329+
drag_rate(i,j) = (Rho0 * I_mass(i,j)) * sqrt( drag_rate_visc(i,j)**2 &
330+
+ cdrag2 * ( max(0.0, 2.0*bottomFac2(i,j)*MEKE%MEKE(i,j)) + CS%MEKE_Uscale**2 ) )
331+
enddo ; enddo
340332
endif
341333

342334
! First stage of Strang splitting
343335
!$OMP do
344-
if (CS%Jansen15_drag) then
345-
do j=js,je ; do i=is,ie
346-
ldamping = CS%MEKE_damping + drag_rate(i,j)
347-
MEKE%MEKE(i,j) = MEKE%MEKE(i,j) - MIN(MEKE%MEKE(i,j),sdt_damp*drag_rate(i,j))
348-
MEKE_decay(i,j) = ldamping*G%mask2dT(i,j)
349-
enddo ; enddo
350-
else
351-
do j=js,je ; do i=is,ie
352-
ldamping = CS%MEKE_damping + drag_rate(i,j) * bottomFac2(i,j)
353-
if (MEKE%MEKE(i,j)<0.) ldamping = 0.
354-
! notice that the above line ensures a damping only if MEKE is positive,
355-
! while leaving MEKE unchanged if it is negative
356-
MEKE%MEKE(i,j) = MEKE%MEKE(i,j) / (1.0 + sdt_damp*ldamping)
357-
MEKE_decay(i,j) = ldamping*G%mask2dT(i,j)
358-
enddo ; enddo
359-
endif
336+
do j=js,je ; do i=is,ie
337+
ldamping = CS%MEKE_damping + drag_rate(i,j) * bottomFac2(i,j)
338+
if (MEKE%MEKE(i,j)<0.) ldamping = 0.
339+
! notice that the above line ensures a damping only if MEKE is positive,
340+
! while leaving MEKE unchanged if it is negative
341+
MEKE%MEKE(i,j) = MEKE%MEKE(i,j) / (1.0 + sdt_damp*ldamping)
342+
MEKE_decay(i,j) = ldamping*G%mask2dT(i,j)
343+
enddo ; enddo
360344
!$OMP end parallel
361345
if (CS%MEKE_KH >= 0.0 .or. CS%KhMEKE_FAC > 0.0 .or. CS%MEKE_K4 >= 0.0) then
362346
! Update halos for lateral or bi-harmonic diffusion
@@ -502,26 +486,18 @@ subroutine step_forward_MEKE(MEKE, h, SN_u, SN_v, visc, dt, G, GV, US, CS, hu, h
502486
! Recalculate the drag rate, since MEKE has changed.
503487
if (use_drag_rate) then
504488
!$OMP do
505-
if (CS%Jansen15_drag) then
506-
do j=js,je ; do i=is,ie
507-
ldamping = CS%MEKE_damping + drag_rate(i,j)
508-
MEKE%MEKE(i,j) = MEKE%MEKE(i,j) -sdt_damp*drag_rate(i,j)
509-
MEKE_decay(i,j) = ldamping*G%mask2dT(i,j)
510-
enddo ; enddo
511-
else
512-
do j=js,je ; do i=is,ie
513-
drag_rate(i,j) = (Rho0 * I_mass(i,j)) * sqrt( drag_rate_visc(i,j)**2 &
514-
+ cdrag2 * ( max(0.0, 2.0*bottomFac2(i,j)*MEKE%MEKE(i,j)) + CS%MEKE_Uscale**2 ) )
515-
enddo ; enddo
516-
do j=js,je ; do i=is,ie
517-
ldamping = CS%MEKE_damping + drag_rate(i,j) * bottomFac2(i,j)
518-
if (MEKE%MEKE(i,j)<0.) ldamping = 0.
519-
! notice that the above line ensures a damping only if MEKE is positive,
520-
! while leaving MEKE unchanged if it is negative
521-
MEKE%MEKE(i,j) = MEKE%MEKE(i,j) / (1.0 + sdt_damp*ldamping)
522-
MEKE_decay(i,j) = ldamping*G%mask2dT(i,j)
523-
enddo ; enddo
524-
endif
489+
do j=js,je ; do i=is,ie
490+
drag_rate(i,j) = (Rho0 * I_mass(i,j)) * sqrt( drag_rate_visc(i,j)**2 &
491+
+ cdrag2 * ( max(0.0, 2.0*bottomFac2(i,j)*MEKE%MEKE(i,j)) + CS%MEKE_Uscale**2 ) )
492+
enddo ; enddo
493+
do j=js,je ; do i=is,ie
494+
ldamping = CS%MEKE_damping + drag_rate(i,j) * bottomFac2(i,j)
495+
if (MEKE%MEKE(i,j)<0.) ldamping = 0.
496+
! notice that the above line ensures a damping only if MEKE is positive,
497+
! while leaving MEKE unchanged if it is negative
498+
MEKE%MEKE(i,j) = MEKE%MEKE(i,j) / (1.0 + sdt_damp*ldamping)
499+
MEKE_decay(i,j) = ldamping*G%mask2dT(i,j)
500+
enddo ; enddo
525501
endif
526502
!$OMP do
527503
endif
@@ -1029,9 +1005,6 @@ logical function MEKE_init(Time, G, param_file, diag, CS, MEKE, restart_CS)
10291005
call get_param(param_file, mdl, "MEKE_USCALE", CS%MEKE_Uscale, &
10301006
"The background velocity that is combined with MEKE to "//&
10311007
"calculate the bottom drag.", units="m s-1", default=0.0)
1032-
call get_param(param_file, mdl, "MEKE_JANSEN15_DRAG", CS%Jansen15_drag, &
1033-
"If true, use the bottom drag formulation from Jansen et al. (2015) "//&
1034-
"to calculate the drag acting on MEKE.", default=.false.)
10351008
call get_param(param_file, mdl, "MEKE_GM_SRC_ALT", CS%GM_src_alt, &
10361009
"If true, use the GM energy conversion form S^2*N^2*kappa rather "//&
10371010
"than the streamfunction for the MEKE GM source term.", default=.false.)

0 commit comments

Comments
 (0)