diff --git a/src/riverroute/mosart_tspatialunit_type.F90 b/src/riverroute/mosart_tspatialunit_type.F90 index cb4f6e4..80449b7 100644 --- a/src/riverroute/mosart_tspatialunit_type.F90 +++ b/src/riverroute/mosart_tspatialunit_type.F90 @@ -360,11 +360,13 @@ subroutine Init(this, begr, endr, ntracers, nt_ice, nlon, nlat, EMesh, & if (this%twidth(n) < 0._r8) then this%twidth(n) = 0._r8 end if + if ( this%tlen(n) > 0._r8) then if ( this%tlen(n) > 0._r8 .and. & (this%rlenTotal(n)-this%rlen(n))/this%tlen(n) > 1._r8 ) then this%twidth(n) = c_twid(n)*this%twidth(n) * & ((this%rlenTotal(n)-this%rlen(n))/this%tlen(n)) end if + endif if (this%tlen(n) > 0._r8 .and. this%twidth(n) <= 0._r8) then this%twidth(n) = 0._r8 end if