@@ -264,6 +264,10 @@ module MOM_barotropic
264
264
! ! HARMONIC, ARITHMETIC, HYBRID, and FROM_BT_CONT
265
265
logical :: strong_drag ! < If true, use a stronger estimate of the retarding
266
266
! ! 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.
267
271
logical :: linear_wave_drag ! < If true, apply a linear drag to the barotropic
268
272
! ! velocities, using rates set by lin_drag_u & _v
269
273
! ! divided by the depth of the ocean.
@@ -355,14 +359,15 @@ module MOM_barotropic
355
359
356
360
! >@{ Diagnostic IDs
357
361
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
359
363
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
361
365
integer :: id_ubt = - 1 , id_vbt = - 1 , id_eta_bt = - 1 , id_ubtav = - 1 , id_vbtav = - 1
362
366
integer :: id_ubt_st = - 1 , id_vbt_st = - 1 , id_eta_st = - 1
363
367
integer :: id_ubtdt = - 1 , id_vbtdt = - 1
364
368
integer :: id_ubt_hifreq = - 1 , id_vbt_hifreq = - 1 , id_eta_hifreq = - 1
365
369
integer :: id_uhbt_hifreq = - 1 , id_vhbt_hifreq = - 1 , id_eta_pred_hifreq = - 1
370
+ integer :: id_etaPF_hifreq = - 1 , id_etaPF_anom = - 1
366
371
integer :: id_gtotn = - 1 , id_gtots = - 1 , id_gtote = - 1 , id_gtotw = - 1
367
372
integer :: id_uhbt = - 1 , id_frhatu = - 1 , id_vhbt = - 1 , id_frhatv = - 1
368
373
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,
1995
2000
if (id_clock_pass_post > 0 ) call cpu_clock_end(id_clock_pass_post)
1996
2001
if (id_clock_calc_post > 0 ) call cpu_clock_begin(id_clock_calc_post)
1997
2002
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
+
1998
2014
! Now calculate each layer's accelerations.
1999
2015
call btstep_layer_accel(dt, u_accel_bt, v_accel_bt, pbce, gtot_E, gtot_W, gtot_N, gtot_S, &
2000
2016
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,
2135
2151
if (CS% id_frhatu1 > 0 ) call post_data(CS% id_frhatu1, CS% frhatu1, CS% diag)
2136
2152
if (CS% id_frhatv1 > 0 ) call post_data(CS% id_frhatv1, CS% frhatv1, CS% diag)
2137
2153
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
+
2138
2158
if (use_BT_cont) then
2139
2159
if (CS% id_BTC_FA_u_EE > 0 ) call post_data(CS% id_BTC_FA_u_EE, BT_cont% FA_u_EE, CS% diag)
2140
2160
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
2462
2482
real , dimension (SZIW_(CS),SZJW_(CS)) :: &
2463
2483
p_surf_dyn, & ! < A dynamic surface pressure under rigid ice [L2 T-2 ~> m2 s-2]
2464
2484
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]
2465
2487
real :: wt_end ! The weighting of the final value of eta_PF [nondim]
2466
2488
real :: Instep ! The inverse of the number of barotropic time steps to take [nondim]
2467
2489
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
2533
2555
2534
2556
do_hifreq_output = .false.
2535
2557
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. &
2537
2559
(CS% id_uhbt_hifreq > 0 ) .or. (CS% id_vhbt_hifreq > 0 )) &
2538
2560
do_hifreq_output = query_averaging_enabled(CS% diag, time_int_in, time_end_in)
2539
2561
if (do_hifreq_output) then
@@ -2957,6 +2979,18 @@ subroutine btstep_timeloop(eta, ubt, vbt, uhbt0, Datu, BTCL_u, vhbt0, Datv, BTCL
2957
2979
if (CS% id_ubt_hifreq > 0 ) call post_data(CS% id_ubt_hifreq, ubt(IsdB:IedB,jsd:jed), CS% diag)
2958
2980
if (CS% id_vbt_hifreq > 0 ) call post_data(CS% id_vbt_hifreq, vbt(isd:ied,JsdB:JedB), CS% diag)
2959
2981
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
2960
2994
if (CS% id_uhbt_hifreq > 0 ) call post_data(CS% id_uhbt_hifreq, uhbt(IsdB:IedB,jsd:jed), CS% diag)
2961
2995
if (CS% id_vhbt_hifreq > 0 ) call post_data(CS% id_vhbt_hifreq, vhbt(isd:ied,JsdB:JedB), CS% diag)
2962
2996
if (CS% BT_project_velocity) then
@@ -5761,6 +5795,12 @@ subroutine barotropic_init(u, v, h, Time, G, GV, US, param_file, diag, CS, &
5761
5795
" with the barotropic time-step instead of implicit with " // &
5762
5796
" the baroclinic time-step and dividing by the number of " // &
5763
5797
" 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)
5764
5804
call get_param(param_file, mdl, " BT_LINEAR_WAVE_DRAG" , CS% linear_wave_drag, &
5765
5805
" If true, apply a linear drag to the barotropic velocities, " // &
5766
5806
" 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, &
6220
6260
' Zonal Anomalous Barotropic Pressure Force Acceleration' , ' m s-2' , conversion= US% L_T2_to_m_s2)
6221
6261
CS% id_PFv_bt = register_diag_field(' ocean_model' , ' PFvBT' , diag% axesCv1, Time, &
6222
6262
' 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)
6223
6266
if (CS% linear_wave_drag .or. (CS% use_filter .and. CS% linear_freq_drag)) then
6224
6267
CS% id_LDu_bt = register_diag_field(' ocean_model' , ' WaveDraguBT' , diag% axesCu1, Time, &
6225
6268
' 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, &
6265
6308
' Viscous remnant at u' , ' nondim' )
6266
6309
CS% id_visc_rem_v = register_diag_field(' ocean_model' , ' visc_rem_v' , diag% axesCvL, Time, &
6267
6310
' 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' )
6268
6315
CS% id_gtotn = register_diag_field(' ocean_model' , ' gtot_n' , diag% axesT1, Time, &
6269
6316
' gtot to North' , ' m s-2' , conversion= GV% m_to_H* (US% L_T_to_m_s** 2 ))
6270
6317
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, &
6282
6329
! if (.not.CS%BT_project_velocity) & ! The following diagnostic is redundant with BT_project_velocity.
6283
6330
CS% id_eta_pred_hifreq = register_diag_field(' ocean_model' , ' eta_pred_hifreq' , diag% axesT1, Time, &
6284
6331
' 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)
6285
6334
CS% id_uhbt_hifreq = register_diag_field(' ocean_model' , ' uhbt_hifreq' , diag% axesCu1, Time, &
6286
6335
' High Frequency Barotropic zonal transport' , &
6287
6336
' m3 s-1' , conversion= GV% H_to_m* US% L_to_m* US% L_T_to_m_s)
0 commit comments