Skip to content

Commit

Permalink
Update both up and downstream values of diversion destination
Browse files Browse the repository at this point in the history
  • Loading branch information
rcabell committed Nov 20, 2024
1 parent e1848e2 commit 6f8822d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Routing/module_channel_routing.F
Original file line number Diff line number Diff line change
Expand Up @@ -1972,7 +1972,7 @@ subroutine drive_CHANNEL_RSL(did, UDMP_OPT,KT, IXRT,JXRT, &
if (div_src /= 0) then
! remove from upstream
#ifdef HYDRO_D
print free, "DEBUG: diverting", div_src, "of", Quc, "from link id =", LINKID(k), "on processor", my_id
print free, "DEBUG: diverting", div_src, "of", Quc, "from link id =", LINKID(k) !, "on processor", my_id
if (div_src > Quc) &
print free, "DEBUG WARNING: diverted flow (", div_src, ") exceeds total flow, zeroing."
#endif
Expand All @@ -1983,8 +1983,11 @@ subroutine drive_CHANNEL_RSL(did, UDMP_OPT,KT, IXRT,JXRT, &
if (div_dst /= 0) then
! apply observed value to downstream
#ifdef HYDRO_D
print free, "DEBUG: diverting", div_dst, "to link id =", LINKID(k), "on processor", my_id
print free, "DEBUG: diverting", div_dst, "to link id =", LINKID(k) !, "on processor", my_id
#endif
Qup = div_dst
Quc = div_dst
tmpQLINK(k,1) = div_dst
tmpQLINK(k,2) = div_dst
end if

Expand Down

0 comments on commit 6f8822d

Please sign in to comment.