= PDAF_diag_compute_moments = This page documents the routine `PDAF_diag_compute_moments` of PDAF, which was introduced with PDAF V3.0. This routine computes the mean, the unbiased variance, the unbiased skewness, and the unbiased excess kurtosis from an ensemble. All moments are stored in a single array. `kmax` controls the highest order that should be computed. The routine can be called in the pre/poststep routine of PDAF both before and after the analysis step to compute the ensemble statistics. The interface is the following: {{{ SUBROUTINE PDAF_diag_compute_moments(dim_p, dim_ens, ens, kmax, moments) }}} with the following arguments: - `dim_p` : INTEGER, INTENT(IN) [[BR]] Size of the state vector - `dim_ens` : INTEGER, INTENT(IN) [[BR]] Ensemble size - `ens` : REAL, DIMENSION(dim_p,dim_ens), INTENT(IN)[[BR]] Ensemble matrix - `kmax` : INTEGER, INTENT(IN) [[BR]] Highest order of statistical moment (1-4) - `moments` : REAL, DIMENSION(dim_p,kmax), INTENT(OUT) [[BR]] The statistical moments up to order `kmax` with - column 1: mean - column 2: variance - column 3: skewness - colmnu 4: excess kurtosis