Changes between Version 8 and Version 9 of ImplementAnalysisPDAF3UniversalLocal
- Timestamp:
- May 25, 2025, 11:50:12 AM (7 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ImplementAnalysisPDAF3UniversalLocal
v8 v9 189 189 190 190 In the recommended implementation shown in the tutorial and template codes, there are two further initializations: 191 1. The routine has initialize the index array `id_lstate_in_pstate` containing the indices of the elements of the local state vector in the global (or domain-decomposed) state vector. Then it has to provide this array to PDAF by calling `PDAFlocal_set_indices` (see below).191 1. The routine can initialize the index array `id_lstate_in_pstate` containing the indices of the elements of the local state vector in the global (or domain-decomposed) state vector. This is shared with `g2l_state_pdaf` and `l2g_state_pdaf` via the module `mod_assimilation`. (In the [wiki:ImplementAnalysisPDAF3Universal implementation of the analysis using PDAFlocal] one would provide this array directly to PDAF) 192 192 2. The routine initializes an array `coords_l` containing the coordinates of the local analysis domain. This is shared with `U_init_dim_obs_l_pdafomi` via the module `mod_assimilation`. 193 193 … … 196 196 * The coordinates in `coords_l` have the same units as those used for the observations 197 197 * 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. 198 * Any form of local domain is possible as long as it can be describe as a single location.198 * Any form of local domain is possible as long as it can be describe as a single location. 199 199 * If the local domain is a single grid point, `dim_l` will be the number of model variables at this grid point. 200 200 * The local analysis domain can also be a single vertical column of the model grid if observations are only horizontally distributed (a common situation with satellite data in the ocean). … … 202 202 * In this case only the horizontal coordinates are used in `coords_l`. 203 203 204 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:205 206 {{{207 SUBROUTINE PDAFlocal_set_indices(dim_l, id_lstate_in_pstate)208 209 INTEGER, INTENT(in) :: dim_l ! Dimension of local state vector210 INTEGER, INTENT(in) :: id_lstate_in_pstate(dim_l) ! Index array for mapping211 }}}212 213 204 Hint for `id_lstate_in_pstate`: 214 * The initialization of the index vector `id_lstate_to_pstate` is analogous to a loop that directly performs the initialization of a local state vector. However, here only the indices are stored. 215 * See the [wiki:PDAFlocal_overview PDAFlocal overview page] for more information on the functionality of PDAFlocal. 205 * The initialization of the index vector `id_lstate_to_pstate` is analogous to a loop that directly performs the initialization of a local state vector. However, here only the indices are stored. If this looks to complicated, one can implement the indexing directly in `g2l_state_pdaf` and `l2g_state_pdaf`. However, this is likely less efficient. 216 206 217 207 … … 240 230 Hints: 241 231 * In the simple case that a local analysis domain is a single vertical column of the model grid, the operation in this routine would be to take out of `state_p` the data for the vertical column indexed by `domain_p`. 242 * Usually, one can use the index array `id_lstate_in_pstate`, which is initialized in `init_dim_l_pdaf`. The array holds the indices of the local state vector elements in the global state vector. 232 * We recommend to use the index array `id_lstate_in_pstate`, which can be initialized in `init_dim_l_pdaf`. The array holds the indices of the local state vector elements in the global state vector. 233 * We generally recommend to [wiki:ImplementAnalysisPDAF3Universal implement the analysis step using PDAFlocal]. In this case the routine `g2l_state_pdaf` is not present and PDAF performs its operations internally. 243 234 244 235 … … 261 252 Hints: 262 253 * In the simple case that a local analysis domain is a single vertical column of the model grid, the operation in this routine would be to write into `state_p` the data for the vertical column indexed by `domain_p`. 263 * Usually, one can use the index array `id_lstate_in_pstate`, which is initialized in `init_dim_l_pdaf`. The array holds the indices of the local state vector elements in the global state vector. 254 * We recommend to use the index array `id_lstate_in_pstate`, which can be initialized in `init_dim_l_pdaf`. The array holds the indices of the local state vector elements in the global state vector. 255 * We generally recommend to [wiki:ImplementAnalysisPDAF3Universal implement the analysis step using PDAFlocal]. In this case the routine `g2l_state_pdaf` is not present and PDAF performs its operations internally. 264 256 265 257