pywatershed.PRMSChannelFlowNode#
- class pywatershed.PRMSChannelFlowNode(control, tsi, ts, c0, c1, c2, calc_method=None)[source]#
A FlowNode for the Muskingum-Mann method of PRMSChannel
This is a
FlowNodeimplementation ofPRMSChannelwhere the solution is the so-called Muskingum-Mann method.See
FlowGraphfor discussion and a worked example. The notebook examples/06_flow_graph_starfit.ipynb highlights adding a StarfitFlowNode aFlowGraphotherwised comprised ofPRMSChannelFlowNodes using the helper functionsprms_channel_flow_graph_to_model_dict()andprms_channel_flow_graph_postprocess().- __init__(control, tsi, ts, c0, c1, c2, calc_method=None)[source]#
Initialize a PRMSChannelFlowNode.
- Parameters:
tsi (
int64) – Parameter ofPRMSChannel.ts (
float64) – Parameter ofPRMSChannel.c0 (
float64) – Parameter ofPRMSChannel.c1 (
float64) – Parameter ofPRMSChannel.c2 (
float64) – Parameter ofPRMSChannel.calc_method (
Literal['numba','numpy']) – One of “numba”, “numpy” (default).
Methods
__init__(control, tsi, ts, c0, c1, c2[, ...])Initialize a PRMSChannelFlowNode.
advance()Advance this FlowNode to the next timestep.
calculate_subtimestep(ihr, inflow_upstream, ...)Calculate the subtimestep.
Finalize the current timestep at this FlowNode.
Prepare the subtimestep for subtimestep calculations.
Attributes
The average outflow over the timestep in cubic feet per second.
The outflow over the sub-timestep in cubic feet per second.
The sink or source amount of the FlowNode at the current subtimestep.
The volumetric storage in millions of cubic feet.
The volumetric storage change in cubic feet.
- calculate_subtimestep(ihr, inflow_upstream, inflow_lateral)[source]#
Calculate the subtimestep.
- Parameters:
isubstep – Zero-based integer indicating the index of the current substep.
inflow_upstream – The in-channel flows to this FlowNode on the current substep.
inflow_lateral – The later flows to this FlowNode on the current substep.
- property outflow#
The average outflow over the timestep in cubic feet per second.
- property outflow_substep#
The outflow over the sub-timestep in cubic feet per second.
- property sink_source#
The sink or source amount of the FlowNode at the current subtimestep.
- property storage#
The volumetric storage in millions of cubic feet. Not defined for PRMSChannel.
- property storage_change#
The volumetric storage change in cubic feet.