pyPDAF.PDAF.init

pyPDAF.PDAF.init()

This function initialises the PDAF system.

It is called once at the beginning of the assimilation. The function specifies the type of DA methods, parameters of the filters, the MPI communicators, and other parallel options. The user-supplied function py__init_ens_pdaf() provides an initial ensemble to the internal PDAF ensemble array. The internal PDAF ensemble can be distribute to the model by pyPDAF.PDAF.get_state().

The filter options including filtertype, subtype, param_int, and param_real are introduced in PDAF filter options wiki page.

The MPI communicators are defined in pyPDAF example page. The example script is based on the parallelisation strategy of PDAF which is available at PDAF parallelisation strategy wiki page and PDAF parallelisation adaptation wiki page. In most cases, the user does not need to change the parallelisation script.

Parameters:
  • filtertype (int) – type of filter

  • subtype (int) – sub-type of filter

  • stepnull (int) – initial time step of assimilation

  • param_int (ndarray[tuple[dim_pint], np.intc]) –

    filter parameters in integer

    The array dimension dim_pint is the number of integer parameters which depends on the type of filters and required non-default options

  • param_real (ndarray[tuple[dim_preal], np.float64]) –

    filter parameters in float/real values

    The array dimension dim_preal is number of real parameter which depends on the type of filters and required non-default options

  • COMM_model (int) – model MPI communicator

  • COMM_filter (int) – filter MPI communicator

  • COMM_couple (int) – coupling MPI communicator

  • task_id (int) – index of parallel model task starting from 1

  • n_modeltasks (int) – number of parallel model tasks

  • in_filterpe (bool) – True if the current PE is a filter PE else False

  • py__init_ens_pdaf (Callable[filtertype:int, dim_p:int, dim_ens:int, state_p : ndarray[tuple[dim_p], np.float64], uinv : ndarray[tuple[dim_ens-1, dim_ens-1], np.float64], ens_p : ndarray[tuple[dim_p, dim_ens], np.float64], flag:int]) –

    initialise PDAF internal ensemble array

    Callback Parameters
    • filtertypeint
      • type of filter to initialize

    • dim_pint
      • pe-local state dimension

    • dim_ensint
      • size of ensemble

    • state_pndarray[tuple[dim_p], np.float64]
      • pe-local model state

    • uinvndarray[tuple[dim_ens-1, dim_ens-1], np.float64]
      • array not referenced for ensemble filters

    • ens_pndarray[tuple[dim_p, dim_ens], np.float64]
      • pe-local state ensemble

    • flagint
      • pdaf status flag

    Callback Returns
    • state_pndarray[tuple[dim_p], np.float64]
      • pe-local model state

    • uinvndarray[tuple[dim_ens-1, dim_ens-1], np.float64]
      • array not referenced for ensemble filters

    • ens_pndarray[tuple[dim_p, dim_ens], np.float64]
      • pe-local state ensemble

    • flagint
      • pdaf status flag

  • in_screen (int) – Verbosity level of PDAF screen output

Returns:

  • param_int (ndarray[tuple[dim_pint], np.intc]) – filter parameters in integer

    The array dimension dim_pint is the number of integer parameters which depends on the type of filters and required non-default options

  • param_real (ndarray[tuple[dim_preal], np.float64]) – filter parameters in float/real values

    The array dimension dim_preal is number of real parameter which depends on the type of filters and required non-default options

  • flag (int) – Status flag, 0: no error, error codes: