Changes between Version 45 and Version 46 of ImplementAnalysislseik


Ignore:
Timestamp:
May 5, 2014, 1:49:10 PM (11 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ImplementAnalysislseik

    v45 v46  
    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>Implementation for LSEIK</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><a href="ImplementAnalysisenkf">Implementation for EnKF</a></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>
     
    3030== Overview ==
    3131
    32 For the analysis step of the LSEIK filter, several 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 as this procedure should simplify the implementation. The names of the required routines are specified in the call to the routine `PDAF_put_state_lseik` described below. With regard to the parallelization, all these routines (except `U_collect_state`) are executed by the filter processes (`filterpe=.true.`) only.
    33 
    34 For completeness we discuss here all user-supplied routines that are specified in the interface to `PDAF_put_state_lseik`. Many of the routines are localized versions of those that are needed for the global SEIK filter. Hence, if the user-supplied routines for the global SEIK filter have been already implemented, one can base on these routines to speed up the implementation. Due to this, it can also be reasonable to first fully implement a global filter version and subsequently implement the corresponding localized filter by modifying and extending the global routines.
     32For the analysis step of the LSEIK filter, several 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 as this procedure should simplify the implementation. The names of the required routines are specified in the call to the routine `PDAF_assimilate_lseik` (or `PDAF_put_state_lseik`) described below. With regard to the parallelization, all these routines (except `U_collect_state`, `U_distribute_state`, and zU_next_observation`) are executed by the filter processes (`filterpe=.true.`) only.
     33
     34For completeness we discuss here all user-supplied routines that are specified in the interface to `PDAF_assimilate_lseik`. Many of the routines are localized versions of those that are needed for the global SEIK filter. Hence, if the user-supplied routines for the global SEIK filter have been already implemented, one can base on these routines to speed up the implementation. Due to this, it can also be reasonable to first fully implement a global filter version and subsequently implement the corresponding localized filter by modifying and extending the global routines.
    3535
    3636The LSEIK filter and the LETKF (Local Ensemble Transform Kalman Filter) are very similar. For this reason, the interface to the user-supplied routines is almost identical. Depending on the implementation it can be possible to use identical routines for the LSEIK filter and the LETKF. Differences are marked in the text below.
    3737
    3838
    39 == `PDAF_put_state_lseik` ==
    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].
    42 The 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.
     39== `PDAF_assimilate_lseik` ==
     40
     41The general espects of the filter-specific routines `PDAF_assimilate_*` have been described on the page [ModifyModelforEnsembleIntegration Modification of the model code for the ensemble integration].
     42The interface for the routine `PDAF_assimilate_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.
    4343
    4444To 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.
     
    4848The interface when using the LSEIK filter is the following:
    4949{{{
    50   SUBROUTINE PDAF_put_state_lseik(U_collect_state, U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, &
    51                                   U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_init_n_domains, &
    52                                   U_init_dim_l, U_init_dim_obs_l, &
     50  SUBROUTINE PDAF_assimilate_lseik(U_collect_state, U_distribute_state, U_init_dim_obs_f, U_obs_op_f, &
     51                                  U_init_obs_f, U_init_obs_l, U_prepoststep, U_prodRinvA_l, &
     52                                  U_init_n_domains, U_init_dim_l, U_init_dim_obs_l, &
    5353                                  U_g2l_state, U_l2g_state, U_g2l_obs, &
    54                                   U_init_obsvar, U_init_obsvar_l, status)
     54                                  U_init_obsvar, U_init_obsvar_l, U_next_observation, status)
    5555}}}
    5656with the following arguments:
    57  * [#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]
     57 * [#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] and also here.
     58 * [#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.
    5859 * [#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
    5960 * [#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
     
    7071 * [#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)
    7172 * [#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)
    72  * `status`: The integer status flag. It is zero, if `PDAF_put_state_lseik` is exited without errors.
     73 * [#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`.
     74 * `status`: The integer status flag. It is zero, if `PDAF_assimilate_lseik` is exited without errors.
    7375
    7476Note:
    7577 * The order of the routine names does not show the order in which these routines are executed. See the [#Executionorderofuser-suppliedroutines section on the order of the execution] at the bottom of this page.
    7678
     79
     80== `PDAF_put_state_lseik` ==
     81
     82When the 'flexible' implementation variant is chosen for the assimilation system, the routine `PDAF_put_state_lseik` has to be used instead of `PDAF_assimilate_lseik`. 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_lseik` with the exception the specification of the user-supplied routines `U_distribute_state` and `U_next_observation` are missing.
     83
     84The interface when using the LSEIK filter is the following:
     85{{{
     86  SUBROUTINE PDAF_put_state_lseik(U_collect_state, U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, &
     87                                  U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_init_n_domains, &
     88                                  U_init_dim_l, U_init_dim_obs_l, &
     89                                  U_g2l_state, U_l2g_state, U_g2l_obs, &
     90                                  U_init_obsvar, U_init_obsvar_l, status)
     91}}}
     92
    7793== User-supplied routines ==
    7894
    79 Here, 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].
     95Here, all user-supplied routines are described that are required in the call to `PDAF_assimilate_lseik`. For some of the generic routines, we link to the page on [ModifyModelforEnsembleIntegration modifying the model code for the ensemble integration].
    8096
    8197To 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.
     
    86102
    87103This routine is independent from the filter algorithm used.
    88 See the mape on [ModifyModelforEnsembleIntegration#U_collect_statecollect_state_pdaf.F90 modifying the model code for the ensemble integration] for the description of this routine.
     104See the mape on [InsertAnalysisStep#U_collect_statecollect_state_pdaf.F90 inserting the analysis step] for the description of this routine.
     105
     106=== `U_distribute_state` (distribute_state_pdaf.F90) ===
     107
     108This routine is independent of the filter algorithm used.
     109See the page on [InsertAnalysisStep#U_distribute_statedistribute_state_pdaf.F90 inserting the analysis step] for the description of this routine.
    89110
    90111
     
    407428 * If the local adaptive forgetting factor is not used, this routine has only to exist for the compilation, but it does not need functionality.
    408429
     430
     431=== `U_next_observation` (next_observation_pdaf.F90) ===
     432
     433This routine is independent of the filter algorithm used.
     434See the page on [InsertAnalysisStep#U_next_observationnext_observation_pdaf.F90 inserting the analysis step] for the description of this routine.
     435
     436
    409437== Execution order of user-supplied routines ==
    410438
     
    436464 1. [#U_prepoststepprepoststep_ens_pdaf.F90 U_prepoststep] (Call to act on the analysis ensemble, called with (positive) value of the time step)
    437465
    438 
    439 
     466In case of the routine `PDAF_assimilate_lestkf`, the following routines are executed after the analysis step:
     467 1. [#U_distribute_statedistribute_state_pdaf.F90 U_distribute_state]
     468 1. [#U_next_observationnext_observation_pdaf.F90 U_next_observation]
     469
     470
     471