U_init_ens
The page document the user-supplied call-back routine U_init_ens
.
The routine U_init_ens
is a call-back routine that has to be provided by the user. In the simplified interface the predefined name of the routine is init_ens_pdaf
, but in the full interface, the user can choose the name of the routine. U_init_ens
is called by PDAF_init
at the initialization stage of a data assimilation program. The purpose of the routine is to fill the ensemble array that is provided by PDAF with an initial ensemble of model states.
The interface is the following:
SUBROUTINE U_init_ens(filtertype, dim_p, dim_ens, & state_p, Uinv, ens_p, flag)
with
filtertype
:integer, intent(in)
The integer defining the type of filter algorithm as given in the call toPDAF_init
dim_p
:integer, intent(in)
An integer holding the size of the state dimension for the calling process as specified in the call toPDAF_init
dim_ens
:integer, intent(in)
An integer holding the size of the ensemble (or the rank of the state covariance matrix for SEEK)state_p
:real, intent(inout), dimension(dim_p)
A real array for the model state part of the calling process (Only relevant for mode-based filters like SEEK; does not need to be filled for ensemble-based filters)Uinv
:real, intent(inout), dimension(dim_ens-1, dim_ens-1)
A real array for the inverse of matrix U from the decomposition of the state error covariance matrix P = VUVT (Only relevant for mode-based filters like SEEK.)ens_p
:real, intent(out), dimension(dim_p, dim_ens)
A real array that has tobe filled with the ensemble of model states. (In case of a mode-based filter (SEEK), the array has to be fillex with the modes of the covariance matrix)flag
:integer, intent(inout)
Status flag for PDAF. It is 0 upon entry and can be set by in the user-supplied routine, depending on the success of the ensemble initialization. Preferably, values above 102 should be used for failures to avoid conflicts with the error codes defined within PDAF_init.
Notes:
- The routine is called by all MPI processes that compute the filter analysis step (i.e. those for which 'filterpe' is set to true. In the standard configuration of
init_parallel_pdaf
these are all processes of the first model task, i.e. task_id=1.) U_init_ens
is only called byPDAF_init
if no error occurred before; thus the status flag is zero.
Last modified 10 years ago
Last modified on Jan 19, 2015, 1:06:35 PM