@@ -59,6 +59,8 @@ module MOM_dynamics_split_RK2b
59
59
use MOM_open_boundary, only : ocean_OBC_type, radiation_open_bdry_conds
60
60
use MOM_open_boundary, only : open_boundary_zero_normal_flow, open_boundary_query
61
61
use MOM_open_boundary, only : open_boundary_test_extern_h, update_OBC_ramp
62
+ use MOM_open_boundary, only : copy_thickness_reservoirs
63
+ use MOM_open_boundary, only : update_segment_thickness_reservoirs
62
64
use MOM_PressureForce, only : PressureForce, PressureForce_CS
63
65
use MOM_PressureForce, only : PressureForce_init
64
66
use MOM_set_visc, only : set_viscous_ML, set_visc_CS
@@ -73,7 +75,7 @@ module MOM_dynamics_split_RK2b
73
75
use MOM_vert_friction, only : updateCFLtruncationValue, vertFPmix
74
76
use MOM_verticalGrid, only : verticalGrid_type, get_thickness_units
75
77
use MOM_verticalGrid, only : get_flux_units, get_tr_flux_units
76
- use MOM_wave_interface, only: wave_parameters_CS, Stokes_PGF
78
+ use MOM_wave_interface, only : wave_parameters_CS, Stokes_PGF
77
79
78
80
implicit none ; private
79
81
@@ -543,6 +545,9 @@ subroutine step_MOM_dyn_split_RK2b(u_av, v_av, h, tv, visc, Time_local, dt, forc
543
545
call disable_averaging(CS% diag)
544
546
if (showCallTree) call callTree_wayPoint(" done with PressureForce (step_MOM_dyn_split_RK2b)" )
545
547
548
+ if (associated (CS% OBC)) then ; if (CS% OBC% update_OBC) then
549
+ call update_OBC_data(CS% OBC, G, GV, US, tv, h, CS% update_OBC_CSp, Time_local)
550
+ endif ; endif
546
551
if (associated (CS% OBC) .and. CS% debug_OBC) &
547
552
call open_boundary_zero_normal_flow(CS% OBC, G, GV, CS% PFu, CS% PFv)
548
553
@@ -667,6 +672,9 @@ subroutine step_MOM_dyn_split_RK2b(u_av, v_av, h, tv, visc, Time_local, dt, forc
667
672
call cpu_clock_end(id_clock_mom_update)
668
673
call do_group_pass(CS% pass_uv_inst, G% Domain, clock= id_clock_pass)
669
674
675
+ if (associated (CS% OBC)) &
676
+ call copy_thickness_reservoirs(CS% OBC, G, GV)
677
+
670
678
! u_accel_bt = layer accelerations due to barotropic solver
671
679
call cpu_clock_begin(id_clock_continuity)
672
680
call continuity(u_inst, v_inst, h, hp, uh_in, vh_in, dt, G, GV, US, CS% continuity_CSp, CS% OBC, pbv, &
@@ -798,6 +806,7 @@ subroutine step_MOM_dyn_split_RK2b(u_av, v_av, h, tv, visc, Time_local, dt, forc
798
806
call do_group_pass(CS% pass_hp_uv, G% Domain, clock= id_clock_pass)
799
807
800
808
if (associated (CS% OBC)) then
809
+
801
810
if (CS% debug) &
802
811
call uvchksum(" Pre OBC avg [uv]" , u_av, v_av, G% HI, haloshift= 1 , symmetric= sym, unscale= US% L_T_to_m_s)
803
812
@@ -1051,6 +1060,10 @@ subroutine step_MOM_dyn_split_RK2b(u_av, v_av, h, tv, visc, Time_local, dt, forc
1051
1060
enddo ; enddo
1052
1061
enddo
1053
1062
1063
+ if (associated (CS% OBC)) then
1064
+ call update_segment_thickness_reservoirs(G, GV, uhtr, vhtr, h, CS% OBC)
1065
+ endif
1066
+
1054
1067
! if (CS%fpmix) then
1055
1068
! if (CS%id_uold > 0) call post_data(CS%id_uold, uold, CS%diag)
1056
1069
! if (CS%id_vold > 0) call post_data(CS%id_vold, vold, CS%diag)
0 commit comments