environmentaltools.temporal.storm_series
- environmentaltools.temporal.storm_series(data, cols, info)[source]
Extract storm events from time series data using threshold-based criteria.
Identifies discrete storm events based on duration, inter-arrival time, and threshold criteria following the methodology of Lira-Loarca et al. (2020).
- Parameters:
data (pd.DataFrame) – Raw time series with datetime index
cols (list) – Names of required concomitant variables (first one used for threshold)
info (dict) –
Storm event criteria with keys:
- thresholdfloat
Minimum value to define storm event
- min_durationint
Minimum storm duration (in time_step units)
- inter_timeint
Minimum inter-arrival time between storms (in time_step units)
- time_stepstr
Time step unit: ‘D’ (days) or ‘h’ (hours)
- interpolationbool, optional
Whether to interpolate missing data. Default: False
- filenamestr, optional
Output file name for saving results
- Returns:
Storm time series with identified events and their properties
- Return type:
pd.DataFrame
- Raises:
ValueError – If any label in cols is not in data columns
Notes
Uses the extreme_events package to identify storms based on:
Exceedance of threshold value
Minimum event duration
Minimum separation between events
References
Lira-Loarca, A., et al. (2020). A global classification of coastal flood hazard climates. Scientific Reports.
Examples
>>> info = { ... 'threshold': 2.0, ... 'min_duration': 6, ... 'inter_time': 24, ... 'time_step': 'h', ... 'interpolation': True ... } >>> storms = storm_series(data, ['wave_height', 'wind_speed'], info)