This allows the routing class diffusive object to add all tributaries to the diffusive domain. Because the diffusive module currently cannot handle reservoirs, this will always stop at the segment just below a reservoir. All other contributing segments will be added to the diffusive domain.
This PR also restructures the coastal_domain.yaml file format.
Additions
AbstractRouting.py
Add functionality to add all tributaries to diffusive domain. This is done by using the reachable function on the reverse_connections dictionary, starting at each diffusive domain tailwater. Waterbodies are excluded by providing their outlets as the target input to the reachable function.
HYFeaturesNetwork.py
Temporary fix added to account for a specific waterbody that has two outlets in the hydrofabric v20.1. This has been added as an issue to the hydrofabric repo.
Removals
-
Changes
AbstractNetwork.py
Add waterbody_dataframe as an input to routing class to ensure the diffusive domain is cut-off at the outlets of waterbodies.
AbstractRouting.py
Update using upstream_boundary_mainstem_link to exclude headwaters from mainstem_segs list. Previously, upstream_boundary_mainstem_link was a list of length 1, so that single value was removed. Now, because it can be a longer list, it is iterated through and all values within are removed from mainstem_segs.
Testing
Successfully ran using synthetic cross-sections on all current diffusive domains and their tributaries (~35,000 miles of river).
Screenshots
Notes
-
Todos
-
Checklist
[ ] PR has an informative and human-readable title
[ ] Changes are limited to a single goal (no scope creep)
[ ] Code can be automatically merged (no conflicts)
[ ] Code follows project standards (link if applicable)
[ ] Passes all existing automated tests
[ ] Any change in functionality is tested
[ ] New functions are documented (with a description, list of inputs, and expected output)
[ ] Placeholder code is flagged / future todos are captured in comments
[ ] Visually tested in supported browsers and devices (see checklist below :point_down:)
[ ] Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
[ ] Reviewers requested with the Reviewers tool :arrow_right:
This allows the
routing
class diffusive object to add all tributaries to the diffusive domain. Because the diffusive module currently cannot handle reservoirs, this will always stop at the segment just below a reservoir. All other contributing segments will be added to the diffusive domain.This PR also restructures the
coastal_domain.yaml
file format.Additions
AbstractRouting.py
reachable
function on thereverse_connections
dictionary, starting at each diffusive domain tailwater. Waterbodies are excluded by providing their outlets as thetarget
input to thereachable
function.HYFeaturesNetwork.py
Removals
-
Changes
AbstractNetwork.py
waterbody_dataframe
as an input torouting
class to ensure the diffusive domain is cut-off at the outlets of waterbodies.AbstractRouting.py
upstream_boundary_mainstem_link
to excludeheadwaters
frommainstem_segs
list. Previously,upstream_boundary_mainstem_link
was a list of length 1, so that single value was removed. Now, because it can be a longer list, it is iterated through and all values within are removed frommainstem_segs
.Testing
Screenshots
Notes
-
Todos
-
Checklist
Testing checklist
Target Environment support
Accessibility
Other