Skip to content

Commit

Permalink
Merge branch 'hongyili/mosart/mosart-heat-fix' (PR #5940)
Browse files Browse the repository at this point in the history
Adding the initialization of a variable used in MOSART-heat; otherwise, the main-channel temperature
will be overestimated. The change made only affects stream temperature, nothing else.

Fixes #5941
[BFB]
  • Loading branch information
bishtgautam committed Nov 16, 2023
2 parents a3a53ba + d816847 commit 7680d57
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions components/mosart/src/riverroute/MOSART_physics_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ subroutine Euler

call t_startf('mosartr_subnetwork')
TRunoff%erlateral(:,:) = 0._r8
if (heatflag) THeat%ha_lateral(:) = 0._r8
TRunoff%etexchange = 0._r8
do nt=nt_nliq,nt_nice ! water transport
if (TUnit%euler_calc(nt)) then
Expand Down Expand Up @@ -993,7 +994,7 @@ subroutine Routing_DW(iunit, nt, theDeltaT)
TRunoff%erout(iunit,nt) = -TRunoff%erin(iunit,nt)-TRunoff%erlateral(iunit,nt)
else
!TODO. If this channel is at basin outlet (downstream is ocean), use the KW method
if(rtmCTL%mask(iunit) .eq. 3) then
if(rtmCTL%mask(iunit) .eq. 3) then
call Routing_KW(iunit, nt, theDeltaT)
else
if(nt == nt_nliq) then
Expand Down Expand Up @@ -1229,9 +1230,9 @@ subroutine updateState_hillslope(iunit,nt)

if(nt==nt_nliq) then
TRunoff%yh(iunit,nt) = TRunoff%wh(iunit,nt) !/ TUnit%area(iunit) / TUnit%frac(iunit)
else
TRunoff%yh(iunit,nt) = 0._r8
end if
else
TRunoff%yh(iunit,nt) = 0._r8
end if

end subroutine updateState_hillslope

Expand Down

0 comments on commit 7680d57

Please sign in to comment.