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:
objectTransform excess rainfall into discharge using a Clark unit hydrograph.
Rainfall is resampled to
compute_time_stepbefore routing, keeping its total depth.- Parameters:
rainfall_series (RainfallSeries) – Incremental excess rainfall in inches.
basin_area (float) – Drainage area in acres.
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
Nonekeep their current values.- Parameters:
- 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.
- 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: