| 1 | = PDAF_diag_ensstats = |
| 2 | |
| 3 | This page documents the routine `PDAF_diag_ensstats` of PDAF, which was introduced with PDAF V1.12. |
| 4 | |
| 5 | This routine computes the higher-order ensemble statistics (skewness and kurtosis). |
| 6 | |
| 7 | Inputs are the ensemble array and the state vector about which the statistics are computed (usually the ensemble mean). In addition, the index of the element has to be specified for which the statistics are computed. If this is 0, the mean statistics over all elements are computed. The definition used for kurtosis follows that used by Lawson and Hansen, Mon. Wea. Rev. 132 (2004) 1966. |
| 8 | |
| 9 | |
| 10 | The routine can be called in the pre/poststep routine of PDAF both before and after the analysis step to compute the ensemble statistics. |
| 11 | |
| 12 | The interface is the following: |
| 13 | {{{ |
| 14 | SUBROUTINE PDAF_diag_ensstats(dim, dim_ens, element, & |
| 15 | state, ens, skewness, kurtosis, status) |
| 16 | }}} |
| 17 | with the following arguments: |
| 18 | * `dim` : `integer, intent(in)`[[BR]] Size of state vector |
| 19 | * `dim_ens` : `integer, intent(in)`[[BR]] Ensemble size |
| 20 | * `element` : `integer, intent(in)`[[BR]] Element of state vector for which the histogram is computed. If `element=0`, the histogram is computed over the whole state vector |
| 21 | * `state` : `real, intent(in), dimension(dim)`[[BR]] State vector |
| 22 | * `ens` : `real, intent(in), dimension(dim, dim_ens)`[[BR]] State ensemble |
| 23 | * `skewness` : `real, intent(out)`[[BR]] Skewness (third moment) of the ensemble distribution |
| 24 | * `kurtosis` : `real, intent(out)`[[BR]] Kurtosis (fourth moment) of the ensemble distribution |
| 25 | * `status` : `integer, intent(out)`[[BR]] Status flag |
| 26 | |
| 27 | An example of using `PDAF_diag_ensstats` can be found in the Lorenz-96 model example (see testsuite/src/lorenz96/compute_truermse.F90). |