Baseflow methods

Linear-reservoir baseflow method.

class pyrunoff.baseflow.linear_reservoir.LinearReservoir(rainfall_series, gw_fraction, k, basin_area, initial_q=0.0, end=None)[source]

Bases: object

Route groundwater contributions through a linear reservoir.

Parameters:
  • rainfall_series (RainfallSeries) – Incremental rainfall loss series in inches.

  • gw_fraction (float) – Fraction of rainfall loss that contributes to groundwater flow, from 0 to 1.

  • k (Timedelta | timedelta) – Reservoir recession time.

  • basin_area (float) – Drainage area in acres.

  • initial_q (float) – Initial discharge in cubic feet per second.

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

fix_end()[source]

Extend or truncate rainfall data to the configured end time.

update_params(initial_q=None, gw_fraction=None, k=None)[source]

Validate and update any supplied routing parameters.

Parameters left as None keep their current values.

Parameters:
  • initial_q (float | None) – Initial discharge in cubic feet per second.

  • gw_fraction (float | None) – Fraction of rainfall loss that becomes groundwater.

  • k (Timedelta | timedelta | None) – Reservoir recession time.

Raises:

ValueError – If a supplied value is invalid.

route()[source]

Route the groundwater contribution and return discharge values.

Returns:

Baseflow in cubic feet per second.

Return type:

DischargeSeries