@@ -255,6 +255,9 @@ module MOM_dynamics_split_RK2
255
255
! ! nullified. Flather OBCs use open boundary_CS as well.
256
256
! > A pointer to the update_OBC control structure
257
257
type (update_OBC_CS), pointer :: update_OBC_CSp = > NULL ()
258
+ logical :: use_obc_uinst_bug ! < If true, use a bug in the radiation OBC's (ex
259
+ ! ! Orlanski) where the instantaneous velocity is used rather than the
260
+ ! ! time-averaged velocity.
258
261
259
262
type (group_pass_type) :: pass_eta ! < Structure for group halo pass
260
263
type (group_pass_type) :: pass_visc_rem ! < Structure for group halo pass
@@ -1015,7 +1018,7 @@ subroutine step_MOM_dyn_split_RK2(u_inst, v_inst, h, tv, visc, Time_local, dt, f
1015
1018
call do_group_pass(CS% pass_av_uvh, G% domain, clock= id_clock_pass)
1016
1019
endif
1017
1020
1018
- if (associated (CS% OBC)) then
1021
+ if (associated (CS% OBC) .and. CS % use_obc_uinst_bug ) then
1019
1022
! ### I suspect that there is a bug here when u_inst is compared with a previous value of u_av
1020
1023
! to estimate the dominant outward group velocity, but a fix is not available yet.
1021
1024
call radiation_open_bdry_conds(CS% OBC, u_inst, u_old_rad_OBC, v_inst, v_old_rad_OBC, G, GV, US, dt)
@@ -1030,6 +1033,10 @@ subroutine step_MOM_dyn_split_RK2(u_inst, v_inst, h, tv, visc, Time_local, dt, f
1030
1033
if (G% nonblocking_updates) &
1031
1034
call complete_group_pass(CS% pass_av_uvh, G% Domain, clock= id_clock_pass)
1032
1035
1036
+ if (associated (CS% OBC) .and. .not. CS% use_obc_uinst_bug) then
1037
+ call radiation_open_bdry_conds(CS% OBC, u_av, u_old_rad_OBC, v_av, v_old_rad_OBC, G, GV, US, dt)
1038
+ endif
1039
+
1033
1040
! $OMP parallel do default(shared)
1034
1041
do k= 1 ,nz
1035
1042
do j= js-2 ,je+2 ; do I= Isq-2 ,Ieq+2
@@ -1413,6 +1420,10 @@ subroutine initialize_dyn_split_RK2(u, v, h, tv, uh, vh, eta, Time, G, GV, US, p
1413
1420
" variables that are needed to reproduce across restarts, similarly to " // &
1414
1421
" what is already being done with the primary state variables. " // &
1415
1422
" The default should be changed to true." , default= .false. , do_not_log= .true. )
1423
+ call get_param(param_file, mdl, " USE_OBC_U_INST_BUG" , CS% use_obc_uinst_bug, &
1424
+ " If true, use a bug in the update of the radiation open boundary conditions" // &
1425
+ " that uses the instantaneous velocity rather than the time-averaged velocity." ,&
1426
+ default= .true. )
1416
1427
if (CS% remap_aux .and. .not. CS% store_CAu) call MOM_error(FATAL, &
1417
1428
" REMAP_AUXILIARY_VARS requires that STORE_CORIOLIS_ACCEL = True." )
1418
1429
call get_param(param_file, mdl, " DEBUG" , CS% debug, &
0 commit comments