Changes between Initial Version and Version 1 of PDAF_set_ens_pointer


Ignore:
Timestamp:
Dec 21, 2016, 4:11:21 PM (8 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PDAF_set_ens_pointer

    v1 v1  
     1= PDAF_set_ens_pointer =
     2
     3This page documents the routine `PDAF_set_ens_pointer` of PDAF.
     4
     5This routine allows a program to set a Fortran pointer to the internal ensemble array of PDAF.
     6
     7The interface is the following:
     8{{{
     9CALL PDAF_set_ens_pointer(ens_pointer, status)
     10}}}
     11
     12The arguments are:
     13
     14 * `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.
     15 * `status`: Status flag. 0 for successful exit.
     16
     17
     18'''Important:'''
     19
     20 * 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
     21{{{
     22 USE PDAF_interfaces_module, ONLY: PDAF_set_smootherens
     23}}}
     24 * 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.
     25
     26
     27Notes:
     28
     29 * `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.