| 1 | = PDAF_diag_variance = |
| 2 | |
| 3 | This page documents the routine `PDAF_diag_variance` of PDAF, which was introduced with PDAF V3.0. |
| 4 | |
| 5 | This routine computes the standard deviation of the ensemble and returns it in the form of a state vector. In addition the mean standard deviation is computed. taking into account domain-decomposition for parallelized models. |
| 6 | |
| 7 | The routine can be called in the pre/poststep routine of PDAF both before and after the analysis step to compute the ensemble statistics. This variant computes the standard deviation for the provided ensemble over the full decomposed domain of a parallel model. The variant without parallelization is [wiki:PDAF_diag_variance_nompi]. |
| 8 | |
| 9 | The interface is the following: |
| 10 | {{{ |
| 11 | SUBROUTINE PDAF_diag_variance(dim_p, dim_ens, state_p, ens_p, variance_p, & |
| 12 | stddev_g, do_mean, do_stddev, COMM_filter, status) |
| 13 | }}} |
| 14 | with the following arguments: |
| 15 | {{{ |
| 16 | INTEGER, INTENT(in) :: dim_p !< state dimension |
| 17 | INTEGER, INTENT(in) :: dim_ens !< Ensemble size |
| 18 | REAL, INTENT(inout) :: state_p(dim_p) !< State vector |
| 19 | REAL, INTENT(in) :: ens_p(dim_p, dim_ens) !< State ensemble |
| 20 | REAL, INTENT(out) :: variance_p(dim_p) !< Variance state vector |
| 21 | REAL, INTENT(out) :: stddev_g !< Global standard deviation of ensemble |
| 22 | INTEGER, INTENT(in) :: do_mean !< 1 to compute ensemble mean; 0 take values froem state_p as ensemble mean |
| 23 | INTEGER, INTENT(in) :: do_stddev !< 1 to compute the ensemble mean standard deviation; 0 no computation of ensemble standard deviation |
| 24 | INTEGER, INTENT(in) :: COMM_filter !< Filter communicator |
| 25 | INTEGER, INTENT(out) :: status !< Status flag (0=success) |
| 26 | }}} |
| 27 | |
| 28 | **Note:** |
| 29 | * The ensemble standard deviation is a common measure of the estimate model root mean square error. It is typically computed in `prepoststep_pdaf` to monitor the assimilation process. |
| 30 | * The option `do_mean` exists mainly for performance reasons. If `state_p` contains is ensmeble mean state it does not need to be computed again. |