Skip to content

Commit

Permalink
+Next stab at fixing REMAP_AUX fallout.
Browse files Browse the repository at this point in the history
- This fixes the Bering ORLANSKI OBCs for differing processor counts.
- This is either the wrong way to do group_pass for OBLIQUE OBC's or
  there is more wrong with them.
  • Loading branch information
kshedstrom committed Oct 7, 2023
1 parent 2b4c885 commit f8c4126
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/core/MOM_dynamics_split_RK2.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1194,9 +1194,9 @@ subroutine remap_dyn_split_RK2_aux_vars(G, GV, CS, h_old, h_new, ALE_CSp, OBC, d

if (CS%store_CAu) then
call ALE_remap_velocities(ALE_CSp, G, GV, h_old, h_new, CS%u_av, CS%v_av, OBC, dzRegrid)
call pass_vector(CS%u_av, CS%v_av, G%Domain)
call pass_vector(CS%u_av, CS%v_av, G%Domain, complete=.false.)
call ALE_remap_velocities(ALE_CSp, G, GV, h_old, h_new, CS%CAu_pred, CS%CAv_pred, OBC, dzRegrid)
call pass_vector(CS%CAu_pred, CS%CAv_pred, G%Domain)
call pass_vector(CS%CAu_pred, CS%CAv_pred, G%Domain, complete=.true.)
endif

call ALE_remap_velocities(ALE_CSp, G, GV, h_old, h_new, CS%diffu, CS%diffv, OBC, dzRegrid)
Expand Down
15 changes: 12 additions & 3 deletions src/core/MOM_open_boundary.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ module MOM_open_boundary
use MOM_cpu_clock, only : cpu_clock_id, cpu_clock_begin, cpu_clock_end, CLOCK_ROUTINE
use MOM_diag_mediator, only : diag_ctrl, time_type
use MOM_domains, only : pass_var, pass_vector
use MOM_domains, only : create_group_pass, do_group_pass, group_pass_type
use MOM_domains, only : start_group_pass, complete_group_pass
use MOM_domains, only : To_All, EAST_FACE, NORTH_FACE, SCALAR_PAIR, CGRID_NE, CORNER
use MOM_error_handler, only : MOM_mesg, MOM_error, FATAL, WARNING, NOTE, is_root_pe
use MOM_file_parser, only : get_param, log_version, param_file_type, log_param
Expand Down Expand Up @@ -366,6 +368,7 @@ module MOM_open_boundary
!! for remapping. Values below 20190101 recover the remapping
!! answers from 2018, while higher values use more robust
!! forms of the same remapping expressions.
type(group_pass_type) :: pass_oblique !< Structure for group halo pass
end type ocean_OBC_type

!> Control structure for open boundaries that read from files.
Expand Down Expand Up @@ -1869,9 +1872,10 @@ subroutine open_boundary_init(G, GV, US, param_file, OBC, restart_CS)
if (OBC%radiation_BCs_exist_globally) call pass_vector(OBC%rx_normal, OBC%ry_normal, G%Domain, &
To_All+Scalar_Pair)
if (OBC%oblique_BCs_exist_globally) then
call pass_vector(OBC%rx_oblique_u, OBC%ry_oblique_v, G%Domain, To_All+Scalar_Pair)
call pass_vector(OBC%ry_oblique_u, OBC%rx_oblique_v, G%Domain, To_All+Scalar_Pair)
call pass_vector(OBC%cff_normal_u, OBC%cff_normal_v, G%Domain, To_All+Scalar_Pair)
call create_group_pass(OBC%pass_oblique, OBC%rx_oblique_u, OBC%ry_oblique_v, G%Domain, To_All+Scalar_Pair)
call create_group_pass(OBC%pass_oblique, OBC%ry_oblique_u, OBC%rx_oblique_v, G%Domain, To_All+Scalar_Pair)
call create_group_pass(OBC%pass_oblique, OBC%cff_normal_u, OBC%cff_normal_v, G%Domain, To_All+Scalar_Pair)
call do_group_pass(OBC%pass_oblique, G%Domain)
endif
if (allocated(OBC%tres_x) .and. allocated(OBC%tres_y)) then
do m=1,OBC%ntr
Expand Down Expand Up @@ -5571,6 +5575,11 @@ subroutine remap_OBC_fields(G, GV, h_old, h_new, OBC, PCM_cell)
enddo
endif
enddo ; endif ; endif
if (OBC%radiation_BCs_exist_globally) call pass_vector(OBC%rx_normal, OBC%ry_normal, G%Domain, &
To_All+Scalar_Pair)
if (OBC%oblique_BCs_exist_globally) then
call do_group_pass(OBC%pass_oblique, G%Domain)
endif

end subroutine remap_OBC_fields

Expand Down

0 comments on commit f8c4126

Please sign in to comment.