Changes between Version 12 and Version 13 of ImplementAnalysisletkf
- Timestamp:
- May 5, 2014, 1:32:16 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ImplementAnalysisletkf
v12 v13 11 11 <li><a href="ImplementationofAnalysisStep">Implementation of the analysis step</a></li> 12 12 <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>Implementation for LETKF</li> 13 17 <li><a href="ImplementAnalysisseik">Implementation for SEIK</a></li> 14 18 <li><a href="ImplementAnalysislseik">Implementation for LSEIK</a></li> 15 <li><a href="ImplementAnalysisetkf">Implementation for ETKF</a></li>16 <li>Implementation for LETKF</li>17 19 <li><a href="ImplementAnalysisseek">Implementation for SEEK</a></li> 18 20 <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>21 21 </ol> 22 22 <li><a href="AddingMemoryandTimingInformation">Memory and timing information</a></li> … … 30 30 == Overview == 31 31 32 For the analysis step of the LETKF algorithm, 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_letkf`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_letkf`. Many of the routines are localized versions of those that are needed for the global ETKF method. Hence, if the user-supplied routines for the global ETKF method 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.32 For the analysis step of the LETKF algorithm, 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_letkf` (or `PDAF_put_state_letkf`) 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_assimilate_letkf`. Many of the routines are localized versions of those that are needed for the global ETKF method. Hence, if the user-supplied routines for the global ETKF method 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. 35 35 36 36 The 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. … … 38 38 == `PDAF_put_state_letkf` == 39 39 40 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].41 The interface for the routine `PDAF_ put_state_letkf` 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 LETKF 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.40 The 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]. 41 The interface for the routine `PDAF_assimilate_letkf` 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 LETKF 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. 42 42 43 43 To 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 LETKF algorithm 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. … … 47 47 The interface when using the LETKF algorithm is the following: 48 48 {{{ 49 SUBROUTINE PDAF_ put_state_letkf(U_collect_state, U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, &50 U_init_obs_ l, U_prepoststep, U_prodRinvA_l, U_init_n_domains, &51 U_init_ dim_l, U_init_dim_obs_l, &49 SUBROUTINE PDAF_assimilate_letkf(U_collect_state, U_distribute_state, U_init_dim_obs_f, U_obs_op_f, & 50 U_init_obs_f, U_init_obs_l, U_prepoststep, U_prodRinvA_l, & 51 U_init_n_domains, U_init_dim_l, U_init_dim_obs_l, & 52 52 U_g2l_state, U_l2g_state, U_g2l_obs, & 53 U_init_obsvar, U_init_obsvar_l, status)53 U_init_obsvar, U_init_obsvar_l, U_next_observation, status) 54 54 }}} 55 55 with the following arguments: 56 56 * [#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_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. 57 58 * [#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 58 59 * [#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 … … 69 70 * [#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) 70 71 * [#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) 71 * `status`: The integer status flag. It is zero, if `PDAF_put_state_letkf` is exited without errors. 72 * [#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`. 73 * `status`: The integer status flag. It is zero, if `PDAF_assimilate_letkf` is exited without errors. 72 74 73 75 Note: 74 76 * 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. 75 77 78 79 == `PDAF_put_state_letkf` == 80 81 When the 'flexible' implementation variant is chosen for the assimilation system, the routine `PDAF_put_state_letkf` has to be used instead of `PDAF_assimilate_letkf`. 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_letkf` with the exception the specification of the user-supplied routines `U_distribute_state` and `U_next_observation` are missing. 82 83 The interface when using the LETKF algorithm is the following: 84 {{{ 85 SUBROUTINE PDAF_put_state_letkf(U_collect_state, U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, & 86 U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_init_n_domains, & 87 U_init_dim_l, U_init_dim_obs_l, & 88 U_g2l_state, U_l2g_state, U_g2l_obs, & 89 U_init_obsvar, U_init_obsvar_l, status) 90 }}} 91 92 76 93 == User-supplied routines == 77 94 78 Here, all user-supplied routines are described that are required in the call to `PDAF_ put_state_letkf`. For some of the generic routines, we link to the page on [ModifyModelforEnsembleIntegration modifying the model code for the ensemble integration].95 Here, all user-supplied routines are described that are required in the call to `PDAF_assimilate_letkf`. For some of the generic routines, we link to the page on [ModifyModelforEnsembleIntegration modifying the model code for the ensemble integration]. 79 96 80 97 To 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. … … 85 102 86 103 This routine is independent from the filter algorithm used. 87 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. 104 See 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 108 This routine is independent of the filter algorithm used. 109 See the page on [InsertAnalysisStep#U_distribute_statedistribute_state_pdaf.F90 inserting the analysis step] for the description of this routine. 88 110 89 111 … … 407 429 * If the local adaptive forgetting factor is not used, this routine has only to exist for the compilation, but it does not need functionality. 408 430 431 432 === `U_next_observation` (next_observation_pdaf.F90) === 433 434 This routine is independent of the filter algorithm used. 435 See the page on [InsertAnalysisStep#U_next_observationnext_observation_pdaf.F90 inserting the analysis step] for the description of this routine. 436 409 437 == Execution order of user-supplied routines == 410 438 … … 436 464 1. [#U_prepoststepprepoststep_ens_pdaf.F90 U_prepoststep] (Call to act on the analysis ensemble, called with (positive) value of the time step) 437 465 438 439 466 In 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