Skip to main content
`Ctrl`+`K`

# PetscDAEnsembleSetSize

Sets the ensemble dimensions used by a `PetscDA`.

## Synopsis

    PetscErrorCode PetscDAEnsembleSetSize(PetscDA da, PetscInt ensemble_size)

Collective

## Input Parameters

- da - the `PetscDA` context

- ensemble_size - number of ensemble members

## Options Database Key

- -petscda_ensemble_size <size> - number of ensemble members

## Note

The size must be greater than or equal to two. See the scale factor in `PetscDAEnsembleInitialize()` and `PetscDALETKFLocalAnalysis()`

## See Also

PetscDA: Data Assimilation, `PetscDA`, `PETSCDAETKF`, `PETSCDALETKF`, `PetscDAGetSizes()`, `PetscDASetSizes()`, `PetscDASetUp()`

## Level

beginner

## Location

src/ml/da/impls/ensemble/daensemble.c

## Examples

src/ml/da/tutorials/ex2.c
src/ml/da/tutorials/ex3.c
src/ml/da/tutorials/ex1.c
src/ml/da/tutorials/ex4.c

Index of all PetscDA routines
Table of Contents for all manual pages
Index of all manual pages