11 | | SUBROUTINE PDAF_diag_ensmean(dim, dim_ens, state, ens, status) |
| 11 | SUBROUTINE PDAF_diag_ensmean(dim_p, dim_ens, state_p, ens_p, status) |
| 12 | |
| 13 | INTEGER, INTENT(in) :: dim_p ! PE-local state dimension |
| 14 | INTEGER, INTENT(in) :: dim_ens ! Ensemble size |
| 15 | REAL, INTENT(inout) :: state_p(dim_p) ! ensemble mean state vector |
| 16 | REAL, INTENT(in) :: ens(dim_p, dim_ens) ! State ensemble |
| 17 | INTEGER, INTENT(out) :: status ! Status flag (0=success) |
13 | | with the following arguments: |
14 | | {{{ |
15 | | INTEGER, INTENT(in) :: dim ! state dimension |
16 | | INTEGER, INTENT(in) :: dim_ens ! Ensemble size |
17 | | REAL, INTENT(inout) :: state(dim) ! ensemble mean state vector |
18 | | REAL, INTENT(in) :: ens(dim, dim_ens) ! State ensemble |
19 | | INTEGER, INTENT(out) :: status ! Status flag (0=success) |
20 | | }}} |
| 19 | |
| 20 | **Notes:** |
| 21 | * The routine compute the ensemble mean for the given ensemble array `ens_p`. This works for both a parallelized model and without parallelization. |
| 22 | * The routine does not perform any MPI operations and can also be used if PDAF was not initialized by calling `PDAF_init`. |