Changes between Version 10 and Version 11 of AuxiliaryRoutines


Ignore:
Timestamp:
Dec 10, 2021, 10:39:13 AM (2 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AuxiliaryRoutines

    v10 v11  
    1313}}}
    1414
    15 == PDAF-D_get_smootherens.F90 ==
     15== PDAF-D_get_smootherens ==
    1616
    1717A 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.
     
    4040 
    4141
    42 == PDAF-D_set_smootherens.F90 ==
     42== PDAF-D_set_smootherens ==
    4343
    4444A 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.
     
    6767
    6868
    69 == PDAF-D_get_memberid.F90 ==
     69== PDAF-D_get_memberid ==
    7070
    7171This 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.
     
    8282
    8383
    84 == PDAF-D_get_obsmemberid.F90 ==
     84== PDAF-D_get_obsmemberid ==
    8585
    8686This 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.
     
    9898
    9999
    100 == PDAF-D_incremental.F90 ==
     100== PDAF-D_incremental ==
    101101
    102102When incremental updating is used, this routine is called during the forecast phase to add a fraction of the analysis increment to an ensemble member.
     
    111111
    112112
    113 == PDAF-D_add_increment.F90 ==
     113== PDAF-D_add_increment ==
    114114
    115115When 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:
     
    128128
    129129
    130 == PDAF-D_set_ens_pointer.F90 ==
     130== PDAF-D_set_ens_pointer ==
    131131
    132132This routine allows a program to get a Fortran pointer to the internal ensemble array of PDAF.
     
    153153
    154154
     155== PDAF_set_comm_pdaf ==
     156
     157This routie allows to sepacify the communicator on which the overall PDAF communication bases.
     158
     159By default, PDAF bases on `MPI_COMM_WORLD`, thus all processes in a program. This routine allows to set a different communicator. This can be useful if a model is e.g. run with an OI-server so that the world communicator is split into processes for the IO (file) operations and other processes for the actual model run. In this casem, the model would run using a communicator distinct from `MPI_COMM_WORLD` and PDAF should operate only with this communicator. `PDAF_set_comm_pdaf` allows the user to specify this communicator for PDAF.
     160
     161{{{
     162SUBROUTINE PDAF_set_comm_pdaf(comm_pdaf)
     163
     164  INTEGER,INTENT(in) :: comm_pdaf    ! MPI communicator for PDAF
     165}}}
     166
     167Notes:
     168 * `comm_pdaf` has to be used consistently in `init_parallel_pdaf` where the commuicators for PDAF are prepared on the user side.
     169 * The size of `comm_pdaf` has to be large enough so that the ensemble run can be performed
     170 * `PDAF_set_comm_pdaf` has to be called before calling `PDAF_init`
     171
     172
     173
     174== PDAF_reset_forget ==
     175
     176This routine was introduced with PDAF V2.0
     177
     178The routine allows a user to reset the forgetting factor manually during the assimilation process.
     179
     180For the local ensemble Kalman filters the forgetting factor can be set either globally of differently for each local analysis domain. For the LNETF and the global filters only a global setting of the forgeting factor is possible. This routine allows users to set the forgetting factor case-specific. In addition, the implementation of adaptive choices for the forgetting factor (beyond what is implemented in PDAF) are possible.
     181
     182The interface is the following:
     183{{{
     184  SUBROUTINE PDAF_reset_forget(forget)
     185}}}
     186with the following argument:
     187 * `forget`: `real, intent(in)`[[BR]] The new value of the forgetting factor
     188
     189'''How to use PDAF_reset_forget'''
     190
     191 * '''Global Filters and LNETF''': For global filters `PDAF_reset_forget` has to be called before the actual analysis step. Within the PDAF context the call can be inserted in `prepoststep_pdaf`. Alternatively, the call can be inserted in the routine `assimilation_pdaf` before the call to the PDAF_assimilate_X or PDAF_put_state_X routines
     192 * '''Local Filters''':
     193  * global setting: The forgetting factor is reset globally, thus equal for all local analysis dimains, if `PDAF_reset_forget` is called before the local analysis loop is executed (e.g. in `init_obs_pdomi` or earlier in the analysis step; see [ImplementAnalysisLocal] for the order of the execution of the call-back routines). Thus, it can also be called in `prepoststep_pdaf` to get a global seeting as fo rthe global filters.
     194  * To reset `forget` specific for each local analysis domain, `PDAF_reset_forget` should be called during the local analysis loop. In particular the routines `init_dim_l` or `init_dim_obs_l_pdafomi` are suited for this.
     195
     196
     197= PDAF_force_analysis =
     198
     199This routine was introduced with PDAF 2.0.
     200
     201The routine allows a user to enforce the execution of the analysis step at the next call to `PDAF_put_state_X` or `PDAF_assimilate_X`.
     202
     203In particular for `PDAF_assimilate_X`, the number of time steps is set before the forecast phase is entered. However, one might not know the actual length of the forecast time, e.g. the time when new observation arrive. In this case, one can set for number of time steps to a large value and then check for new observations during the time stepping and call `PDAF_force_analysis` just before `PDAF_assimilate_X` is called to enforce that the analysis step is executed.
     204
     205[[span(style=color: #FF0000, '''Warning:''' This is a routine for advanced functionality of PDAF. Use it carefully, since it can break the assimilation process.)]]
     206
     207For `PDAF_put_state_X`, one can use `PDAF_force_analysis` to overwrite the counting of the ensemble members that PDAF does internally.
     208
     209{{{
     210  SUBROUTINE PDAF_reset_forget()
     211}}}
     212without any argument
     213
     214
     215= PDAF_set_memberid =
     216
     217This routine was introduced with PDAF 2.0.
     218
     219The routine allows a user to reset the ensemble member counter inside PDAF. This routine should only be used in the flexible parallelization mode, thus when `PDAF_put_state_X` is used. Resetting the member counter, allows e.g. to enforce the execution of the analysis step in the case, when according to the PDAF-internal counter, the ensemble integration is not yet complete. For this, one has to specify the member-ID to be the ensemble size.
     220
     221To just enforce an analysis step, we recommend to use the routine [wiki:PDAF_force_analysis]. This routine is also compatible with `PDAF_assimilate_X`.
     222
     223[[span(style=color: #FF0000, '''Warning:''' This is a routine for advanced functionality of PDAF. Use it carefully, since it can break the assimilation process.)]]
     224
     225The interface is the following:
     226{{{
     227  SUBROUTINE PDAF_set_memberid(member)
     228}}}
     229without the argument:
     230 * `member`: `integer, intent(in)` Member in index to which the PDAF-internal counting is reset.