pywatershed.SourceSinkFlowNodeMaker#

class pywatershed.SourceSinkFlowNodeMaker(parameters, source_sink_df, missing_data_as_zero=False)[source]#

A FlowNodeMaker for SourceSinkFlowNode.

See FlowGraph for related examples and discussion.

__init__(parameters, source_sink_df, missing_data_as_zero=False)[source]#

Initialize a ObsInFlowNodeMaker.

Parameters:
  • parameters (Parameters) – A pywatershed Parameters object.

  • source_sink_df (DataFrame) – A pandas DataFrame of observations with a time index which can be selected by ‘%Y-%m-%d’ strftime of a datetime64. The column names are not used and may be anything, for example the nhm_seg of the upstream segment. However, the columns order MUST be collated with the input data vectors. The sign convention is: sources are positive and sinks are negative. That is, the sign is from the perspective of the node. The units are cubic feet per second.

  • missing_data_as_zero (bool) – Bool option to treat missing times in the timeseries as having zero source/sink.

Methods

__init__(parameters, source_sink_df[, ...])

Initialize a ObsInFlowNodeMaker.

get_dimensions()

Get a tuple of dimension names for this SourceSinkFlowNodeMaker.

get_node(control, index)

Instantiate FlowNode at a given index.

get_parameters()

Get a tuple of parameter names for SourceSinkFlowNodeMaker.

static get_dimensions()[source]#

Get a tuple of dimension names for this SourceSinkFlowNodeMaker.

Return type:

tuple

get_node(control, index)[source]#

Instantiate FlowNode at a given index.

Parameters:
  • control (Control) – A Control object.

  • index (int) – The index in the discretization and parameter data to use when instantiating a FlowNode.

static get_parameters()[source]#

Get a tuple of parameter names for SourceSinkFlowNodeMaker.

Return type:

tuple