Changes between Version 1 and Version 2 of ImplementAnalysisUniversal
- Timestamp:
- May 19, 2025, 6:22:21 PM (13 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ImplementAnalysisUniversal
v1 v2 119 119 == User-supplied routines == 120 120 121 Here, all user-supplied routines are described that are required in the call to `PDAF localomi_assimilate` or `PDAFlocalomi_put_state`. For some of the generic routines, we link to the page on [ModifyModelforEnsembleIntegration modifying the model code for the ensemble integration].121 Here, all user-supplied routines are described that are required in the call to `PDAF3_assimilate`, `PDAF3_assim_offline` or `PDAF3_put_state`. For some of the generic routines, we link to the page on [ModifyModelforEnsembleIntegration modifying the model code for the ensemble integration]. 122 122 123 123 To indicate user-supplied routines we use the prefix `U_`. In the tutorials in `tutorial/` and in the template directory `templates/` these routines exist without the prefix, but with the extension `_pdaf`. The files are named correspondingly. The user-routines relating to OMI are collected in the file callback_obs_pdafomi.F90. In the section titles below we provide the name of the template file in parentheses. … … 142 142 === `U_init_dim_obs_pdafomi` (callback_obs_pdafomi.F90) === 143 143 144 This is a call-back routine for PDAF-OMIinitializing the observation information. The routine just calls a routine from the observation module for each observation type.144 This is a call-back routine initializing the observation information. The routine just calls a routine from the observation module for each observation type. 145 145 146 146 See the [wiki:OMI_Callback_obs_pdafomi documentation on callback_obs_pdafomi.F90] for more information. … … 150 150 === `U_obs_op_pdafomi` (callback_obs_pdafomi.F90) === 151 151 152 This is a call-back routine for PDAF-OMIapplying the observation operator to the state vector. The routine calls a routine from the observation module for each observation type.152 This is a call-back routine applying the observation operator to the state vector. The routine calls a routine from the observation module for each observation type. 153 153 154 154 See the [wiki:OMI_Callback_obs_pdafomi documentation on callback_obs_pdafomi.F90] for more information. … … 177 177 178 178 Hints: 179 * As a simple case, if the localization is only performed horizontally, the local analysis domains can be single vertical columns of the model grid. In this case, `n_domains_p` is simply the number of vertical columns in the local model sub-domain.179 * As a simple case, if the localization is only performed horizontally, the local analysis domains can be single vertical columns of the model grid. In this case, `n_domains_p` is simply the number of vertical columns in the process-local model sub-domain. 180 180 181 181 … … 194 194 For PDAF it has to provide in `dim_l` the dimension of the state vector for the local analysis domain with index `domain_p`. 195 195 196 In addition, for PDAFlocal the routine has to provide the index array containing the indices of the elements of the local state vector in the global (or domain-decomposed) state vector to PDAFlocal by calling `PDAFlocal_set_indices`. (in the template files, this array is called `id_lstate_in_pstate`) 196 In addition, the routine has to provide the index array containing the indices of the elements of the local state vector in the global (or domain-decomposed) state vector to PDAF by calling `PDAFlocal_set_indices`. (in the template files, this array is called `id_lstate_in_pstate`) 197 198 Finally, in the tutorial and template codes, the routine initializes an array `coords_l` containing the coordinates that describe the local domain. This is shared with `U_init_dim_obs_l_pdafomi` via the module `mod_assimilation`. 197 199 198 200 Hints: 199 * For sharing through the module `mod_assimilation`, we further initialize an array `coords_l` containing the coordinates that describe the local domain. 200 * These coordinates have to describe one location in space that is used in the OMI observation modules to compute the distance from observations. 201 * The coordinates in `coords_l` have to describe one location in space that is used for localization to compute the distance from observations. 201 202 * The coordinates in `coords_l` have the same units as those used for the observations 202 203 * For geographic distance computations, the unit of the coordinates needs to be radian, thus (0, 2*pi) or (-pi,pi) for longitude and (-pi/2, pi/2) for latitude. … … 207 208 * In this case only the horizontal coordinates are used in `coords_l`. 208 209 209 The index array `id_lstate_in_pstate` is an integer array in form of a one-dimensional vector. One initializes this vector by determining the indices of the elements of the local state vector in the global, or domain decomposed, state vector. After initializing `id_lstate_in_pstate`, one has to provided it to PDAF localby calling `PDAFlocal_set_indices'. The interface interface is:210 The index array `id_lstate_in_pstate` is an integer array in form of a one-dimensional vector. One initializes this vector by determining the indices of the elements of the local state vector in the global, or domain decomposed, state vector. After initializing `id_lstate_in_pstate`, one has to provided it to PDAF by calling `PDAFlocal_set_indices'. The interface interface is: 210 211 211 212 {{{ … … 237 238 == Execution order of user-supplied routines == 238 239 239 The user-supplied routines are executed in the order listed below. The order can be important as some routines can perform preparatory work for routines executed later on during the analysis. For example, `U_init_dim_l` can prepare an index array that provides the information how to localize a global state vector. Some hints one the efficient implementation strategy are given with the descriptions of the routine interfaces above.240 The user-supplied routines are executed in the order listed below. The order can be important as some routines can perform preparatory work for routines executed later on during the analysis. For example, in `U_init_dim_l` we can prepare the index array that provides the information how to localize a global state vector. 240 241 241 242 Before the analysis step is called the following is executed: 242 243 1. [#U_collect_statecollect_state_pdaf.F90 U_collect_state] (called once for each ensemble member) 243 244 When 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:245 244 1. [#U_prepoststepprepoststep_ens_pdaf.F90 U_prepoststep] (Call to act on the forecast ensemble, called with negative value of the time step) 246 1. [#U_init_n_domainsinit_n_domains_pdaf.F90 U_init_n_domains] 245 246 At the analysis time, the observations are initialized by the routines: 247 247 1. [#U_init_dim_obs_pdafomicallback_obs_pdafomi.F90 U_init_dim_obs_pdafomi] 248 248 1. [#U_obs_op_pdadfomicallback_obs_pdafomi.F90 U_obs_op_pdafomi] (Called `dim_ens` times; once for each ensemble member) 249 250 Now the analysis step is entered and the number of local analysis domain is initialized by calling: 251 1. [#U_init_n_domainsinit_n_domains_pdaf.F90 U_init_n_domains] 249 252 250 253 In the loop over all local analysis domains, it is executed for each local analysis domain: … … 255 258 1. [#U_prepoststepprepoststep_ens_pdaf.F90 U_prepoststep] (Call to act on the analysis ensemble, called with (positive) value of the time step) 256 259 257 In case of the routine `PDAF omi_assimilate_local`, the following routines are executed after the analysis step:260 In case of the routine `PDAF3_assimilate`, the following routines are executed after the analysis step: 258 261 1. [#U_distribute_statedistribute_state_pdaf.F90 U_distribute_state] 259 262 1. [#U_next_observationnext_observation_pdaf.F90 U_next_observation]