Transform methods

Clark unit-hydrograph transform method.

class pyrunoff.transform.clark_uh.ClarkUh(rainfall_series, basin_area, tc, storage_r, compute_time_step=datetime.timedelta(seconds=60), resampled_data=None, end=None)[source]

Bases: object

Transform excess rainfall into discharge using a Clark unit hydrograph.

Rainfall is resampled to compute_time_step before routing, keeping its total depth.

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

  • basin_area (float) – Drainage area in acres.

  • tc (timedelta | Timedelta) – Basin time of concentration.

  • storage_r (timedelta | Timedelta) – Linear-reservoir storage coefficient.

  • compute_time_step (timedelta | Timedelta | None) – Optional interval for resampling rainfall before routing. Defaults to one minute.

  • resampled_data (Series | None) – Internal cache of rainfall resampled for routing.

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

update_params(tc=None, storage_r=None)[source]

Validate and update any supplied routing parameters.

Parameters left as None keep their current values.

Parameters:
  • tc (Timedelta | None) – Basin time of concentration.

  • storage_r (Timedelta | None) – Linear-reservoir storage coefficient.

Raises:

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

static get_uh(basin_area, tc, storage_r, time_step)[source]

Calculate Clark unit-hydrograph ordinates for the basin parameters.

Parameters:
  • basin_area (float) – Drainage area in acres.

  • tc (Timedelta) – Basin time of concentration.

  • storage_r (Timedelta) – Linear-reservoir storage coefficient.

  • time_step (Timedelta) – Computation interval.

Returns:

Discharge per inch of excess rainfall, in cubic feet per second, at each step.

route(return_at_computed_timestep=False)[source]

Route excess rainfall through the Clark unit hydrograph.

Parameters:

return_at_computed_timestep (bool) – If true, return values at the computation interval; otherwise, use the original rainfall interval. Because the first rainfall value covers the interval before the first timestamp, output at the computation interval starts inside that interval (14 minutes before the first timestamp for 15-minute rainfall at the default one-minute step).

Returns:

Routed discharge series.

Return type:

DischargeSeries