pywrdrb.post.metrics.calculate_vulnerability

pywrdrb.post.metrics.calculate_vulnerability#

pywrdrb.post.metrics.calculate_vulnerability(flow, target)#

Calculate vulnerability as the maximum magnitude of flow deficit below the target.

Vulnerability is defined as the worst (maximum) single-day shortfall where flow is less than the MRF target.

Parameters:
  • flow (pd.Series or np.ndarray) – Simulated streamflow time series.

  • target (pd.Series or np.ndarray) – Minimum flow requirement target time series.

Returns:

vulnerability – Magnitude of the largest deficit (in flow units).

Return type:

float