Changes between Initial Version and Version 1 of PDAFlocal_set_indices


Ignore:
Timestamp:
Sep 9, 2024, 2:46:09 PM (10 days ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PDAFlocal_set_indices

    v1 v1  
     1= PDAFlocal_set_indices =
     2
     3This page documents the routine `PDAFlocal_set_indices` of PDAF, which is used with the [wiki:PDAFlocal] interface. This routine was introduced with PDAF V2.3.
     4
     5This routine is called in `init_dim_l_pdaf` when the dimension of the local state vector has to be determined. In addition to this dimension, the implementation guide recommends to also initialize the coordinates of the local analysis domain and the indices of the elements ofthe local state vector in the non-localized (global or domain-decomposed) state vector `state_p`. Thise indices are then used in the mapping from the global to the local state vector before the analysis and back after the analysis update in the local analysis loop. With PDAFlocal, one uses `PDAFlocal_set_indices` to pass the vector of indices to PDAFlocal, which later performs the mapping for all ensemble states.
     6
     7The interface is:
     8{{{
     9SUBROUTINE PDAFlocal_set_indices(dim_l, map)
     10
     11  INTEGER, INTENT(in) :: dim_l          ! Dimension of local state vector
     12  INTEGER, INTENT(in) :: map(dim_l)     ! Index array for mapping
     13}}}
     14
     15Hints:
     16 * For complex cases it might feel more intuitive to perform the mapping between the global and local state vectors in an explicit loop. However, this might lead to repeated computation of the indices and can hence be less efficient than computing the indices before.
     17 * The initialization of hthe index vector `map` is analogous to a loop that directly performs the initialization of a local state vector. However, here only the indices are stored.