Closed amoodie closed 3 years ago
Re thought 1: I might be missing the point, but if the question is whether to allow routing into sinks, I think the answer is yes, because that's the only way for the fan to fill sinks.
Re thought 2: Intended to prevent avulsing uphill. max(slopes)
sits within this conditional statement. How about amending the condition the following?
if any(and(avulsionSusceptibilityIndex > 0, avulsionSusceptibilityIndex > S_ij))
Re 1: right, sorry I phrased that poorly. Agreed that it should route into the sink. The question is whether routing into a sink right away should stop the routing, in the same way that routing is stopped if a sink is encountered during routing (like it would be stopped here). Right now, because the while
loop is immediately entered, if that first cell is a sink, routing will leave the sink.
I think that routing should be stopped in this case, but it is not currently implemented that way.
Gotcha, agreed on amending to terminate routing if first step is into sink.
Re 2: I see, I think that probably works most of the time, but there are times when S_ij
is negative, because the bed elevations are constantly changing during the run. In that case, the outcome could be an avulsion into an uphill cell...
Re: 2, ah right. In that case, I think it's ok to avulse to an uphill cell (adverse slope, but less adverse than continuing along the existing channel).
Bug with forced avulsion pathfinding, even when placed into a sink.
Consider, an avulsion is found in
avulsionCheck
to go from 5661 to 5763. Whereupon enteringenactAvulsions
if the new cell is not an ocean or channel cell, then enteringpropogateAvulsion
thewhile
loop is immediately encountered, and one step is taken regardless of where that step would be into.Two thoughts that should be addressed:
propogateAvulsion
, should we also check if the new cell is asinkFlag
cell? And then not route it anywhere? This should be easy to implement.propogateAvulsion
and duringcheckAvulsions
. That is,max(slopes)
may be a negative number (all slopes are uphill). Is this the behavior we want?