environmentaltools.spatiotemporal.indicators.multivariate_persistence
- environmentaltools.spatiotemporal.indicators.multivariate_persistence(cube_list, thresholds)[source]
Calculate multivariate persistence as proportion of time with simultaneous conditions.
Computes the temporal persistence of compound conditions where multiple variables simultaneously exceed their thresholds. This measures the duration and frequency of multivariate extreme states.
- Parameters:
cube_list (list of np.ndarray) – List of 3D arrays (time, lat, lon), one per variable.
thresholds (list of float) – List of threshold values, one per variable.
- Returns:
persistence_map – 2D map of compound persistence (0-1 scale).
- Return type:
np.ndarray
Notes
This is similar to multivariate_threshold_exceedance but emphasizes the temporal persistence aspect. High values indicate areas where compound extreme conditions persist for extended periods.
Examples
>>> import numpy as np >>> cube1 = np.random.lognormal(0, 1, (365, 20, 20)) # Daily data >>> cube2 = np.random.gamma(2, 1, (365, 20, 20)) >>> persistence = multivariate_persistence([cube1, cube2], [2.0, 3.0])