Skip to content

Commit e06aeb5

Browse files
committed
+Add RESCALE_STRONG_DRAG
Added the new runtime option RESCALE_STRONG_DRAG, that can be set to true to reduce the barotropic contribution to the layer accelerations to account for the difference between the forces that can be counteracted by the stronger drag with BT_STRONG_DRAG and the average of the layer viscous remnants after a baroclinic timestep. In testing, this new capability eliminates some of the growing instabilities that can occur with an ice shelf and BT_STRONG_DRAG set to true. This commit also adds new diagnostics of the barotropic step viscous remnants and the eta anomalies contributing to barotropic pressure forces, either averaged over the barotropic step or at each barotropic step. By default all answers are bitwise identical, but there is a new runtime parameter and 4 new diagnostics.
1 parent e889b6a commit e06aeb5

File tree

1 file changed

+52
-3
lines changed

1 file changed

+52
-3
lines changed

src/core/MOM_barotropic.F90

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ module MOM_barotropic
264264
!! HARMONIC, ARITHMETIC, HYBRID, and FROM_BT_CONT
265265
logical :: strong_drag !< If true, use a stronger estimate of the retarding
266266
!! effects of strong bottom drag.
267+
logical :: rescale_strong_drag !< If true, reduce the barotropic contribution to the layer
268+
!! accelerations to account for the difference between the forces that
269+
!! can be counteracted by the stronger drag with BT_STRONG_DRAG and the
270+
!! average of the layer viscous remnants after a baroclinic timestep.
267271
logical :: linear_wave_drag !< If true, apply a linear drag to the barotropic
268272
!! velocities, using rates set by lin_drag_u & _v
269273
!! divided by the depth of the ocean.
@@ -355,14 +359,15 @@ module MOM_barotropic
355359

356360
!>@{ Diagnostic IDs
357361
integer :: id_PFu_bt = -1, id_PFv_bt = -1, id_Coru_bt = -1, id_Corv_bt = -1
358-
integer :: id_LDu_bt = -1, id_LDv_bt = -1
362+
integer :: id_LDu_bt = -1, id_LDv_bt = -1, id_eta_cor = -1
359363
integer :: id_ubtforce = -1, id_vbtforce = -1, id_uaccel = -1, id_vaccel = -1
360-
integer :: id_visc_rem_u = -1, id_visc_rem_v = -1, id_eta_cor = -1
364+
integer :: id_visc_rem_u = -1, id_visc_rem_v = -1, id_bt_rem_u = -1, id_bt_rem_v = -1
361365
integer :: id_ubt = -1, id_vbt = -1, id_eta_bt = -1, id_ubtav = -1, id_vbtav = -1
362366
integer :: id_ubt_st = -1, id_vbt_st = -1, id_eta_st = -1
363367
integer :: id_ubtdt = -1, id_vbtdt = -1
364368
integer :: id_ubt_hifreq = -1, id_vbt_hifreq = -1, id_eta_hifreq = -1
365369
integer :: id_uhbt_hifreq = -1, id_vhbt_hifreq = -1, id_eta_pred_hifreq = -1
370+
integer :: id_etaPF_hifreq = -1, id_etaPF_anom = -1
366371
integer :: id_gtotn = -1, id_gtots = -1, id_gtote = -1, id_gtotw = -1
367372
integer :: id_uhbt = -1, id_frhatu = -1, id_vhbt = -1, id_frhatv = -1
368373
integer :: id_frhatu1 = -1, id_frhatv1 = -1
@@ -1995,6 +2000,17 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
19952000
if (id_clock_pass_post > 0) call cpu_clock_end(id_clock_pass_post)
19962001
if (id_clock_calc_post > 0) call cpu_clock_begin(id_clock_calc_post)
19972002

2003+
if (CS%strong_drag .and. CS%rescale_strong_drag) then
2004+
do j=js,je ; do I=is-1,ie
2005+
if (G%mask2dCu(I,j) * av_rem_u(I,j) > 0.0) &
2006+
u_accel_bt(I,j) = u_accel_bt(I,j) * min(bt_rem_u(I,j)**nstep / av_rem_u(I,j), 1.0)
2007+
enddo ; enddo
2008+
do J=js-1,je ; do i=is,ie
2009+
if (G%mask2dCv(i,J) * av_rem_v(i,J) > 0.0) &
2010+
v_accel_bt(i,J) = v_accel_bt(i,J) * min(bt_rem_v(i,J)**nstep / av_rem_v(i,J), 1.0)
2011+
enddo ; enddo
2012+
endif
2013+
19982014
! Now calculate each layer's accelerations.
19992015
call btstep_layer_accel(dt, u_accel_bt, v_accel_bt, pbce, gtot_E, gtot_W, gtot_N, gtot_S, &
20002016
e_anom, G, GV, CS, accel_layer_u, accel_layer_v)
@@ -2135,6 +2151,10 @@ subroutine btstep(U_in, V_in, eta_in, dt, bc_accel_u, bc_accel_v, forces, pbce,
21352151
if (CS%id_frhatu1 > 0) call post_data(CS%id_frhatu1, CS%frhatu1, CS%diag)
21362152
if (CS%id_frhatv1 > 0) call post_data(CS%id_frhatv1, CS%frhatv1, CS%diag)
21372153

2154+
if (CS%id_bt_rem_u > 0) call post_data(CS%id_bt_rem_u, bt_rem_u(IsdB:IedB,jsd:jed), CS%diag)
2155+
if (CS%id_bt_rem_v > 0) call post_data(CS%id_bt_rem_v, bt_rem_v(isd:ied,JsdB:JedB), CS%diag)
2156+
if (CS%id_etaPF_anom > 0) call post_data(CS%id_etaPF_anom, e_anom(isd:ied,jsd:jed), CS%diag)
2157+
21382158
if (use_BT_cont) then
21392159
if (CS%id_BTC_FA_u_EE > 0) call post_data(CS%id_BTC_FA_u_EE, BT_cont%FA_u_EE, CS%diag)
21402160
if (CS%id_BTC_FA_u_E0 > 0) call post_data(CS%id_BTC_FA_u_E0, BT_cont%FA_u_E0, CS%diag)
@@ -2462,6 +2482,8 @@ subroutine btstep_timeloop(eta, ubt, vbt, uhbt0, Datu, BTCL_u, vhbt0, Datv, BTCL
24622482
real, dimension(SZIW_(CS),SZJW_(CS)) :: &
24632483
p_surf_dyn, & !< A dynamic surface pressure under rigid ice [L2 T-2 ~> m2 s-2]
24642484
cfl_ltd_vol !< The volume available after removing sinks used to limit uhbt_int and vhbt_int [H L2 ~> m3]
2485+
real, dimension(SZI_(G),SZJ_(G)) :: &
2486+
eta_anom_PF ! The eta anomalies used to find the pressure force anomalies [H ~> m or kg m-2]
24652487
real :: wt_end ! The weighting of the final value of eta_PF [nondim]
24662488
real :: Instep ! The inverse of the number of barotropic time steps to take [nondim]
24672489
real :: trans_wt1, trans_wt2 ! The weights used to compute ubt_trans and vbt_trans [nondim]
@@ -2533,7 +2555,7 @@ subroutine btstep_timeloop(eta, ubt, vbt, uhbt0, Datu, BTCL_u, vhbt0, Datv, BTCL
25332555

25342556
do_hifreq_output = .false.
25352557
if ((CS%id_ubt_hifreq > 0) .or. (CS%id_vbt_hifreq > 0) .or. &
2536-
(CS%id_eta_hifreq > 0) .or. (CS%id_eta_pred_hifreq > 0) .or. &
2558+
(CS%id_eta_hifreq > 0) .or. (CS%id_eta_pred_hifreq > 0) .or. (CS%id_etaPF_hifreq > 0) .or. &
25372559
(CS%id_uhbt_hifreq > 0) .or. (CS%id_vhbt_hifreq > 0)) &
25382560
do_hifreq_output = query_averaging_enabled(CS%diag, time_int_in, time_end_in)
25392561
if (do_hifreq_output) then
@@ -2957,6 +2979,18 @@ subroutine btstep_timeloop(eta, ubt, vbt, uhbt0, Datu, BTCL_u, vhbt0, Datv, BTCL
29572979
if (CS%id_ubt_hifreq > 0) call post_data(CS%id_ubt_hifreq, ubt(IsdB:IedB,jsd:jed), CS%diag)
29582980
if (CS%id_vbt_hifreq > 0) call post_data(CS%id_vbt_hifreq, vbt(isd:ied,JsdB:JedB), CS%diag)
29592981
if (CS%id_eta_hifreq > 0) call post_data(CS%id_eta_hifreq, eta(isd:ied,jsd:jed), CS%diag)
2982+
if (CS%id_etaPF_hifreq > 0) then
2983+
if (CS%BT_project_velocity) then
2984+
do j=js,je ; do i=is,ie
2985+
eta_anom_PF(i,j) = eta(i,j) - eta_PF(i,j)
2986+
enddo ; enddo
2987+
else
2988+
do j=js,je ; do i=is,ie
2989+
eta_anom_PF(i,j) = eta_pred(i,j) - eta_PF(i,j)
2990+
enddo ; enddo
2991+
endif
2992+
call post_data(CS%id_etaPF_hifreq, eta_anom_PF(isd:ied,jsd:jed), CS%diag)
2993+
endif
29602994
if (CS%id_uhbt_hifreq > 0) call post_data(CS%id_uhbt_hifreq, uhbt(IsdB:IedB,jsd:jed), CS%diag)
29612995
if (CS%id_vhbt_hifreq > 0) call post_data(CS%id_vhbt_hifreq, vhbt(isd:ied,JsdB:JedB), CS%diag)
29622996
if (CS%BT_project_velocity) then
@@ -5761,6 +5795,12 @@ subroutine barotropic_init(u, v, h, Time, G, GV, US, param_file, diag, CS, &
57615795
"with the barotropic time-step instead of implicit with "//&
57625796
"the baroclinic time-step and dividing by the number of "//&
57635797
"barotropic steps.", default=.false.)
5798+
call get_param(param_file, mdl, "RESCALE_STRONG_DRAG", CS%rescale_strong_drag, &
5799+
"If true, reduce the barotropic contribution to the layer accelerations "//&
5800+
"to account for the difference between the forces that can be counteracted "//&
5801+
"by the stronger drag with BT_STRONG_DRAG and the average of the layer "//&
5802+
"viscous remnants after a baroclinic timestep.", &
5803+
default=.false., do_not_log=.not.CS%strong_drag)
57645804
call get_param(param_file, mdl, "BT_LINEAR_WAVE_DRAG", CS%linear_wave_drag, &
57655805
"If true, apply a linear drag to the barotropic velocities, "//&
57665806
"using rates set by lin_drag_u & _v divided by the depth of "//&
@@ -6220,6 +6260,9 @@ subroutine barotropic_init(u, v, h, Time, G, GV, US, param_file, diag, CS, &
62206260
'Zonal Anomalous Barotropic Pressure Force Acceleration', 'm s-2', conversion=US%L_T2_to_m_s2)
62216261
CS%id_PFv_bt = register_diag_field('ocean_model', 'PFvBT', diag%axesCv1, Time, &
62226262
'Meridional Anomalous Barotropic Pressure Force Acceleration', 'm s-2', conversion=US%L_T2_to_m_s2)
6263+
CS%id_etaPF_anom = register_diag_field('ocean_model', 'etaPF_anom', diag%axesT1, Time, &
6264+
'Eta anomalies used for pressure forces averaged over a baroclinic timestep', &
6265+
thickness_units, conversion=GV%H_to_MKS)
62236266
if (CS%linear_wave_drag .or. (CS%use_filter .and. CS%linear_freq_drag)) then
62246267
CS%id_LDu_bt = register_diag_field('ocean_model', 'WaveDraguBT', diag%axesCu1, Time, &
62256268
'Zonal Barotropic Linear Wave Drag Acceleration', 'm s-2', conversion=US%L_T2_to_m_s2)
@@ -6265,6 +6308,10 @@ subroutine barotropic_init(u, v, h, Time, G, GV, US, param_file, diag, CS, &
62656308
'Viscous remnant at u', 'nondim')
62666309
CS%id_visc_rem_v = register_diag_field('ocean_model', 'visc_rem_v', diag%axesCvL, Time, &
62676310
'Viscous remnant at v', 'nondim')
6311+
CS%id_bt_rem_u = register_diag_field('ocean_model', 'bt_rem_u', diag%axesCu1, Time, &
6312+
'Barotropic viscous remnant per barotropic step at u', 'nondim')
6313+
CS%id_bt_rem_v = register_diag_field('ocean_model', 'bt_rem_v', diag%axesCv1, Time, &
6314+
'Barotropic viscous remnant per barotropic step at v', 'nondim')
62686315
CS%id_gtotn = register_diag_field('ocean_model', 'gtot_n', diag%axesT1, Time, &
62696316
'gtot to North', 'm s-2', conversion=GV%m_to_H*(US%L_T_to_m_s**2))
62706317
CS%id_gtots = register_diag_field('ocean_model', 'gtot_s', diag%axesT1, Time, &
@@ -6282,6 +6329,8 @@ subroutine barotropic_init(u, v, h, Time, G, GV, US, param_file, diag, CS, &
62826329
! if (.not.CS%BT_project_velocity) & ! The following diagnostic is redundant with BT_project_velocity.
62836330
CS%id_eta_pred_hifreq = register_diag_field('ocean_model', 'eta_pred_hifreq', diag%axesT1, Time, &
62846331
'High Frequency Predictor Barotropic SSH', thickness_units, conversion=GV%H_to_MKS)
6332+
CS%id_etaPF_hifreq = register_diag_field('ocean_model', 'etaPF_hifreq', diag%axesT1, Time, &
6333+
'High Frequency Barotropic SSH anomalies used for pressure forces', thickness_units, conversion=GV%H_to_MKS)
62856334
CS%id_uhbt_hifreq = register_diag_field('ocean_model', 'uhbt_hifreq', diag%axesCu1, Time, &
62866335
'High Frequency Barotropic zonal transport', &
62876336
'm3 s-1', conversion=GV%H_to_m*US%L_to_m*US%L_T_to_m_s)

0 commit comments

Comments
 (0)