Changes between Version 11 and Version 12 of AuxiliaryRoutines


Ignore:
Timestamp:
Dec 10, 2021, 10:46:54 AM (3 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AuxiliaryRoutines

    v11 v12  
    55PDAF provide a number of auxiliary routines. They provide access to PDAF-internal data, which is not available through the regular interface of PDAF.
    66
    7 == PDAF_interfaces_module.F90 ==
     7== Interface specifications ==
     8
     9=== PDAF_interfaces_module.F90 ===
    810
    911This file contains the module `PDAF_interfaces_module`. It provides interface definitions for the routines of PDAF. If you like to use explicit Fortran interfaces, or if you have to use then in case of the smoother, you have to include the following line in the header you the calling routine:
     
    1315}}}
    1416
    15 == PDAF-D_get_smootherens ==
     17
     18
     19== Access to PDAF-internal arrays ==
     20
     21=== PDAF_get_smootherens ===
    1622
    1723A smoother is available for several filters (ESTKF/LESTKF/ETKF/LETKF/EnKF). This routine is called to set a Fortran pointer to the array in PDAF that stores the ensembles for smoothing. Also, the routine sets the available lag of the smoothing.
     
    4046 
    4147
    42 == PDAF-D_set_smootherens ==
    43 
    44 A smoother is available for several filters (ESTKF/LESTKF/ETKF/LETKF/EnKF). This routine is called to set a Fortran pointer to the array in PDAF that stores the ensembles for smoothing. In addition, it sets the available lag of the smoothing. This routine is called in the offline mode of PDAF. While in the online mode, the smoother ensemble array is filled automatically by PDAF, one has to fill it manually in the offline mode. `PDAF_set_smootherens` gives access to the smoother array to fill it.
     48=== PDAF_set_smootherens ===
     49
     50A smoother is available for several filters (ESTKF/LESTKF/ETKF/LETKF/EnKF/NETF/LNETF). This routine is called to set a Fortran pointer to the array in PDAF that stores the ensembles for smoothing. In addition, it sets the available lag of the smoothing. This routine is called in the offline mode of PDAF. While in the online mode, the smoother ensemble array is filled automatically by PDAF, one has to fill it manually in the offline mode. `PDAF_set_smootherens` gives access to the smoother array to fill it.
    4551
    4652{{{
     
    6773
    6874
    69 == PDAF-D_get_memberid ==
     75=== PDAF_set_ens_pointer ===
     76
     77This routine allows a program to get a Fortran pointer to the internal ensemble array of PDAF.
     78
     79{{{
     80CALL PDAF_set_ens_pointer(ens_pointer, status)
     81}}}
     82
     83The arguments are:
     84
     85 * `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.
     86 * `status`: Status flag. 0 for successful exit.
     87
     88
     89'''Important:'''
     90
     91 * 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`. In the header part of the routine that calls `PDAF_set_ens_pointer` one has to include `use PDAF_interfaces_module`!
     92 * 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.
     93
     94
     95Notes:
     96
     97 * `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.
     98
     99
     100== Access to index information ==
     101
     102=== PDAF_get_memberid ===
    70103
    71104This routine can be called from the model during an ensemble integration. It provides access to the number (id) of the ensemble member that is currently integrated.
     
    82115
    83116
    84 == PDAF-D_get_obsmemberid ==
     117=== PDAF_get_obsmemberid ===
    85118
    86119This routine can be called from the model during the analysis step. It provides access to the number (id) of the ensemble member for which the user-routine for the observation operator is called.
     
    97130
    98131
    99 
    100 == PDAF-D_incremental ==
     132== Incremental analysis updates ==
     133
     134=== PDAF_incremental ===
    101135
    102136When incremental updating is used, this routine is called during the forecast phase to add a fraction of the analysis increment to an ensemble member.
     
    111145
    112146
    113 == PDAF-D_add_increment ==
     147=== PDAF_add_increment ===
    114148
    115149When incremental updating is used, the state increment of the analysis step is not directly added to the forecast state. To add the increment to some state vector `PDAF_add_increment` is called:
     
    128162
    129163
    130 == PDAF-D_set_ens_pointer ==
    131 
    132 This routine allows a program to get a Fortran pointer to the internal ensemble array of PDAF.
    133 
    134 {{{
    135 CALL PDAF_set_ens_pointer(ens_pointer, status)
    136 }}}
    137 
    138 The arguments are:
    139 
    140  * `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.
    141  * `status`: Status flag. 0 for successful exit.
    142 
    143 
    144 '''Important:'''
    145 
    146  * 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`. In the header part of the routine that calls `PDAF_set_ens_pointer` one has to include `use PDAF_interfaces_module`!
    147  * 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.
    148 
    149 
    150 Notes:
    151 
    152  * `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.
    153 
    154 
    155 == PDAF_set_comm_pdaf ==
     164== Controlling the MPI communicator for PDAF ==
     165
     166=== PDAF_set_comm_pdaf ===
    156167
    157168This routie allows to sepacify the communicator on which the overall PDAF communication bases.
     
    170181 * `PDAF_set_comm_pdaf` has to be called before calling `PDAF_init`
    171182
    172 
    173 
    174 == PDAF_reset_forget ==
     183== Additional (advanced) functionality ==
     184
     185=== PDAF_reset_forget ===
    175186
    176187This routine was introduced with PDAF V2.0
     
    195206
    196207
    197 = PDAF_force_analysis =
     208=== PDAF_force_analysis ===
    198209
    199210This routine was introduced with PDAF 2.0.
     
    213224
    214225
    215 = PDAF_set_memberid =
     226=== PDAF_set_memberid ===
    216227
    217228This routine was introduced with PDAF 2.0.