PetscDAEnsembleInitialize#
Initialize ensemble members with Gaussian perturbations
Synopsis#
PetscErrorCode PetscDAEnsembleInitialize(PetscDA da, Vec x0, PetscReal obs_error_std, PetscRandom rng)
Collective
Input Parameters#
da - PetscDA context
x0 - Background state
obs_error_std - Target ensemble spread (standard deviation) after sample-mean removal
rng - Random number generator
Notes#
Each member is drawn as Gaussian(0, obs_error_std * sqrt(m / (m - 1))) (with m the ensemble size),
the sample mean across the ensemble is subtracted, and x0 is added. The pre-mean-removal scale
by sqrt(m / (m - 1)) compensates for the variance reduction from centering, so the per-member
spread after the subtraction is approximately obs_error_std regardless of m.
See Also#
Level#
beginner
Location#
Examples#
src/ml/da/tutorials/ex1.c
src/ml/da/tutorials/ex2.c
src/ml/da/tutorials/ex3.c
Index of all PetscDA routines
Table of Contents for all manual pages
Index of all manual pages