wiki:PDAF_diag_variance

Version 5 (modified by lnerger, 6 days ago) ( diff )

--

PDAF_diag_variance

This page documents the routine PDAF_diag_variance 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 taking into account domain-decomposition for parallelized models.

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 specified by COMM_filter. The variant without parallelization is PDAF_diag_variance_nompi.

The interface is:

SUBROUTINE PDAF_diag_variance(dim_p, dim_ens, state_p, ens_p, variance_p, &
     stddev_g, do_mean, do_stddev, COMM_filter, 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_g              ! Global 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(in) :: COMM_filter           ! Filter communicator
  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 ensmeble 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 MPI operations are only done in the communicator COMM_filter which is specified as an argument. This allows to also use the routine if PDAF was not initialized by calling PDAF_init.
Note: See TracWiki for help on using the wiki.