Changes between Version 9 and Version 10 of ImplementAnalysisenkf


Ignore:
Timestamp:
May 5, 2014, 2:05:00 PM (10 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ImplementAnalysisenkf

    v9 v10  
    1111<li><a href="ImplementationofAnalysisStep">Implementation of the analysis step</a></li>
    1212<ol>
     13<li><a href="ImplementAnalysisestkf">Implementation for ESTKF</a></li>
     14<li><a href="ImplementAnalysislestkf">Implementation for LESTKF</a></li>
     15<li><a href="ImplementAnalysisetkf">Implementation for ETKF</a></li>
     16<li><a href="ImplementAnalysisletkf">Implementation for LETKF</a></li>
    1317<li><a href="ImplementAnalysisseik">Implementation for SEIK</a></li>
    1418<li><a href="ImplementAnalysislseik">Implementation for LSEIK</a></li>
    15 <li><a href="ImplementAnalysisetkf">Implementation for ETKF</a></li>
    16 <li><a href="ImplementAnalysisletkf">Implementation for LETKF</a></li>
    1719<li><a href="ImplementAnalysisseek">Implementation for SEEK</a></li>
    1820<li>Implementation for EnKF</li>
    19 <li><a href="ImplementAnalysisestkf">Implementation for ESTKF</a></li>
    20 <li><a href="ImplementAnalysislestkf">Implementation for LESTKF</a></li>
    2121</ol>
    2222<li><a href="AddingMemoryandTimingInformation">Memory and timing information</a></li>
     
    2929== Overview ==
    3030
    31 For the analysis step of the EnKF different operations related to the observations are needed. These operations are requested by PDAF by calling user-supplied routines. Intentionally, the operations are split into separate routines in order to keep the operations rather elementary. This procedure should simplify the implementation. The names of the required routines are specified in the call to the routine `PDAF_put_state_enkf`. With regard to the parallelization, all these routines are executed by the filter processes (`filterpe=.true.`) only.
     31For the analysis step of the EnKF different operations related to the observations are needed. These operations are requested by PDAF by calling user-supplied routines. Intentionally, the operations are split into separate routines in order to keep the operations rather elementary. This procedure should simplify the implementation. The names of the required routines are specified in the call to the routine `PDAF_put_state_enkf` for the fully-parallel implementation (or `PDAF_put_state_enkf` for the 'flexible' implementation). With regard to the parallelization, all these routines are executed by the filter processes (`filterpe=.true.`) only.
    3232
    3333For completeness we discuss here all user-supplied routines that are specified in the interface to PDAF_put_state_enkf. Thus, some of the user-supplied routines that are explained on the page explaining the modification of the model code for the ensemble integration are repeated here.
     
    3737There is no localized variant of the EnKF in PDAF. In our studies (Nerger et al. 2005, Neger et al. 2007), the EnKF showed performance deficiencies compared to the SEIK filter. Due to this, we focused more on the SEIK filter and the ETKF after these comparison studies. For real applications, we generally recommend using SEIK or ETKF, or their local variants LSEIK or LETKF.
    3838
    39 == `PDAF_put_state_enkf` ==
    40 
    41 The 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]. Here, we list the full interface specifically for the EnKF. Subsequently, the full set of user-supplied routines specified in the call to `PDAF_put_state_enkf` is explained.
     39== `PDAF_assimilate_enkf` ==
     40
     41The general aspects of the filter specific routines `PDAF_assimilate_*` have been described on the page [ModifyModelforEnsembleIntegration Modification of the model code for the ensemble integration] and its sub-page on [InsertAnalysisStep inserting the analysis step]. The routine is used in the fully-parallel implementation variant of the data assimilation system. When the 'flexible' implementation variant is used, the routines `PDAF_put_state_*' is used as described further below. Here, we list once more the full interface of the routine. Subsequently, the full set of user-supplied routines specified in the call to `PDAF_assimilate_enkf` is explained.
    4242
    4343The interface when using the EnKF is the following:
    4444{{{
    45   SUBROUTINE PDAF_put_state_enkf(U_collect_state, U_init_dim_obs, U_obs_op, &
    46                                  U_init_obs, U_prepoststep, U_add_obs_err, U_init_obscovar, status)
     45  SUBROUTINE PDAF_assimilate_enkf(U_collect_state, U_distribute_state, U_init_dim_obs, &
     46                                 U_obs_op, U_init_obs, U_prepoststep, U_add_obs_err, &
     47                                 U_init_obscovar, U_next_observation, status)
    4748}}}
    4849with the following arguments:
    49  * [#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 `PDAF_get_state`
     50 * [#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 `PDAF_get_state` as well as here.
     51 * [#U_distribute_statedistribute_state_pdaf.F90 U_distribute_state]:  The name of a user supplied routine that initializes the model fields from the array holding the ensemble of model state vectors.
    5052 * [#U_init_dim_obsinit_dim_obs_pdaf.F90 U_init_dim_obs]: The name of the user-supplied routine that provides the size of observation vector
    5153 * [#U_obs_opobs_op_pdaf.F90 U_obs_op]: The name of the user-supplied routine that acts as the observation operator on some state vector
     
    5456 * [#U_add_obs_erradd_obs_err_pdaf.F90 U_add_obs_err]: The name of the user-supplied routine that adds the observation error covariance matrix to the ensemble covariance matrix projected onto the observation space.
    5557 * [#U_init_obscovarinit_obscovar_pdaf.F90 U_init_obscovar]: The name of the user-supplied routine that initializes the observation error covariance matrix.
    56  * `status`: The integer status flag. It is zero, if `PDAF_put_state_enkf` is exited without errors.
     58 * [#U_next_observationnext_observation.F90 U_next_observation]: The name of a user supplied routine that initializes the variables `nsteps`, `timenow`, and `doexit`. The same routine is also used in `PDAF_get_state`.
     59 * `status`: The integer status flag. It is zero, if `PDAF_assimilate_enkf` is exited without errors.
     60
     61== `PDAF_put_state_enkf` ==
     62
     63When the 'flexible' implementation variant is chosen for the assimilation system, the routine `PDAF_put_state_enkf` has to be used instead of `PDAF_assimilate_enkf`. The general aspects of the filter specific routines `PDAF_put_state_*` have been described on the page [ModifyModelforEnsembleIntegration Modification of the model code for the ensemble integration]. The interface of the routine is identical with that of `PDAF_assimilate_enkf` with the exception the specification of the user-supplied routines `U_distribute_state` and `U_next_observation` are missing.
     64
     65The interface when using the EnKF is the following:
     66{{{
     67  SUBROUTINE PDAF_put_state_enkf(U_collect_state, U_init_dim_obs, U_obs_op, &
     68                                 U_init_obs, U_prepoststep, U_add_obs_err, U_init_obscovar, status)
     69}}}
    5770
    5871
    5972== User-supplied routines ==
    6073
    61 Here all user-supplied routines are described that are required in the call to `PDAF_put_state_enkf`. For some of the generic routines, we link to the page on [ModifyModelforEnsembleIntegration modifying the model code for the ensemble integration].
     74Here all user-supplied routines are described that are required in the call to `PDAF_assimialte_enkf`. For some of the generic routines, we link to the page on [ModifyModelforEnsembleIntegration modifying the model code for the ensemble integration].
    6275
    6376To indicate user-supplied routines we use the prefix `U_`. In the template directory `templates/` as well as in the example implementation in `testsuite/src/dummymodel_1D` these 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.
     
    6982
    7083This routine is independent of the filter algorithm used.
    71 See the page [ModifyModelforEnsembleIntegration#U_collect_statecollect_state_pdaf.F90 modifying the model code for the ensemble integration] for the description of this routine.
     84See the page on [InsertAnalysisStep#U_collect_statecollect_state_pdaf.F90 inserting the analysis step] for the description of this routine.
     85
     86
     87=== `U_distribute_state` (distribute_state_pdaf.F90) ===
     88
     89This routine is independent of the filter algorithm used.
     90See the page on [InsertAnalysisStep#U_distribute_statedistribute_state_pdaf.F90 inserting the analysis step] for the description of this routine.
    7291
    7392
     
    217236
    218237
     238=== `U_next_observation` (next_observation_pdaf.F90) ===
     239
     240This routine is independent of the filter algorithm used.
     241See the page on [InsertAnalysisStep#U_next_observationnext_observation_pdaf.F90 inserting the analysis step] for the description of this routine.
     242
     243
     244
    219245== Execution order of user-supplied routines ==
    220246
    221 For the EnKF, the user-supplied routines are essentially executed in the order they are listed in the interface to `PDAF_put_state_enkf`. The order can be important as some routines can perform preparatory work for later routines. For example, `U_init_dim_obs` can prepare an index array that provides the information for executing the observation operator in `U_obs_op`.
     247For the EnKF, the user-supplied routines are essentially executed in the order they are listed in the interface to `PDAF_assimilate_enkf`. The order can be important as some routines can perform preparatory work for later routines. For example, `U_init_dim_obs` can prepare an index array that provides the information for executing the observation operator in `U_obs_op`.
    222248
    223249Before the analysis step is called the following routine is executed:
     
    234260 1. [#U_prepoststepprepoststep_ens_pdaf.F90 U_prepoststep] (Call to act on the analysis ensemble, called with (positive) value of the time step)
    235261
     262In case of the routine `PDAF_assimilate_enkf`, the following routines are executed after the analysis step:
     263 1. [#U_distribute_statedistribute_state_pdaf.F90 U_distribute_state]
     264 1. [#U_next_observationnext_observation_pdaf.F90 U_next_observation]
     265