Changes between Version 4 and Version 5 of ImplementAnalysisGlobal
- Timestamp:
- Nov 16, 2020, 2:32:34 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ImplementAnalysisGlobal
v4 v5 29 29 With Version 1.16 of PDAF we introduced PDAF-OMI (observation module infrastructure). With OMI we provide generic routines for the analysis step, which only distinguish global and local filters. This page describes the implementation of the analysis step for global filters. 30 30 31 For the analysis step of the global filters different operations related to the observations are needed. These operations are requested by PDAF by call-back routines supplied by the user and provided in the OMI structure. The names of the routines that are provided by the user are specified in the call to the routine `PDAF_assimilate_global ` in the fully-parallel implementation (or `PDAF_put_state_global` for the 'flexible' implementation) that was discussed before. With regard to the parallelization, all these routines are executed by the filter processes (`filterpe=.true.`) only.31 For the analysis step of the global filters different operations related to the observations are needed. These operations are requested by PDAF by call-back routines supplied by the user and provided in the OMI structure. The names of the routines that are provided by the user are specified in the call to the routine `PDAF_assimilate_global_omi` in the fully-parallel implementation (or `PDAF_put_state_global_omi` for the 'flexible' implementation) that was discussed before. With regard to the parallelization, all these routines are executed by the filter processes (`filterpe=.true.`) only. 32 32 33 For completeness we discuss here all user-supplied routines that are specified in the interface to PDAF_assimilate_global . Thus, some of the user-supplied routines that are explained on the page describing the modification of the model code for the ensemble integration are repeated here.33 For completeness we discuss here all user-supplied routines that are specified in the interface to PDAF_assimilate_global_omi. Thus, some of the user-supplied routines that are explained on the page describing the modification of the model code for the ensemble integration are repeated here. 34 34 35 35 36 == `PDAF_assimilate_global ` ==36 == `PDAF_assimilate_global_omi` == 37 37 38 The 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 the full interface of the routine. Subsequently, the full set of user-supplied routines specified in the call to `PDAF_assimilate_global`is explained.38 The 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 the full interface of the routine. Subsequently, the user-supplied routines specified in the call is explained. 39 39 40 40 The interface when using one of the global filters is the following: 41 41 {{{ 42 SUBROUTINE PDAF_assimilate_global(U_collect_state, U_distribute_state, U_init_dim_obs, & 43 U_obs_op, U_init_obs, U_prepoststep, U_next_observation, status) 42 SUBROUTINE PDAF_assimilate_global_omi(U_collect_state, U_distribute_state, & 43 U_init_dim_obs, U_obs_op, U_init_obs, & 44 U_prepoststep, U_next_observation, status) 44 45 }}} 45 46 with the following arguments: … … 50 51 * [#U_prepoststepprepoststep_ens_pdaf.F90 U_prepoststep]: The name of the pre/poststep routine as in `PDAF_get_state` 51 52 * [#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`. 52 * `status`: The integer status flag. It is zero, if `PDAF_assimilate_ estkf` is exited without errors.53 * `status`: The integer status flag. It is zero, if `PDAF_assimilate_global_omi` is exited without errors. 53 54 54 55 55 == `PDAF_put_state_global ` ==56 == `PDAF_put_state_global_omi` == 56 57 57 When the 'flexible' implementation variant is chosen for the assimilation system, the routine `PDAF_put_state_global ` has to be used instead of `PDAF_assimilate_global`. 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_global` with the exception the specification of the user-supplied routines `U_distribute_state` and `U_next_observation` are missing.58 When the 'flexible' implementation variant is chosen for the assimilation system, the routine `PDAF_put_state_global_omi` has to be used instead of `PDAF_assimilate_global_omi`. 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_global` with the exception the specification of the user-supplied routines `U_distribute_state` and `U_next_observation` are missing. 58 59 59 60 The interface when using one of the global filters is the following: 60 61 {{{ 61 SUBROUTINE PDAF_put_state_global(U_collect_state, U_init_dim_obs, & 62 U_obs_op, U_init_obs, U_prepoststep, status) 62 SUBROUTINE PDAF_put_state_global_omi(U_collect_state, & 63 U_init_dim_obs, U_obs_op, U_init_obs, & 64 U_prepoststep, status) 63 65 }}} 64 66 65 67 == User-supplied routines == 66 68 67 Here all user-supplied routines are described that are required in the call to `PDAF_assimilate_global `. For some of the generic routines, we link to the page on [ModifyModelforEnsembleIntegration modifying the model code for the ensemble integration].69 Here all user-supplied routines are described that are required in the call to `PDAF_assimilate_global_omi`. For some of the generic routines, we link to the page on [ModifyModelforEnsembleIntegration modifying the model code for the ensemble integration]. 68 70 69 71 To indicate user-supplied routines we use the prefix `U_`. In the template directory `templates/` as well as in the tutorial implementations in `tutorial/` 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. … … 96 98 The routine is called at the beginning of each analysis step. For PDAF, it has to initialize the size `dim_obs_p` of the observation vector according to the current time step. Without parallelization `dim_obs_p` will be the size for the full model domain. When a domain-decomposed model is used, `dim_obs_p` will be the size of the observation vector for the sub-domain of the calling process. 97 99 98 With PDAF _OMI, the routine just calls a routine from the observation module for each observation type.100 With PDAF-OMI, the routine just calls a routine from the observation module for each observation type. 99 101 100 102 … … 116 118 For a model using domain decomposition, the operation is on the PE-local sub-domain of the model and has to provide the observed sub-state for the PE-local domain. 117 119 118 With PDAF _OMI, the routine just calls a routine from the observation module for each observation type.120 With PDAF-OMI, the routine just calls a routine from the observation module for each observation type. 119 121 120 122 … … 163 165 == Execution order of user-supplied routines == 164 166 165 The user-supplied routines are essentially executed in the order they are listed in the interface to `PDAF_assimilate_global `. The order can be important as some routines can perform preparatory work for later routines. For example, `U_init_dim_obs` prepares an index array that provides the information for executing the observation operator in `U_obs_op`. How this information is initialized is described in the documentation of OMI.167 The user-supplied routines are essentially executed in the order they are listed in the interface to `PDAF_assimilate_global_omi`. The order can be important as some routines can perform preparatory work for later routines. For example, `U_init_dim_obs` prepares an index array that provides the information for executing the observation operator in `U_obs_op`. How this information is initialized is described in the documentation of OMI. 166 168 167 169 Before the analysis step is called the following routine is executed: … … 175 177 1. [#U_prepoststepprepoststep_ens_pdaf.F90 U_prepoststep] (Call to act on the analysis ensemble, called with (positive) value of the time step) 176 178 177 In case of the routine `PDAF_assimilate_global `, the following routines are executed after the analysis step:179 In case of the routine `PDAF_assimilate_global_omi`, the following routines are executed after the analysis step: 178 180 1. [#U_distribute_statedistribute_state_pdaf.F90 U_distribute_state] 179 181 1. [#U_next_observationnext_observation_pdaf.F90 U_next_observation]