Reservoir routing

Level-pool reservoir routing method.

class pyrunoff.reservoir.level_pool.LevelPoolOutput(outflows, total_outflow, storage, elevation)[source]

Bases: object

Typed output series produced by level-pool routing.

Parameters:
class pyrunoff.reservoir.level_pool.LevelPool(inflow_series, elevation_storage, storage_discharges, initial_storage, end=None, storage_adjustment_factor=43560)[source]

Bases: object

Route inflow through a reservoir with one or more outlet curves.

Inflow and discharge are in cubic feet per second, storage is in acre-feet and elevation is in feet.

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

  • elevation_storage (ElevationStorage) – Elevation-storage rating curve.

  • storage_discharges (dict[str, StorageDischarge]) – Named storage-discharge curves, one per outlet/spillway.

  • initial_storage (float) – Starting reservoir storage in the curve’s units.

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

  • storage_adjustment_factor (float) – Factor converting storage to the units used by the routing calculations.

route()[source]

Route inflow and return outlet flows, total flow, storage, and elevation.

Returns:

Typed output series aligned to the original inflow index.

Raises:

ValueError – If no storage-discharge curve is given, or a curve has fewer than two points.

Return type:

LevelPoolOutput

Rating curves used by reservoir routing.

class pyrunoff.reservoir.reservoir_utils.ElevationStorage(elevation, storage)[source]

Bases: object

Pair elevation and storage values for a reservoir rating curve.

Parameters:
  • elevation (Series) – Elevation values in increasing order.

  • storage (Series) – Corresponding storage values.

class pyrunoff.reservoir.reservoir_utils.StorageDischarge(storage, discharge)[source]

Bases: object

Pair storage and discharge values for a reservoir outlet curve.

Parameters:
  • storage (Series) – Storage values in increasing order.

  • discharge (Series) – Corresponding discharge values.