wiki:PDAF_diag_variance_nompi

PDAF_diag_variance_nompi

This page documents the routine PDAF_diag_variance_nompi of PDAF, which was introduced with PDAF V3.0.

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 PDAF_diag_variance.

The interface is:

SUBROUTINE PDAF_diag_variance(dim_p, dim_ens, state_p, ens_p, variance_p, &
     stddev, do_mean, do_stddev, status)

  INTEGER, INTENT(in) :: dim_p                 ! state dimension
  INTEGER, INTENT(in) :: dim_ens               ! Ensemble size
  REAL, INTENT(inout) :: state_p(dim_p)        ! State vector
  REAL, INTENT(in)    :: ens_p(dim_p, dim_ens) ! State ensemble
  REAL, INTENT(out)   :: variance_p(dim_p)     ! Variance state vector
  REAL, INTENT(out)   :: stddev                ! standard deviation of ensemble
  INTEGER, INTENT(in) :: do_mean               ! 1 to compute ensemble mean; 
                                               ! 0 take values froem state_p as ensemble mean
  INTEGER, INTENT(in) :: do_stddev             ! 1 to compute the ensemble mean standard deviation;
                                               ! 0 no computation of ensemble standard deviation
  INTEGER, INTENT(out) :: status               ! Status flag (0=success)

Note:

  • 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.
  • 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.
  • The option do_stddev also exists for performance reasons. If one is not interested in this number, it does not need to be computed.
  • The routine computes the unbiased variance, i.e. the normalization is 1/(dim_ens-1)
  • The routine does not perform any MPI operations and can also be used if PDAF was not initialized by calling PDAF_init.
Last modified 4 days ago Last modified on Mar 26, 2025, 2:23:20 PM
Note: See TracWiki for help on using the wiki.