Rainfall events¶
rainfall_thresholds.events ¶
Rainfall events from an hourly series, after Melillo et al. (2018).
The series is split wherever no_rain_break_hours or more consecutive
dry hours occur; an event whose cumulated rainfall is below min_event_mm
is dropped. An event runs from its first to its last wet hour, both
included, so a single wet hour is a one-hour event.
This is a simplified reconstruction: Melillo et al. also vary the dry gap with the season and separate sub-events within a rainfall period. Use their CTRL-T tool when the reconstruction itself is what you are studying.
RainfallEvent
dataclass
¶
One rainfall event: first and last wet hour, duration and total.
reconstruct_events ¶
reconstruct_events(series: Iterable[tuple[datetime, float]], *, no_rain_break_hours: int, min_event_mm: float) -> list[RainfallEvent]
Split an hourly (timestamp, mm) series into rainfall events.
The series is sorted by timestamp first. Dry hours are counted as samples, so the series is expected to be hourly and without gaps.
latest_event ¶
latest_event(events: Iterable[RainfallEvent]) -> RainfallEvent | None
The event that ended last, or None.