Reach routing

Muskingum reach routing method.

class pyrunoff.reach.muskingum.MuskingumOutput(total_outflow)[source]

Bases: object

Results returned by Muskingum.route().

Parameters:

total_outflow (DischargeSeries) – Routed discharge leaving the reach.

class pyrunoff.reach.muskingum.Muskingum(inflow_series, k, x, end=None)[source]

Bases: object

Route discharge through a reach using the Muskingum method.

Parameters:
  • inflow_series (DischargeSeries) – Discharge entering the reach.

  • k (Timedelta | timedelta) – Muskingum storage time constant. It must satisfy the stability condition for the inflow time step.

  • x (float) – Weighting factor between zero and 0.5.

  • end (Timestamp | None) – Optional final timestamp for the inflow series.

update_params(k, x)[source]

Validate and update the storage time constant and weighting factor.

Parameters:
  • k (Timedelta) – Muskingum storage time constant.

  • x (float) – Weighting factor, from zero to 0.5.

Raises:

ValueError – If a value is invalid or unstable for the time step.

route()[source]

Route inflow through the reach and return the resulting discharge.

Returns:

Typed output holding the routed discharge series.

Return type:

MuskingumOutput