nwm_metrics.metric_functions.get_threshold_value#

nwm_metrics.metric_functions.get_threshold_value(data, threshold)[source]#

Get threshold value based on the specified threshold type and value.

Return type:

float

Parameters:
  • data (pd.Series) – time series data (e.g., observed values) used to calculate threshold value when threshold type is “quantile”

  • threshold (dict) – Dictionary containing threshold value and type. Example: {“value”: 0.9, “type”: “quantile”} or {“value”: 10, “type”: “absolute”}

Returns:

threshold value

Return type:

float