pyPDAF.init¶
- pyPDAF.init(filtertype: int, subtype: int, stepnull: int, param_int: np.ndarray, dim_pint: int, param_real: np.ndarray, dim_preal: int, py__init_ens_pdaf: Callable, in_screen: int) Tuple[np.ndarray, np.ndarray, int]¶
Initialise the PDAF system.
It is called once at the beginning of the assimilation. The function has to be used in tandem with
pyPDAF.PDAF3.set_parallel().The function specifies the type of DA methods, parameters of the filters, the MPI communicators, and other parallel options. The filter options including filtertype, subtype, param_int, and param_real are introduced in PDAF filter options wiki page. Note that the size of param_int and param_real depends on the filter type and subtype. However, for most filters, they require at least the state vector size and ensemble size for param_int, and the forgetting factor for param_real.
This function also asks for a user-supplied function
py__init_ens_pdaf(). This function is designed to provides an initial ensemble to the internal PDAF ensemble array. The internal PDAF ensemble then can be distributed to initialise the model forecast usingpyPDAF.PDAF.get_state(). This user-supplied function can be empty if the model has already read the ensemble from restart files.- Parameters:
filtertype (int) – Type of filter
subtype (int) – Sub-type of filter
stepnull (int) – Initial time step of assimilation
param_int (ndarray[np.intc, ndim=1]) – Integer parameter array Array shape: (dim_pint)
dim_pint (int) – Number of integer parameters
param_real (ndarray[np.float64, ndim=1]) – Real parameter array Array shape: (dim_preal)
dim_preal (int) – Number of real parameter
py__init_ens_pdaf (Callable) – Initialise ensemble array in PDAF
in_screen (int) – Control screen output:
- Returns:
param_int (ndarray[np.intc, ndim=1]) – Integer parameter array Array shape: (dim_pint)
param_real (ndarray[np.float64, ndim=1]) – Real parameter array Array shape: (dim_preal)
outflag (int) – Status flag, 0: no error, error codes: