climpred.horizon.horizon¶
-
climpred.horizon.
horizon
(cond)[source]¶ Calculate the predictability horizon based on a condition
`cond
.- Parameters
cond (xr.DataArray, xr.Dataset) – User-defined boolean array where True means the system is predictable at the given lead. E.g., this could be based on the dynamical forecast beating a reference forecast, p values, confidence intervals, etc. cond should contain the dimension lead at the minimum.
- Returns
predictability horizon reduced by
lead
dimension.- Return type
xr.DataArray, xr.Dataset
Example
>>> skill = pm.verify(metric='acc', comparison='m2e', dim=['init','member'], reference=['persistence']) >>> horizon(skill.sel(skill='initialized') > skill.sel(skill='persistence'))
>>> bskill = pm.bootstrap(metric='acc', comparison='m2e', dim=['init','member'], reference=['persistence'], iterations=21) >>> horizon(bskill.sel(skill='persistence', results='p') <= 0.05)