pywatershed.FlowNode#
- class pywatershed.FlowNode(control)[source]#
The FlowNode base class.
A FlowNode represents a spatial element of an explicit flow solution which does not (currently) include a head (water depth) term.
A FlowNode is instantiated with its own (optional) data and calculates outflow, storage_change, and sink_source properties on subtimesteps.
A FlowNode may have additional public variables provided by properties that can be requested to be collected by
FlowGraphfor output to NetCDF files. These variable names should just not overwrite any existing class attributes.See
FlowGraphfor related examples and discussion.- __init__(control)[source]#
Initialize the FlowNode.
- Parameters:
control (
Control) – A Control object.
Methods
__init__(control)Initialize the FlowNode.
advance()Advance this FlowNode to the next timestep.
calculate_subtimestep(isubstep, ...)Calculate the subtimestep.
Finalize the current timestep at this FlowNode.
Prepare the subtimestep for subtimestep calculations.
Attributes
The average outflow of the FlowNode over the current timestep.
The outflow of the FlowNode over the sub-timestep.
The sink or source amount of the FlowNode at the current subtimestep.
The storage of the FlowNode at the current subtimestep.
The storage change of the FlowNode at the current subtimestep.
- calculate_subtimestep(isubstep, inflow_upstream, inflow_lateral)[source]#
Calculate the subtimestep.
- property outflow: float64#
The average outflow of the FlowNode over the current timestep.
- property outflow_substep: float64#
The outflow of the FlowNode over the sub-timestep.
- property sink_source: float64#
The sink or source amount of the FlowNode at the current subtimestep.
- property storage: float64#
The storage of the FlowNode at the current subtimestep.
- property storage_change: float64#
The storage change of the FlowNode at the current subtimestep.