Skip to content

Commit

Permalink
backport ds pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
austinorr committed Dec 5, 2023
1 parent 154002b commit c3b1a86
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion nereid/nereid/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""""Water quality engine for computing graph-based land surface load aggregation and BMP effectiveness."""


__version__ = "0.9.5"
__version__ = "0.9.6"
13 changes: 8 additions & 5 deletions nereid/nereid/src/watershed/solve_watershed.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,18 +206,21 @@ def solve_node(
"WARNING: This node is missing from all input tables."
)

next_ds = list(g.successors(node))
data["_ds_node_id"] = ",".join(map(str, next_ds))

predecessors = list(g.predecessors(node))

# leaf nodes are read only
deg = g.in_degree(node)
if isinstance(deg, int) and deg < 1:
if not predecessors:
data["_is_leaf"] = True
return

node_type = data.get("node_type", None) or "virtual"
predecessors = list(g.predecessors(node))

accumulate_wet_weather_loading(g, data, predecessors, wet_weather_parameters)
accumulate_dry_weather_loading(g, data, predecessors, dry_weather_parameters)

node_type = data.get("node_type", None) or "virtual"

if "site_based" in node_type:
# This sequence handles volume capture, load reductions, and also delivers
# downstream loads.
Expand Down

0 comments on commit c3b1a86

Please sign in to comment.