This page documents the routine PDAF_set_ens_pointer of PDAF.

This routine allows a program to set a Fortran pointer to the internal ensemble array of PDAF.

The interface is the following:

CALL PDAF_set_ens_pointer(ens_pointer, status)

The arguments are:

  • ens_pointer: The pointer to the smoother ensemble. The dimension is ens_pointer(:,:). Thus in the program calling PDAF_set_ens_pointer one has to declare REAL, POINTER :: sens_pointer(:,:). On output it points to the ensemble array.
  • status: Status flag. 0 for successful exit.


  • Because ens_pointer is a pointer, the call to PDAF_set_ens_pointer needs an explicit Fortran interface. This is provided by the Fortran module PDAF_interfaces_module. For this, one has to include the interface declaration from PDAF's interfaces module by
     USE PDAF_interfaces_module, ONLY: PDAF_set_ens_pointer
  • Using a pointer combined with an intent, i.e. using a pointer as argument, is a feature of Fortran 2003. Thus, if a too old compiler is used, it will provide an error when the routine is compiled.


  • PDAF_set_ens_pointer is a special routine that is never needed when the standard online or offline modes of the implementation are used. However, the routine allows to build a model that uses each column of the ensemble array to store the model fields. Thus, one can avoid allocating additional memory for the model fields.
Last modified 3 years ago Last modified on Mar 9, 2020, 9:40:21 AM