environmentaltools.processes.cumulative_by_events
- environmentaltools.processes.cumulative_by_events(df, eps: float = 1e-06)[source]
Compute cumulative sum of precipitation resetting between storm events.
Calculates running cumulative precipitation that resets to zero during periods without rainfall, effectively separating discrete storm events.
- Parameters:
df (pd.DataFrame) – DataFrame with ‘pr’ column containing precipitation values
eps (float, optional) – Threshold below which values are considered zero. Default: 1e-6
- Returns:
Cumulative precipitation with resets at dry periods
- Return type:
pd.Series
Notes
This function is essential for the SCS Curve Number method as it tracks precipitation accumulation within individual storm events for proper infiltration and runoff calculations.