pywatershed.SourceSinkFlowNode#
- class pywatershed.SourceSinkFlowNode(control, flow_min, source_sink_data, missing_data_as_zero=False)[source]#
A FlowNode that adds or removes flow above some minimum flow parameter.
See
FlowGraphfor examples and discussion.- __init__(control, flow_min, source_sink_data, missing_data_as_zero=False)[source]#
Initialize an SourceSinkFlowNode.
- Parameters:
control (
Control) – a Control object.flow_min (
float64) – A floating point value for the minium flow.source_sink_data (
Series) – A pandas Series object of sources/sinks at this location. See SourceSinkFlowNodeMaker for a description of the pd.DataFrame passed to supply this data.missing_data_as_zero (
bool) – Bool option to treat missing times in the timeseries as having zero source/sink.
Methods
__init__(control, flow_min, source_sink_data)Initialize an SourceSinkFlowNode.
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.
Average sink and source through the last subtimestep Sink is negative, indicating that incoming flow is being discarded (if it were being stored, the storage change would be the opposite sign).
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#
Average sink and source through the last subtimestep Sink is negative, indicating that incoming flow is being discarded (if it were being stored, the storage change would be the opposite sign). Source is positive, indicating that incoming flow is being augmented (if it were being stored, the storage change would be the opposite sign).
- 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.