@@ -64,8 +64,8 @@ module MOM_hor_visc
64
64
! ! for stability without considering other terms [nondim].
65
65
! ! The default is 0.8.
66
66
real :: KS_coef ! < A nondimensional coefficient on the biharmonic viscosity that sets the
67
- ! ! kill switch for backscatter. Default is 1.0.
68
- real :: KS_timescale ! < A timescale for computing CFL limit for turning off backscatter (~DT)
67
+ ! ! kill switch for backscatter. Default is 1.0 [nondim] .
68
+ real :: KS_timescale ! < A timescale for computing CFL limit for turning off backscatter [T ~> s].
69
69
logical :: backscatter_underbound ! < If true, the bounds on the biharmonic viscosity are allowed
70
70
! ! to increase where the Laplacian viscosity is negative (due to
71
71
! ! backscatter parameterizations) beyond the largest timestep-dependent
@@ -237,7 +237,7 @@ module MOM_hor_visc
237
237
integer :: id_vort_xy_q = - 1 , id_div_xx_h = - 1
238
238
integer :: id_sh_xy_q = - 1 , id_sh_xx_h = - 1
239
239
integer :: id_FrictWork = - 1 , id_FrictWorkIntz = - 1
240
- integer :: id_FrictWork_bh = - 1 , id_FrictWorkIntz_bh = - 1 ! cyc
240
+ integer :: id_FrictWork_bh = - 1 , id_FrictWorkIntz_bh = - 1
241
241
integer :: id_FrictWork_GME = - 1
242
242
integer :: id_normstress = - 1 , id_shearstress = - 1
243
243
integer :: id_visc_limit_h = - 1 , id_visc_limit_q = - 1
@@ -325,7 +325,7 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
325
325
str_xx_GME,& ! smoothed diagonal term in the stress tensor from GME [L2 T-2 ~> m2 s-2]
326
326
bhstr_xx, & ! A copy of str_xx that only contains the biharmonic contribution [H L2 T-2 ~> m3 s-2 or kg s-2]
327
327
FrictWorkIntz, & ! depth integrated energy dissipated by lateral friction [R L2 T-3 ~> W m-2]
328
- FrictWorkIntz_bh, & ! depth integrated energy dissipated by biharmonic lateral friction [R L2 T-3 ~> W m-2] !cyc
328
+ FrictWorkIntz_bh, & ! depth integrated energy dissipated by biharmonic lateral friction [R L2 T-3 ~> W m-2]
329
329
grad_vort_mag_h, & ! Magnitude of vorticity gradient at h-points [L-1 T-1 ~> m-1 s-1]
330
330
grad_vort_mag_h_2d, & ! Magnitude of 2d vorticity gradient at h-points [L-1 T-1 ~> m-1 s-1]
331
331
grad_div_mag_h, & ! Magnitude of divergence gradient at h-points [L-1 T-1 ~> m-1 s-1]
@@ -371,9 +371,9 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
371
371
vort_xy_q, & ! vertical vorticity at corner points [T-1 ~> s-1]
372
372
sh_xy_q, & ! horizontal shearing strain at corner points [T-1 ~> s-1]
373
373
GME_coeff_q, & ! < GME coeff. at q-points [L2 T-1 ~> m2 s-1]
374
- visc_limit_q, & ! used to stabilize the EY24_EBT_BS backscatter
375
- visc_limit_q_flag, & ! determines whether backscatter is shut off
376
- visc_limit_q_frac, & ! determines how close backscatter is to shutting off
374
+ visc_limit_q, & ! used to stabilize the EY24_EBT_BS backscatter [nondim]
375
+ visc_limit_q_flag, & ! determines whether backscatter is shut off [nondim]
376
+ visc_limit_q_frac, & ! determines how close backscatter is to shutting off [nondim]
377
377
BS_coeff_q, & ! A diagnostic array of the backscatter coefficient [L2 T-1 ~> m2 s-1]
378
378
ShSt ! A diagnostic array of shear stress [T-1 ~> s-1].
379
379
real , dimension (SZIB_(G),SZJ_(G),SZK_(GV)+ 1 ) :: &
@@ -387,7 +387,7 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
387
387
Kh_h, & ! Laplacian viscosity at thickness points [L2 T-1 ~> m2 s-1]
388
388
dz, & ! Height change across layers [Z ~> m]
389
389
FrictWork, & ! work done by MKE dissipation mechanisms [R L2 T-3 ~> W m-2]
390
- FrictWork_bh, & ! work done by the biharmonic MKE dissipation mechanisms [R L2 T-3 ~> W m-2] !cyc
390
+ FrictWork_bh, & ! work done by the biharmonic MKE dissipation mechanisms [R L2 T-3 ~> W m-2]
391
391
FrictWork_GME, & ! work done by GME [R L2 T-3 ~> W m-2]
392
392
div_xx_h, & ! horizontal divergence [T-1 ~> s-1]
393
393
sh_xx_h, & ! horizontal tension (du/dx - dv/dy) including metric terms [T-1 ~> s-1]
@@ -397,9 +397,9 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
397
397
grid_Re_Kh, & ! Grid Reynolds number for Laplacian horizontal viscosity at h points [nondim]
398
398
grid_Re_Ah, & ! Grid Reynolds number for Biharmonic horizontal viscosity at h points [nondim]
399
399
GME_coeff_h, & ! GME coefficient at h-points [L2 T-1 ~> m2 s-1]
400
- visc_limit_h, & ! Used to stabilize the EY24_EBT_BS backscatter
401
- visc_limit_h_flag, & ! determines whether backscatter is shut off
402
- visc_limit_h_frac ! determines how close backscatter is to shutting off
400
+ visc_limit_h, & ! Used to stabilize the EY24_EBT_BS backscatter [nondim]
401
+ visc_limit_h_flag, & ! determines whether backscatter is shut off [nondim]
402
+ visc_limit_h_frac ! determines how close backscatter is to shutting off [nondim]
403
403
real , dimension (SZIB_(G),SZJ_(G),SZK_(GV)) :: &
404
404
u_smooth ! Zonal velocity, smoothed with a spatial low-pass filter [L T-1 ~> m s-1]
405
405
real , dimension (SZI_(G),SZJB_(G),SZK_(GV)) :: &
@@ -1414,7 +1414,7 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
1414
1414
enddo ; enddo
1415
1415
endif
1416
1416
1417
- if (( CS% id_grid_Re_Ah> 0 ) ) then
1417
+ if (CS% id_grid_Re_Ah > 0 ) then
1418
1418
do j= js,je ; do i= is,ie
1419
1419
KE = 0.125 * ((u(I,j,k) + u(I-1 ,j,k))** 2 + (v(i,J,k) + v(i,J-1 ,k))** 2 )
1420
1420
grid_Ah = max (Ah(i,j), CS% min_grid_Ah)
@@ -1437,24 +1437,24 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
1437
1437
endif ! Get biharmonic coefficient at h points and biharmonic part of str_xx
1438
1438
1439
1439
! Backscatter using MEKE
1440
- if (CS% EY24_EBT_BS) then
1441
- do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1442
- if (visc_limit_h_flag(i,j,k) > 0 ) then
1443
- Kh_BS(i,j) = 0 .
1444
- else
1445
- Kh_BS(i,j) = MEKE% Ku(i,j) * VarMix% BS_struct(i,j,k)
1446
- endif
1447
- enddo ; enddo
1440
+ if (CS% EY24_EBT_BS) then
1441
+ do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1442
+ if (visc_limit_h_flag(i,j,k) > 0 ) then
1443
+ Kh_BS(i,j) = 0 .
1444
+ else
1445
+ Kh_BS(i,j) = MEKE% Ku(i,j) * VarMix% BS_struct(i,j,k)
1446
+ endif
1447
+ enddo ; enddo
1448
1448
1449
+ do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1450
+ str_xx_BS(i,j) = - Kh_BS(i,j) * sh_xx(i,j)
1451
+ enddo ; enddo
1452
+
1453
+ if (CS% id_BS_coeff_h> 0 ) then
1449
1454
do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1450
- str_xx_BS (i,j) = - Kh_BS(i,j) * sh_xx (i,j)
1455
+ BS_coeff_h (i,j,k ) = Kh_BS(i,j)
1451
1456
enddo ; enddo
1452
-
1453
- if (CS% id_BS_coeff_h> 0 ) then
1454
- do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1455
- BS_coeff_h(i,j,k) = Kh_BS(i,j)
1456
- enddo ; enddo
1457
- endif
1457
+ endif
1458
1458
1459
1459
do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1460
1460
str_xx(i,j) = str_xx(i,j) + str_xx_BS(i,j)
@@ -1782,29 +1782,28 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
1782
1782
enddo ; enddo
1783
1783
endif ! Get Ah at q points and biharmonic part of str_xy
1784
1784
1785
- ! Backscatter using MEKE
1786
- if (CS% EY24_EBT_BS) then
1787
- ! if (grid_Re_Ah(i,j,k) < 1.) then
1788
- do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1789
- if (visc_limit_q_flag(I,J,k) > 0 ) then
1790
- Kh_BS(I,J) = 0 .
1791
- else
1792
- Kh_BS(I,J) = 0.25 * ( ((MEKE% Ku(i,j)* VarMix% BS_struct(i,j,k)) + &
1793
- (MEKE% Ku(i+1 ,j+1 )* VarMix% BS_struct(i+1 ,j+1 ,k))) + &
1794
- ((MEKE% Ku(i+1 ,j)* VarMix% BS_struct(i+1 ,j,k)) + &
1795
- (MEKE% Ku(i,j+1 )* VarMix% BS_struct(i,j+1 ,k))) )
1796
- endif
1797
- enddo ; enddo
1785
+ ! Backscatter using MEKE
1786
+ if (CS% EY24_EBT_BS) then
1787
+ do j= Jsq,Jeq+1 ; do i= Isq,Ieq+1
1788
+ if (visc_limit_q_flag(I,J,k) > 0 ) then
1789
+ Kh_BS(I,J) = 0 .
1790
+ else
1791
+ Kh_BS(I,J) = 0.25 * ( ((MEKE% Ku(i,j)* VarMix% BS_struct(i,j,k)) + &
1792
+ (MEKE% Ku(i+1 ,j+1 )* VarMix% BS_struct(i+1 ,j+1 ,k))) + &
1793
+ ((MEKE% Ku(i+1 ,j)* VarMix% BS_struct(i+1 ,j,k)) + &
1794
+ (MEKE% Ku(i,j+1 )* VarMix% BS_struct(i,j+1 ,k))) )
1795
+ endif
1796
+ enddo ; enddo
1798
1797
1799
- do J= js-1 ,Jeq ; do I= is-1 ,Ieq
1800
- str_xy_BS(I,J) = - Kh_BS(I,J) * (sh_xy(I,J))
1801
- enddo ; enddo
1798
+ do J= js-1 ,Jeq ; do I= is-1 ,Ieq
1799
+ str_xy_BS(I,J) = - Kh_BS(I,J) * (sh_xy(I,J))
1800
+ enddo ; enddo
1802
1801
1803
- if (CS% id_BS_coeff_q> 0 ) then
1804
- do J= js-1 ,Jeq ; do I= is-1 ,Ieq
1805
- BS_coeff_q(I,J,k) = Kh_BS(I,J)
1806
- enddo ; enddo
1807
- endif
1802
+ if (CS% id_BS_coeff_q> 0 ) then
1803
+ do J= js-1 ,Jeq ; do I= is-1 ,Ieq
1804
+ BS_coeff_q(I,J,k) = Kh_BS(I,J)
1805
+ enddo ; enddo
1806
+ endif
1808
1807
1809
1808
do J= js-1 ,Jeq ; do I= is-1 ,Ieq
1810
1809
str_xy(I,J) = str_xy(I,J) + str_xy_BS(I,J)
@@ -1915,8 +1914,8 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
1915
1914
! Diagnose str_xx*d_x u - str_yy*d_y v + str_xy*(d_y u + d_x v)
1916
1915
! This is the old formulation that includes energy diffusion
1917
1916
if (visc_limit_h_flag(i,j,k) > 0 ) then
1918
- FrictWork(i,j,k) = 0
1919
- FrictWork_bh(i,j,k) = 0
1917
+ FrictWork(i,j,k) = 0 .
1918
+ FrictWork_bh(i,j,k) = 0 .
1920
1919
else
1921
1920
FrictWork(i,j,k) = GV% H_to_RZ * ( &
1922
1921
(str_xx(i,j)* (u(I,j,k)- u(I-1 ,j,k))* G% IdxT(i,j) &
@@ -1934,7 +1933,7 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
1934
1933
(u(I,j,k)- u(I,j-1 ,k))* G% IdyBu(I,J-1 ) &
1935
1934
+ (v(i+1 ,J-1 ,k)- v(i,J-1 ,k))* G% IdxBu(I,J-1 ) )) ) )
1936
1935
! Diagnose bhstr_xx*d_x u - bhstr_yy*d_y v + bhstr_xy*(d_y u + d_x v)
1937
- ! This is the old formulation that includes energy diffusion !cyc
1936
+ ! This is the old formulation that includes energy diffusion
1938
1937
FrictWork_bh(i,j,k) = GV% H_to_RZ * ( &
1939
1938
(bhstr_xx(i,j) * (u(I,j,k)- u(I-1 ,j,k))* G% IdxT(i,j) &
1940
1939
- bhstr_xx(i,j) * (v(i,J,k)- v(i,J-1 ,k))* G% IdyT(i,j)) &
@@ -2079,7 +2078,7 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
2079
2078
if (k== 1 ) then
2080
2079
do j= js,je ; do i= is,ie
2081
2080
MEKE% mom_src(i,j) = 0 .
2082
- MEKE% mom_src_bh(i,j) = 0 . ! cyc
2081
+ MEKE% mom_src_bh(i,j) = 0 .
2083
2082
enddo ; enddo
2084
2083
if (allocated (MEKE% GME_snk)) then
2085
2084
do j= js,je ; do i= is,ie
@@ -2127,7 +2126,7 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
2127
2126
+ (str_xy(I,J-1 )- RoScl* bhstr_xy(I,J-1 )) * &
2128
2127
((u(I,j,k)- u(I,j-1 ,k))* G% IdyBu(I,J-1 ) &
2129
2128
+ (v(i+1 ,J-1 ,k)- v(i,J-1 ,k))* G% IdxBu(I,J-1 )) ) ) )
2130
- MEKE% mom_src_bh(i,j) = MEKE% mom_src_bh(i,j) + GV% H_to_RZ * ( & ! cyc
2129
+ MEKE% mom_src_bh(i,j) = MEKE% mom_src_bh(i,j) + GV% H_to_RZ * ( &
2131
2130
((bhstr_xx(i,j)- RoScl* bhstr_xx(i,j))* (u(I,j,k)- u(I-1 ,j,k))* G% IdxT(i,j) &
2132
2131
- (bhstr_xx(i,j)- RoScl* bhstr_xx(i,j))* (v(i,J,k)- v(i,J-1 ,k))* G% IdyT(i,j)) &
2133
2132
+ 0.25 * (((bhstr_xy(I,J)- RoScl* bhstr_xy(I,J)) * &
@@ -2143,11 +2142,11 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
2143
2142
((u(I,j,k)- u(I,j-1 ,k))* G% IdyBu(I,J-1 ) &
2144
2143
+ (v(i+1 ,J-1 ,k)- v(i,J-1 ,k))* G% IdxBu(I,J-1 )) ) ) )
2145
2144
enddo ; enddo
2146
- else ! cyc
2145
+ else
2147
2146
2148
2147
do j= js,je ; do i= is,ie
2149
2148
MEKE% mom_src(i,j) = MEKE% mom_src(i,j) + FrictWork(i,j,k)
2150
- MEKE% mom_src_bh(i,j) = MEKE% mom_src_bh(i,j) + FrictWork_bh(i,j,k) ! cyc
2149
+ MEKE% mom_src_bh(i,j) = MEKE% mom_src_bh(i,j) + FrictWork_bh(i,j,k)
2151
2150
enddo ; enddo
2152
2151
endif ! MEKE%backscatter_Ro_c
2153
2152
@@ -2167,7 +2166,7 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
2167
2166
if (CS% id_diffu> 0 ) call post_data(CS% id_diffu, diffu, CS% diag)
2168
2167
if (CS% id_diffv> 0 ) call post_data(CS% id_diffv, diffv, CS% diag)
2169
2168
if (CS% id_FrictWork> 0 ) call post_data(CS% id_FrictWork, FrictWork, CS% diag)
2170
- if (CS% id_FrictWork_bh> 0 ) call post_data(CS% id_FrictWork_bh, FrictWork_bh, CS% diag) ! cyc
2169
+ if (CS% id_FrictWork_bh> 0 ) call post_data(CS% id_FrictWork_bh, FrictWork_bh, CS% diag)
2171
2170
if (CS% id_Ah_h> 0 ) call post_data(CS% id_Ah_h, Ah_h, CS% diag)
2172
2171
if (CS% id_grid_Re_Ah> 0 ) call post_data(CS% id_grid_Re_Ah, grid_Re_Ah, CS% diag)
2173
2172
if (CS% id_div_xx_h> 0 ) call post_data(CS% id_div_xx_h, div_xx_h, CS% diag)
@@ -2218,7 +2217,7 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G,
2218
2217
call post_data(CS% id_FrictWorkIntz, FrictWorkIntz, CS% diag)
2219
2218
endif
2220
2219
2221
- if (CS% id_FrictWorkIntz_bh > 0 ) then ! cyc
2220
+ if (CS% id_FrictWorkIntz_bh > 0 ) then
2222
2221
do j= js,je
2223
2222
do i= is,ie ; FrictWorkIntz_bh(i,j) = FrictWork_bh(i,j,1 ) ; enddo
2224
2223
do k= 2 ,nz ; do i= is,ie
@@ -3200,10 +3199,10 @@ subroutine hor_visc_init(Time, G, GV, US, param_file, diag, CS, ADp)
3200
3199
cmor_standard_name= ' ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction' )
3201
3200
CS% id_FrictWork_bh = register_diag_field(' ocean_model' ,' FrictWork_bh' ,diag% axesTL,Time,&
3202
3201
' Integral work done by the biharmonic lateral friction terms.' , &
3203
- ' W m-2' , conversion= US% RZ3_T3_to_W_m2* US% L_to_Z** 2 ) ! cyc
3202
+ ' W m-2' , conversion= US% RZ3_T3_to_W_m2* US% L_to_Z** 2 )
3204
3203
CS% id_FrictWorkIntz_bh = register_diag_field(' ocean_model' ,' FrictWorkIntz_bh' ,diag% axesT1,Time,&
3205
3204
' Depth integrated work done by the biharmonic lateral friction' , &
3206
- ' W m-2' , conversion= US% RZ3_T3_to_W_m2* US% L_to_Z** 2 ) ! cyc
3205
+ ' W m-2' , conversion= US% RZ3_T3_to_W_m2* US% L_to_Z** 2 )
3207
3206
3208
3207
end subroutine hor_visc_init
3209
3208
0 commit comments