Changes between Version 40 and Version 41 of ImplementAnalysislseik


Ignore:
Timestamp:
Sep 15, 2011, 2:44:47 PM (8 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ImplementAnalysislseik

    v40 v41  
    3838
    3939The general espects of the filter-specific routines `PDAF_put_state_*` have been described on the page [ModifyModelforEnsembleIntegration Modification of the model code for the ensemble integration].
    40 The interface for the routine `PDAF_put_state_lseik` contains several routine names for routines that operate on the local analysis domains (marked by `_local` at then end of the routine name). In addition, there are names for routines that consider all available observations required to perform local analyses with LSEIK within some sub-domain of a domain-decomposed model (marked by `_full` at then end of the routine name). In case of a serial execution of the assimilation program, these will be all globally available observations. However, if the program is executed with parallelization, this might be a smaller set of observations.
     40The interface for the routine `PDAF_put_state_lseik` contains several routine names for routines that operate on the local analysis domains (marked by `_l` at the end of the routine name). In addition, there are names for routines that consider all available observations required to perform local analyses with LSEIK within some sub-domain of a domain-decomposed model (marked by `_f` at the end of the routine name). In case of a serial execution of the assimilation program, these will be all globally available observations. However, if the program is executed with parallelization, this might be a smaller set of observations.
    4141
    4242To explain the  difference, it is assumed, for simplicity, that a local analysis domain consists of a single vertical column of the model grid. In addition, we assume that the domain decomposition splits the global model domain by vertical boundaries as is typical for ocean models and that the observations are spatially distributed observations of model fields that are part of the state vector.  Under these assumptions, the situation is the following: When a model uses domain decomposition, the LSEIK filter is executed such that for each model sub-domain a loop over all local analysis domains (e.g. vertical columns) that belong to the model sub-domain is performed. As each model sub-domain is treated by a different process, all loops are executed parallel to each other.
     
    4646The interface when using the LSEIK filter is the following:
    4747{{{
    48   SUBROUTINE PDAF_put_state_lseik(U_collect_state, U_init_dim_obs_full, U_obs_op_full, U_init_obs_full, &
    49                                   U_init_obs_local, U_prepoststep, U_prodRinvA_local, U_init_n_domains, &
    50                                   U_init_dim_local, U_init_dim_obs_local, &
    51                                   U_global2local_state, U_local2glocal_state, U_glocal2local_obs, &
    52                                   U_init_obsvar, U_init_obsvar_local, status)
     48  SUBROUTINE PDAF_put_state_lseik(U_collect_state, U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, &
     49                                  U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_init_n_domains, &
     50                                  U_init_dim_l, U_init_dim_obs_l, &
     51                                  U_g2l_state, U_l2g_state, U_g2l_obs, &
     52                                  U_init_obsvar, U_init_obsvar_l, status)
    5353}}}
    5454with the following arguments:
    55  * [#U_collect_statecollect_state.F90 U_collect_state]: The name of the user-supplied routine that initializes a state vector from the array holding the ensemble of model states from the model fields. This is basically the inverse operation to `U_distribute_state` used in [ModifyModelforEnsembleIntegration#PDAF_get_state PDAF_get_state]
    56  * [#U_init_dim_obs_fullinit_dim_obs_full.F90 U_init_dim_obs_full]: The name of the user-supplied routine that provides the size of the full observation vector
    57  * [#U_obs_op_fullobs_op_full.F90 U_obs_op_full]: The name of the user-supplied routine that acts as the full observation operator on some state vector
    58  * [#U_init_obs_fullinit_obs_full.F90 U_init_obs_full]: The name of the user-supplied routine that initializes the full vector of observations
    59  * [#U_init_obs_localinit_obs_local.F90 U_init_obs_local]: The name of the user-supplied routine that initializes the vector of observations for a local analysis domain
    60  * [#U_prepoststepprepoststep_seik.F90 U_prepoststep]: The name of the pre/poststep routine as in `PDAF_get_state`
    61  * [#U_prodRinvA_localprodrinva_local.F90 U_prodRinvA_local]: The name of the user-supplied routine that computes the product of the inverse of the observation error covariance matrix with some matrix provided to the routine by PDAF.
    62  * [#U_init_n_domainsinit_n_domains.F90 U_init_n_domains]: The name of the routine that provides the number of local analysis domains
    63  * [#U_init_dim_localinit_dim_local.F90 U_init_dim_local]: The name of the routine that provides the state dimension for a local analysis domain
    64  * [#U_init_dim_obs_localinit_dim_obs_local.F90 U_init_dim_obs_local]: The name of the routine that initializes the size of the observation vector for a local analysis domain
    65  * [#U_global2local_stateglobal2local_state.F90 U_global2local_state]: The name of the routine that initializes a local state vector from the global state vector
    66  * [#U_local2global_statelocal2global_state.F90 U_local2global_state]: The name of the routine that initializes the corresponding part of the global state vector from the the provided local state vector
    67  * [#U_global2local_obsglobal2local_obs.F90 U_global2local_obs]: The name of the routine that initializes a local observation vector from a full observation vector
    68  * [#U_init_obsvarinit_obsvar.F90 U_init_obsvar]: The name of the user-supplied routine that provides a global mean observation error variance (This routine will only be executed, if an adaptive forgetting factor is used)
    69  * [#U_init_obsvar_localinit_obsvar_local.F90 U_init_obsvar_local]: The name of the user-supplied routine that provides a mean observation error variance for the local analysis domain (This routine will only be executed, if a local adaptive forgetting factor is used)
     55 * [#U_collect_statecollect_state_pdaf.F90 U_collect_state]: The name of the user-supplied routine that initializes a state vector from the array holding the ensemble of model states from the model fields. This is basically the inverse operation to `U_distribute_state` used in [ModifyModelforEnsembleIntegration#PDAF_get_state PDAF_get_state]
     56 * [#U_init_dim_obs_finit_dim_obs_f_pdaf.F90 U_init_dim_obs_f]: The name of the user-supplied routine that provides the size of the full observation vector
     57 * [#U_obs_op_fobs_op_f_pdaf.F90 U_obs_op_f]: The name of the user-supplied routine that acts as the full observation operator on some state vector
     58 * [#U_init_obs_finit_obs_f_pdaf.F90 U_init_obs_f]: The name of the user-supplied routine that initializes the full vector of observations
     59 * [#U_init_obs_linit_obs_l_pdaf.F90 U_init_obs_l]: The name of the user-supplied routine that initializes the vector of observations for a local analysis domain
     60 * [#U_prepoststepprepoststep_seik_pdaf.F90 U_prepoststep]: The name of the pre/poststep routine as in `PDAF_get_state`
     61 * [#U_prodRinvA_lprodrinva_l_pdaf.F90 U_prodRinvA_l]: The name of the user-supplied routine that computes the product of the inverse of the observation error covariance matrix with some matrix provided to the routine by PDAF.
     62 * [#U_init_n_domainsinit_n_domains_pdaf.F90 U_init_n_domains]: The name of the routine that provides the number of local analysis domains
     63 * [#U_init_dim_linit_dim_l_pdaf.F90 U_init_dim_l]: The name of the routine that provides the state dimension for a local analysis domain
     64 * [#U_init_dim_obs_linit_dim_obs_l_pdaf.F90 U_init_dim_obs_l]: The name of the routine that initializes the size of the observation vector for a local analysis domain
     65 * [#U_g2l_stateg2l_state_pdaf.F90 U_g2l_state]: The name of the routine that initializes a local state vector from the global state vector
     66 * [#U_l2g_statel2g_state_pdaf.F90 U_l2g_state]: The name of the routine that initializes the corresponding part of the global state vector from the the provided local state vector
     67 * [#U_g2l_obsg2l_obs_pdaf.F90 U_g2l_obs]: The name of the routine that initializes a local observation vector from a full observation vector
     68 * [#U_init_obsvarinit_obsvar_pdaf.F90 U_init_obsvar]: The name of the user-supplied routine that provides a global mean observation error variance (This routine will only be executed, if an adaptive forgetting factor is used)
     69 * [#U_init_obsvar_linit_obsvar_l_pdaf.F90 U_init_obsvar_l]: The name of the user-supplied routine that provides a mean observation error variance for the local analysis domain (This routine will only be executed, if a local adaptive forgetting factor is used)
    7070 * `status`: The integer status flag. It is zero, if `PDAF_put_state_lseik` is exited without errors.
    7171
     
    7777Here, all user-supplied routines are described that are required in the call to `PDAF_put_state_lseik`. For some of the generic routines, we link to the page on [ModifyModelforEnsembleIntegration modifying the model code for the ensemble integration].
    7878
    79 To indicate user-supplied routines we use the prefix `U_`. In the template directory `templates/` these routines are provided in files with the routine's name without this prefix. In the example implementation in `testsuite/src/dummymodel_1D`, the routines exist without the prefix, but with the extension `_dummy_D.F90`. In the section titles below we provide the name of the template file in parentheses.
     79To indicate user-supplied routines we use the prefix `U_`. In the template directory `templates/` these routines are provided in files with the routine's name without this prefix. In the example implementation in `testsuite/src/dummymodel_1D`, the routines exist without the prefix, but with the extension `_pdaf.F90`. In the section titles below we provide the name of the template file in parentheses.
    8080
    8181In the subroutine interfaces some variables appear with the suffix `_p` (short for 'process'). This suffix indicates that the variable is particular to a model sub-domain, if a domain decomposed model is used. Thus, the value(s) in the variable will be different for different model sub-domains. In addition, there will be variables with the suffix `_f` (for 'full') and with the suffix `_l` (for 'local').
    8282
    83 === `U_collect_state` (collect_state.F90) ===
     83=== `U_collect_state` (collect_state_pdaf.F90) ===
    8484
    8585This routine is independent from the filter algorithm used.
    86 See the mape on [ModifyModelforEnsembleIntegration#U_collect_statecollect_state.F90 modifying the model code for the ensemble integration] for the description of this routine.
    87 
    88 
    89 === `U_init_dim_obs_full` (init_dim_obs_full.F90) ===
    90 
    91 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
    92 
    93 The interface for this routine is:
    94 {{{
    95 SUBROUTINE init_dim_obs_full(step, dim_obs_f)
     86See the mape on [ModifyModelforEnsembleIntegration#U_collect_statecollect_state_pdaf.F90 modifying the model code for the ensemble integration] for the description of this routine.
     87
     88
     89=== `U_init_dim_obs_f` (init_dim_obs_f_pdaf.F90) ===
     90
     91This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     92
     93The interface for this routine is:
     94{{{
     95SUBROUTINE init_dim_obs_f(step, dim_obs_f)
    9696
    9797  INTEGER, INTENT(in)  :: step       ! Current time step
     
    103103Some hints:
    104104 * It can be useful to not only determine the size of the observation vector at this point. One can also already gather information about the location of the observations, which can be used later, e.g. to implement the observation operator. In addition, one can already prepare an array that holds the full observation vector. This can be used later by `U_init_obs_l` to initialize a local vector of observations by selecting the relevant parts of the full observation vector. The required arrays can be defined in a module like `mod_assimilation`.
    105  * The routine is similar to `init_dim_obs` used in the global filters. However, if the global filter is used with a domain-decomposed model, it only initializes the size of the observation vector for the local model sub-domain. This is different for the local filters, as the local analysis also requires observational data from neighboring model sub-domains. Nonetheless, one can base on an implemented routine `init_dim_obs` to implement `init_dim_obs_full`.
    106 
    107 === `U_obs_op_full` (obs_op_full.F90) ===
    108 
    109 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
    110 
    111 The interface for this routine is:
    112 {{{
    113 SUBROUTINE obs_op_full(step, dim_p, dim_obs_f, state_p, m_state_f)
     105 * The routine is similar to `init_dim_obs` used in the global filters. However, if the global filter is used with a domain-decomposed model, it only initializes the size of the observation vector for the local model sub-domain. This is different for the local filters, as the local analysis also requires observational data from neighboring model sub-domains. Nonetheless, one can base on an implemented routine `init_dim_obs` to implement `init_dim_obs_f`.
     106
     107=== `U_obs_op_f` (obs_op_f_pdaf.F90) ===
     108
     109This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     110
     111The interface for this routine is:
     112{{{
     113SUBROUTINE obs_op_f(step, dim_p, dim_obs_f, state_p, m_state_f)
    114114
    115115  INTEGER, INTENT(in) :: step               ! Currrent time step
     
    125125 * The routine is similar to `init_dim_obs` used for the global filters. However, with a domain-decomposed model `m_state_f` will contain parts of the state vector from neighboring model sub-domains. To make these parts accessible, some parallel communication will be necessary (The state information for a neighboring model sub-domain, will be in the memory of the process that handles that sub-domain). The example implementation in `testsuite/dummymodel_1d` uses the function `MPI_AllGatherV` for this communication.
    126126
    127 === `U_init_obs_full` (init_obs_full.F90) ===
     127=== `U_init_obs_f` (init_obs_f_pdaf.F90) ===
    128128
    129129This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     
    132132The interface for this routine is:
    133133{{{
    134 SUBROUTINE init_obs_full(step, dim_obs_f, observation_f)
     134SUBROUTINE init_obs_f(step, dim_obs_f, observation_f)
    135135
    136136  INTEGER, INTENT(in) :: step                     ! Current time step
     
    146146
    147147
    148 === `U_init_obs_local` (init_obs_local.F90) ===
    149 
    150 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
    151 
    152 The interface for this routine is:
    153 {{{
    154 SUBROUTINE init_obs_local(domain_p, step, dim_obs_l, observation_l)
     148=== `U_init_obs_l` (init_obs_l_pdaf.F90) ===
     149
     150This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     151
     152The interface for this routine is:
     153{{{
     154SUBROUTINE init_obs_l(domain_p, step, dim_obs_l, observation_l)
    155155
    156156  INTEGER, INTENT(in) :: domain_p                 ! Current local analysis domain
     
    164164
    165165Hints:
    166  * For parallel efficiency, the LSEIK algorithm is implemented in a way that first the full vectors are initialized. These are then restricted to the local analysis domain during the loop over all local analysis domains. Thus, if the full vector of observations has been initialized before `U_init_obs_local` is executed (e.g. by `U_init_dim_obs_full`), the operations performed in this routine will be to select the part of the full observation vector that is relevant for the current local analysis domain.
    167  * The routine `U_init_dim_obs_local` is executed before this routine. Thus, if that routine already prepares the information which elements of `observation_f` are needed for `observation_l`, this information can be used efficiently here.
    168 
    169 
    170 === `U_prepoststep` (prepoststep_seik.F90) ===
     166 * For parallel efficiency, the LSEIK algorithm is implemented in a way that first the full vectors are initialized. These are then restricted to the local analysis domain during the loop over all local analysis domains. Thus, if the full vector of observations has been initialized before `U_init_obs_l` is executed (e.g. by `U_init_dim_obs_f`), the operations performed in this routine will be to select the part of the full observation vector that is relevant for the current local analysis domain.
     167 * The routine `U_init_dim_obs_l` is executed before this routine. Thus, if that routine already prepares the information which elements of `observation_f` are needed for `observation_l`, this information can be used efficiently here.
     168
     169
     170=== `U_prepoststep` (prepoststep_seik_pdaf.F90) ===
    171171
    172172This routine can be identical to that used for the global SEIK filter, which has already been described on the [ModifyModelforEnsembleIntegration#U_prepoststepprepoststep_seik.F90 page on modifying the model code for the ensemble integration]. For completeness, the description is repeated:
     
    204204
    205205
    206 === `U_prodRinvA_local` (prodrinva_local.F90) ===
     206=== `U_prodRinvA_l` (prodrinva_l_pdaf.F90) ===
    207207
    208208This routine is used by the local filters (LSEIK and LETKF). There is a slight difference between LSEIK and LETKF for this routine, which is described below.
     
    210210The interface for this routine is:
    211211{{{
    212 SUBROUTINE prodRinvA_local(domain_p, step, dim_obs_l, rank, obs_l, A_l, C_l)
     212SUBROUTINE prodRinvA_l(domain_p, step, dim_obs_l, rank, obs_l, A_l, C_l)
    213213
    214214  INTEGER, INTENT(in) :: domain_p             ! Current local analysis domain
     
    232232
    233233
    234 === `U_init_n_domains` (init_n_domains.F90) ===
     234=== `U_init_n_domains` (init_n_domains_pdaf.F90) ===
    235235
    236236This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     
    251251
    252252
    253 === `U_init_dim_local` (init_dim_local.F90) ===
    254 
    255 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
    256 
    257 The interface for this routine is:
    258 {{{
    259 SUBROUTINE init_dim_local(step, domain_p, dim_l)
     253=== `U_init_dim_l` (init_dim_l_pdaf.F90) ===
     254
     255This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     256
     257The interface for this routine is:
     258{{{
     259SUBROUTINE init_dim_l(step, domain_p, dim_l)
    260260
    261261  INTEGER, INTENT(in)  :: step        ! Current time step
     
    271271
    272272
    273 === `U_init_dim_obs_local` (init_dim_obs_local.F90) ===
    274 
    275 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
    276 
    277 The interface for this routine is:
    278 {{{
    279 SUBROUTINE init_dim_obs_local(domain_p, step, dim_obs_f, dim_obs_l)
     273=== `U_init_dim_obs_l` (init_dim_obs_l_pdaf.F90) ===
     274
     275This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     276
     277The interface for this routine is:
     278{{{
     279SUBROUTINE init_dim_obs_l(domain_p, step, dim_obs_f, dim_obs_l)
    280280
    281281  INTEGER, INTENT(in)  :: domain_p   ! Current local analysis domain
     
    290290Some hints:
    291291 * Usually, the observations to be considered for a local analysis are those which reside within some distance from the local analysis domain. Thus, if the local analysis domain is a single vertical column of the model grid and if the model grid is a regular ij-grid, then one could use some range of i/j indices to select the observations and determine the local number of them. More generally, one can compute the physical distance of an observation from the local analysis domain and decide on this basis, if the observation has to be considered.
    292  * In the loop over the local analysis domains, the routine is always called before `U_init_obs_local` is executed. Thus, as `U_init_dim_obs_local` has to check which observations should be used for the local analysis domain, one can already initialize an integer array that stores the index of observations to be considered. This index should be the position of the observation in the array `observation_f`. With this, the initialization of the local observation vector in `U_init_obs_local` can be sped up.
    293  * For PDAF, we could not join the routines `U_init_dim_obs_local` and `U_init_obs_local`, because the array for the local observations is allocated internally to PDAF after its size has been determined in `U_init_dim_obs_local`.
    294 
    295 
    296 === `U_global2local_state` (global2local_state.F90) ===
    297 
    298 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
    299 
    300 The interface for this routine is:
    301 {{{
    302 SUBROUTINE global2local_state(step, domain_p, dim_p, state_p, dim_l, state_l)
     292 * In the loop over the local analysis domains, the routine is always called before `U_init_obs_l` is executed. Thus, as `U_init_dim_obs_l` has to check which observations should be used for the local analysis domain, one can already initialize an integer array that stores the index of observations to be considered. This index should be the position of the observation in the array `observation_f`. With this, the initialization of the local observation vector in `U_init_obs_l` can be sped up.
     293 * For PDAF, we could not join the routines `U_init_dim_obs_l` and `U_init_obs_l`, because the array for the local observations is allocated internally to PDAF after its size has been determined in `U_init_dim_obs_l`.
     294
     295
     296=== `U_g2l_state` (g2l_state_pdaf.F90) ===
     297
     298This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     299
     300The interface for this routine is:
     301{{{
     302SUBROUTINE g2l_state(step, domain_p, dim_p, state_p, dim_l, state_l)
    303303
    304304  INTEGER, INTENT(in) :: step           ! Current time step
     
    316316
    317317
    318 === `U_local2global_state` (local2global_state.F90) ===
    319 
    320 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
    321 
    322 The interface for this routine is:
    323 {{{
    324 SUBROUTINE local2global_state(step, domain_p, dim_l, state_l, dim_p, state_p)
     318=== `U_l2g_state` (l2g_state_pdaf.F90) ===
     319
     320This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     321
     322The interface for this routine is:
     323{{{
     324SUBROUTINE l2g_state(step, domain_p, dim_l, state_l, dim_p, state_p)
    325325
    326326  INTEGER, INTENT(in) :: step           ! Current time step
     
    338338
    339339
    340 === `U_global2local_obs` (global2local_obs.F90) ===
    341 
    342 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
    343 
    344 The interface for this routine is:
    345 {{{
    346 SUBROUTINE global2local_obs(domain_p, step, dim_obs_f, dim_obs_l, mstate_f, mstate_l)
     340=== `U_g2l_obs` (g2l_obs_pdaf.F90) ===
     341
     342This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     343
     344The interface for this routine is:
     345{{{
     346SUBROUTINE g2l_obs(domain_p, step, dim_obs_f, dim_obs_l, mstate_f, mstate_l)
    347347
    348348  INTEGER, INTENT(in) :: domain_p              ! Current local analysis domain
     
    357357
    358358Hints:
    359  * The  vector `mstate_f` that is provided to the routine is one of the observed state vectors that are produced by `U_obs_op_full`.
    360  * Some operations performed here are analogous to those required to initialize a local vector of observations in `U_init_obs_l`. If that routine reads first a full vector of observations (e.g. in `U_init_dim_obs_full`), this vector has to be restricted to the relevant observations for the current local analysis domain. For this operation, one can for example initialize an index array when `U_init_dim_obs_local` is executed. (Which happens before `U_global2local_obs`)
    361 
    362 
    363 === `U_init_obsvar` (init_obsvar.F90) ===
     359 * The  vector `mstate_f` that is provided to the routine is one of the observed state vectors that are produced by `U_obs_op_f`.
     360 * Some operations performed here are analogous to those required to initialize a local vector of observations in `U_init_obs_l`. If that routine reads first a full vector of observations (e.g. in `U_init_dim_obs_f`), this vector has to be restricted to the relevant observations for the current local analysis domain. For this operation, one can for example initialize an index array when `U_init_dim_obs_l` is executed. (Which happens before `U_g2l_obs`)
     361
     362
     363=== `U_init_obsvar` (init_obsvar_pdaf.F90) ===
    364364
    365365This routine is used by the global filter algorithms SEIK and  ETKF as well as the local filters LSEIK and LETKF. The routine is only called if the adaptive forgetting factor is used (`type_forget=1` in the example implementation). The difference in this routine between global and local filters is that the global filters use 'global' while the local filters use 'full' quantities.
     
    385385
    386386
    387 === `U_init_obsvar_local` (init_obsvar_local.F90) ===
     387=== `U_init_obsvar_l` (init_obsvar_l_pdaf.F90) ===
    388388
    389389This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. The routine is only called if the local adaptive forgetting factor is used (`type_forget=2` in the example implementation).
     
    391391The interface for this routine is:
    392392{{{
    393 SUBROUTINE init_obsvar_local(domain_p, step, dim_obs_l, obs_l, meanvar_l)
     393SUBROUTINE init_obsvar_l(domain_p, step, dim_obs_l, obs_l, meanvar_l)
    394394
    395395  INTEGER, INTENT(in) :: domain_p         ! Current local analysis domain
     
    400400}}}
    401401
    402 The routine is called in the local filters during the loop over all local analysis domains by the routine that computes a local adaptive forgetting factor (`PDAF_set_forget_local`). The routine has to initialize a local mean observation error variance for all observations used for the analysis in the current local analysis domain.
     402The routine is called in the local filters during the loop over all local analysis domains by the routine that computes a local adaptive forgetting factor (`PDAF_set_forget_l`). The routine has to initialize a local mean observation error variance for all observations used for the analysis in the current local analysis domain.
    403403
    404404Hints:
     
    410410
    411411Before the analysis step is called the following is executed:
    412  1. [#U_collect_statecollect_state.F90 U_collect_state] (called once for each ensemble member)
     412 1. [#U_collect_statecollect_state_pdaf.F90 U_collect_state] (called once for each ensemble member)
    413413
    414414When the ensemble integration of the forecast is completed, the analysis step is executed. Before the loop over all local analysis domains, the following routines are executed:
    415  1. [#U_prepoststepprepoststep_seik.F90 U_prepoststep] (Call to act on the forecast ensemble, called with negative value of the time step)
    416  1. [#U_init_n_domainsinit_n_domains.F90 U_init_n_domains]
    417  1. [#U_init_dim_obs_fullinit_dim_obs_full.F90 U_init_dim_obs_full]
    418  1. [#U_obs_op_fullobs_op_full.F90 U_obs_op_full] (Called `dim_ens` times; once for each ensemble member)
    419  1. [#U_init_obs_fullinit_obs_full.F90 U_init_obs_full] (Only executed, if the global adaptive forgetting factor is used (`type_forget=1` in the example implemention))
    420  1. [#U_init_obsvarinit_obsvar.F90 U_init_obsvar] (Only executed, if the global adaptive forgetting factor is used (`type_forget=1` in the example implemention))
     415 1. [#U_prepoststepprepoststep_seik_pdaf.F90 U_prepoststep] (Call to act on the forecast ensemble, called with negative value of the time step)
     416 1. [#U_init_n_domainsinit_n_domains_pdaf.F90 U_init_n_domains]
     417 1. [#U_init_dim_obs_finit_dim_obs_f_pdaf.F90 U_init_dim_obs_f]
     418 1. [#U_obs_op_fobs_op_f_pdaf.F90 U_obs_op_f] (Called `dim_ens` times; once for each ensemble member)
     419 1. [#U_init_obs_finit_obs_f_pdaf.F90 U_init_obs_f] (Only executed, if the global adaptive forgetting factor is used (`type_forget=1` in the example implemention))
     420 1. [#U_init_obsvarinit_obsvar_pdaf.F90 U_init_obsvar] (Only executed, if the global adaptive forgetting factor is used (`type_forget=1` in the example implemention))
    421421
    422422In the loop over all local analysis domains, it is executed for each local analysis domain:
    423  1. [#U_init_dim_localinit_dim_local.F90 U_init_dim_local]
    424  1. [#U_init_dim_obs_localinit_dim_obs_local.F90 U_init_dim_obs_local]
    425  1. [#U_global2local_stateglobal2local_state.F90 U_global2local_state] (Called `dim_ens+1` times: Once for each ensemble member and once for the mean state estimate)
    426  1. [#U_global2local_obsglobal2local_obs.F90 U_global2local_obs] (A single call to localize the mean observed state)
    427  1. [#U_init_obs_localinit_obs_local.F90 U_init_obs_local]
    428  1. [#U_global2local_obsglobal2local_obs.F90 U_global2local_obs] (`dim_ens` calls: one call to localize the observed part of each ensemble member)
    429  1. [#U_init_obsvar_localinit_obsvar_local.F90 U_init_obsvar_local] (Only called, if the local adaptive forgetting factor is used (`type_forget=2` in the example implementation))
    430  1. [#U_prodRinvA_localprodrinva_local.F90 U_prodRinvA_local]
    431  1. [#U_local2global_statelocal2global_state.F90 U_local2global_state] (Called `dim_ens+1` times: Once for each ensemble member and once for the mean state estimate)
     423 1. [#U_init_dim_linit_dim_l_pdaf.F90 U_init_dim_l]
     424 1. [#U_init_dim_obs_linit_dim_obs_l_pdaf.F90 U_init_dim_obs_l]
     425 1. [#U_g2l_stateg2l_state_pdaf.F90 U_g2l_state] (Called `dim_ens+1` times: Once for each ensemble member and once for the mean state estimate)
     426 1. [#U_g2l_obsg2l_obs_pdaf.F90 U_g2l_obs] (A single call to localize the mean observed state)
     427 1. [#U_init_obs_linit_obs_l_pdaf.F90 U_init_obs_l]
     428 1. [#U_g2l_obsg2l_obs_pdaf.F90 U_g2l_obs] (`dim_ens` calls: one call to localize the observed part of each ensemble member)
     429 1. [#U_init_obsvar_linit_obsvar_l_pdaf.F90 U_init_obsvar_l] (Only called, if the local adaptive forgetting factor is used (`type_forget=2` in the example implementation))
     430 1. [#U_prodRinvA_lprodrinva_l_pdaf.F90 U_prodRinvA_l]
     431 1. [#U_l2g_statel2g_state_pdaf.F90 U_l2g_state] (Called `dim_ens+1` times: Once for each ensemble member and once for the mean state estimate)
    432432
    433433After the loop over all local analysis domains, it is executed:
    434  1. [#U_prepoststepprepoststep_seik.F90 U_prepoststep] (Call to act on the analysis ensemble, called with (positive) value of the time step)
    435 
    436 
    437 
     434 1. [#U_prepoststepprepoststep_seik_pdaf.F90 U_prepoststep] (Call to act on the analysis ensemble, called with (positive) value of the time step)
     435
     436
     437