Commit 4fc02c8b authored by Anthony's avatar Anthony
Browse files

Improvement of topoindex_stream / rlen and rdz during truncate

parent 166870ae
......@@ -3640,9 +3640,24 @@ SUBROUTINE routing_reg_killbas(nbpt, ib, tokill, totakeover, nwbas, inflowmax, b
! Keep the stream rlen / rdz
! See if we keep one only rlen / rdz corresponding to the stream
! or if we want to keep the previous one AND the stream one
IF (fetch_basin(ib,tokill) .GT. fetch_basin(ib, totakeover)) THEN
!
! The two following conditions are if one basins flows into the other
! we sum the rlen and rdz and recalculate topoindex_stream
IF (outflow_basin(ib,tokill) == totakeover .AND. outflow_grid(ib,tokill) == ib ) THEN
basin_rlen(ib, totakeover) = basin_rlen(ib, totakeover) + basin_rlen(ib, tokill)
basin_rdz(ib, totakeover) = basin_rdz(ib, totakeover) + basin_rdz(ib,tokill)
basin_topoindex_stream(ib, totakeover) = SQRT(basin_rlen(ib, totakeover) **3 / basin_rdz(ib, totakeover)) / 1000
ELSE IF (outflow_basin(ib,totakeover) == tokill .AND. outflow_grid(ib,totakeover) == ib ) THEN
basin_rlen(ib, totakeover) = basin_rlen(ib, totakeover) + basin_rlen(ib, tokill)
basin_rdz(ib, totakeover) = basin_rdz(ib, totakeover) + basin_rdz(ib,tokill)
basin_topoindex_stream(ib, totakeover) = SQRT(basin_rlen(ib, totakeover) **3 / basin_rdz(ib, totakeover)) / 1000
! If they don't flow one into the other then take the value of the HTU with
! the higher fetch (naturally it keeps the totakeover value, so just treats
! this case)
ELSE IF (fetch_basin(ib,tokill) .GT. fetch_basin(ib, totakeover)) THEN
basin_rlen(ib, totakeover) = basin_rlen(ib, tokill)
basin_rdz(ib, totakeover) = basin_rdz(ib, tokill)
basin_topoindex_stream(ib, totakeover) = basin_topoindex_stream(ib,tokill)
END IF
!
basin_area(ib, totakeover) = basin_area(ib, totakeover) + basin_area(ib,tokill)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment