Changes between Version 2 and Version 3 of PDAF_diag_variance_nompi
- Timestamp:
- Mar 26, 2025, 2:21:18 PM (6 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PDAF_diag_variance_nompi
v2 v3 5 5 This routine computes the unbiased variance of the ensemble and returns it in the form of a state vector. In addition the mean standard deviation is computed. This variant only compute the standard deviation for the provided ensemble array `ens`. Thus, with a domain-decomposed parallel model, the value of of the standard deviation does not consider the full domain. The variant taking into account parallelization is [wiki:PDAF_diag_variance]. 6 6 7 The interface is the following:7 The interface is: 8 8 {{{ 9 9 SUBROUTINE PDAF_diag_variance(dim_p, dim_ens, state_p, ens_p, variance_p, & 10 10 stddev_g, do_mean, do_stddev, status) 11 }}} 12 with the following arguments: 13 {{{ 14 INTEGER, INTENT(in) :: dim_p !< state dimension15 INTEGER, INTENT(in) :: dim_ens !< Ensemble size16 REAL, INTENT( inout) :: state_p(dim_p) !< State vector17 REAL, INTENT( in) :: ens_p(dim_p, dim_ens) !< Stateensemble18 REAL, INTENT(out) :: variance_p(dim_p) !< Variance state vector19 REAL, INTENT(out) :: stddev_g !< Global standard deviation of ensemble20 INTEGER, INTENT(in) :: do_ mean !< 1 to compute ensemble mean; 0 take values froem state_p as ensemble mean21 INTEGER, INTENT(in) :: do_stddev !< 1 to compute the ensemble mean standard deviation;0 no computation of ensemble standard deviation22 INTEGER, INTENT(out) :: status ! <Status flag (0=success)11 12 INTEGER, INTENT(in) :: dim_p ! state dimension 13 INTEGER, INTENT(in) :: dim_ens ! Ensemble size 14 REAL, INTENT(inout) :: state_p(dim_p) ! State vector 15 REAL, INTENT(in) :: ens_p(dim_p, dim_ens) ! State ensemble 16 REAL, INTENT(out) :: variance_p(dim_p) ! Variance state vector 17 REAL, INTENT(out) :: stddev_g ! Global standard deviation of ensemble 18 INTEGER, INTENT(in) :: do_mean ! 1 to compute ensemble mean; 19 ! 0 take values froem state_p as ensemble mean 20 INTEGER, INTENT(in) :: do_stddev ! 1 to compute the ensemble mean standard deviation; 21 ! 0 no computation of ensemble standard deviation 22 INTEGER, INTENT(out) :: status ! Status flag (0=success) 23 23 }}} 24 24 … … 26 26 * 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. 27 27 * The option `do_mean` exists mainly for performance reasons. If `state_p` contains is ensemble mean state it does not need to be computed again. 28 * The routine compute the unbiased variance, i.e. the normalization is 1/(dim_ens-1) 28 * The option `do_stddev` also exists for performance reasons. If one is not interested in this number, it does not need to be computed. 29 * The routine computes the unbiased variance, i.e. the normalization is 1/(dim_ens-1) 30 * The routine does not perform any MPI operations and can also be used if PDAF was not initialized by calling `PDAF_init`.