| 1 | = PDAF_diag_CRPS = |

| 2 | |

| 3 | |

| 4 | This page documents the routine `PDAF_diag_CRPS` of PDAF, which was introduced with PDAF V2.0. |

| 5 | |

| 6 | This routine computes the Continuous Ranked Probability Score (CRPS) and its decomposition into resolution and reliability. The CRPS provide information about the statistical consistency of the ensemble with the observations. In toy models, the CRPS can also be computed with raegard to the true state. |

| 7 | |

| 8 | Inputs are an array holding the observed ensemble and a corresponding vector of observations. |

| 9 | |

| 10 | The routine can be called in the pre/poststep routine of PDAF both before and after the analysis step to compute the CRPS. |

| 11 | |

| 12 | The interface is the following: |

| 13 | {{{ |

| 14 | SUBROUTINE PDAF_diag_CRPS(dim, dim_ens, element, oens, obs, & |

| 15 | CRPS, reli, resol, uncert, status) |

| 16 | }}} |

| 17 | with the following arguments: |

| 18 | {{{ |

| 19 | INTEGER, INTENT(in) :: dim ! PE-local state dimension |

| 20 | INTEGER, INTENT(in) :: dim_ens ! Ensemble size |

| 21 | INTEGER, INTENT(in) :: element ! ID of element to be used |

| 22 | !< If element=0, mean values over all elements are computed |

| 23 | REAL, INTENT(in) :: oens(dim, dim_ens) ! State ensemble |

| 24 | REAL, INTENT(in) :: obs(dim) ! State ensemble |

| 25 | REAL, INTENT(out) :: CRPS ! CRPS |

| 26 | REAL, INTENT(out) :: reli ! Reliability |

| 27 | REAL, INTENT(out) :: resol ! resolution |

| 28 | REAL, INTENT(out) :: uncert ! uncertainty |

| 29 | INTEGER, INTENT(out) :: status ! Status flag (0=success) |

| 30 | }}} |

| 31 | |

| 32 | Hints: |

| 33 | * using `element` one can select a since element of the observation vector for which the CRPS is computed (by multiple computations, it allows to computed a CRPS individually for each entry of the state vector). For `element=0` the CRPS over all elements is computed |

| 34 | * A perfectly reliable system gives `reli=0`. An informative system gives `resol << uncert`. |

| 35 | * Compared to Hersbach (2000), `resol` here is equivalent to `CPRS_pot`. |

| 36 | * The routine is not parallelized. In addition, it uses a rather simple sorting algorithm. Accordingly, the performance is likely suboptimal for high-dimensional cases. |

| 37 | |