From 528dda128e1341b3755a3138dec5bd8be6ed3664 Mon Sep 17 00:00:00 2001 From: Hong-Yi Li Date: Tue, 19 Sep 2023 21:08:53 -0700 Subject: [PATCH 1/2] fixing a bug affecting main-channel temperature --- components/mosart/src/riverroute/MOSART_physics_mod.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/components/mosart/src/riverroute/MOSART_physics_mod.F90 b/components/mosart/src/riverroute/MOSART_physics_mod.F90 index 6f19ac18c9a7..6146143fef2c 100644 --- a/components/mosart/src/riverroute/MOSART_physics_mod.F90 +++ b/components/mosart/src/riverroute/MOSART_physics_mod.F90 @@ -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 From d816847881ab22a7ff25061943e552e57f662d5c Mon Sep 17 00:00:00 2001 From: Hong-Yi Li Date: Fri, 22 Sep 2023 07:38:23 -0700 Subject: [PATCH 2/2] replacing tabs with spaces --- .../mosart/src/riverroute/MOSART_physics_mod.F90 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/mosart/src/riverroute/MOSART_physics_mod.F90 b/components/mosart/src/riverroute/MOSART_physics_mod.F90 index 6146143fef2c..9bb71e958f26 100644 --- a/components/mosart/src/riverroute/MOSART_physics_mod.F90 +++ b/components/mosart/src/riverroute/MOSART_physics_mod.F90 @@ -180,7 +180,7 @@ subroutine Euler call t_startf('mosartr_subnetwork') TRunoff%erlateral(:,:) = 0._r8 - if (heatflag) THeat%ha_lateral(:) = 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 @@ -994,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 @@ -1230,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