pyPDAF.PDAFomi.diag_crps¶
- pyPDAF.PDAFomi.diag_crps(nobs: int, perturb: int, verbose: int) Tuple[int, np.ndarray]¶
Compute CRPS diagnostics between observations and observed ensembles.
For each active OMI observation type, this routine compares the observed ensemble
H(X_i)with the observation vector. It returns CRPS and the Hersbach (2000) decomposition into reliability, potential CRPS, and uncertainty. CRPS is a probabilistic score: smaller values indicate that the ensemble distribution is closer to the verifying observation.If
perturb=0, PDAF-OMI uses the stored observations directly. For any nonzero value, PDAF-OMI creates perturbed observations by drawing Gaussian noise with variance from the stored inverse observation variance and adds it to the observations before computing CRPS.This function is only useful after observation operators are performed.
- Parameters:
nobs (int) – Input/output number of OMI observation types. The input value can be arbitrary; PDAF-OMI overwrites it with the number of active observation types for which diagnostics are returned.
perturb (int) – Perturbation option.
0uses the stored observations. Any nonzero value uses perturbed observations with Gaussian observation-error noise.verbose (int) – Verbosity flag. If greater than zero, PDAF-OMI prints one row per observation type.
- Returns:
nobs (int) – Number of observation-type entries returned by PDAF-OMI.
crps (ndarray[np.float64, ndim=2]) – PDAF-owned CRPS diagnostic matrix with shape
(4, nobs). The rows are CRPS, reliability, potential CRPS, and uncertainty.
References
Hersbach, H. (2000). Decomposition of the continuous ranked probability score for ensemble prediction systems. Weather and Forecasting, 15, 559-570.