Skip to content

No infiltration may happen in an outlet cell that is not part of my d… - #11

Open
KCallaghan wants to merge 1 commit into
r-barnes:masterfrom
KCallaghan:neighbour_outlets
Open

No infiltration may happen in an outlet cell that is not part of my d…#11
KCallaghan wants to merge 1 commit into
r-barnes:masterfrom
KCallaghan:neighbour_outlets

Conversation

@KCallaghan

Copy link
Copy Markdown
Contributor

…epression

// cell's water table is left unaffected.

if(fp_le(water_vol,current_volume-wtd(c.x,c.y))){
if(( fp_le(water_vol,current_volume-wtd(c.x,c.y)) && dep_labels.count(label(c.x,c.y))==1) || fp_le(water_vol, current_volume)){

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this part? fp_le(water_vol, current_volume)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are checking for two similar but different cases here: either the current volume is large enough to accommodate all of the water, without needing to check for groundwater space in the current cell (I think that's the part you're asking about); or there is enough space if we account for groundwater space in the current cell AND the current cell is labelled as a part of this depression.
The distinction is necessary because the outlet cell of the depression does not always share a label with this depression. When that happens, we do not want to allow infiltration in that outlet cell since it contributes to the wtd_vol of a different depression.
That said, given the change in #10, I am struggling to conceive of a case where this problem would occur. It could have occurred prior to #10, and I think may have been a subset of that issue. If you agree, you can disregard this PR, though I don't think it would do any harm either.

This will also only be even a potential problem pending your decision to either fully include, or fully remove, infiltration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants