Skip to content

Commit

Permalink
Compute dz in the halo for OBC segments
Browse files Browse the repository at this point in the history
It was blowing up with "forrtl: error (65): floating invalid" when
accessing dz in the halo at the boundary, but just sometimes.  My
default layout is trouble while my testing layout of 48 cores is not.
  • Loading branch information
kshedstrom authored and marshallward committed Mar 9, 2024
1 parent 714d2da commit 6153d97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1436,8 +1436,11 @@ subroutine step_MOM_tracer_dyn(CS, G, GV, US, h, Time_local)
CS%tracer_diff_CSp, CS%tracer_Reg, CS%tv)
if (CS%debug) call MOM_tracer_chksum("Post-diffuse ", CS%tracer_Reg, G)
if (showCallTree) call callTree_waypoint("finished tracer advection/diffusion (step_MOM)")
call update_segment_tracer_reservoirs(G, GV, CS%uhtr, CS%vhtr, h, CS%OBC, &
if (associated(CS%OBC)) then
call pass_vector(CS%uhtr, CS%vhtr, G%Domain)
call update_segment_tracer_reservoirs(G, GV, CS%uhtr, CS%vhtr, h, CS%OBC, &
CS%t_dyn_rel_adv, CS%tracer_Reg)
endif
call cpu_clock_end(id_clock_tracer) ; call cpu_clock_end(id_clock_thermo)

call cpu_clock_begin(id_clock_other) ; call cpu_clock_begin(id_clock_diagnostics)
Expand Down
3 changes: 2 additions & 1 deletion src/tracer/MOM_tracer_advect.F90
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ subroutine advect_tracer(h_end, uhtr, vhtr, OBC, dt, G, GV, US, CS, Reg, x_first
x_first = (MOD(G%first_direction,2) == 0)

! increase stencil size for Colella & Woodward PPM
if (CS%usePPM .and. .not. CS%useHuynh) stencil = 3
! if (CS%usePPM .and. .not. CS%useHuynh) stencil = 3
if (CS%usePPM) stencil = 3

ntr = Reg%ntr
Idt = 1.0 / dt
Expand Down

0 comments on commit 6153d97

Please sign in to comment.