Changes between Version 1 and Version 2 of init_dim_l_pdaf


Ignore:
Timestamp:
Sep 25, 2024, 7:56:45 AM (7 weeks ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • init_dim_l_pdaf

    v1 v2  
    77The routine is called during the loop over the local analysis domains in the analysis step. It has to provide the dimension of the sub-state vector for the specified local analysis domain.
    88
    9 The interface is the following:
     9For PDAF it has to provide in `dim_l` the dimension of the state vector for the local analysis domain with index `domain_p`.
     10
     11In addition, for [wiki:PDAFlocal_overview 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`)
     12
     13The interface for this routine is:
    1014{{{
    11 SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l)
     15SUBROUTINE init_dim_l(step, domain_p, dim_l)
     16
     17  INTEGER, INTENT(in)  :: step        ! Current time step
     18  INTEGER, INTENT(in)  :: domain_p    ! Current local analysis domain
     19  INTEGER, INTENT(out) :: dim_l       ! Local state dimension
    1220}}}
    13 with
    14  * `step` : `integer, intent(in)`[[BR]] Current time step
    15  * `domain_p` : `integer, intent(in)`[[BR]] Index of current local analysis domain
    16  * `dim_l` :: `integer, intent(out)`[[BR]] Dimension of state vector in local analysis domain
    1721
    18 Hints:
    19  * If a local analysis domain is a single grid point, the dimension of the local state vector is the number of model fields at this grid point.
    20  * If a local analysis domain is a single vertical column of the model grid, the size of the state in the local analysis domain will be just the number of vertical grid points at this location times the number of 3-dimensional fields, plus the number of 2D fields.
     22
     23Hints:
     24 * For sharing through the module `mod_assimilation`, we further initialize an array `coords_l` containing the coordinates that describe the local domain.
     25  * These coordinates have to describe one location in space that is used in the OMI observation modules to compute the distance from observations.
     26  * The coordinates in `coords_l` have the same units as those used for the observations
     27  * 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.
     28 * Any form of local domain is possible as long as it can be describe as a single location.
     29  * If the local domain is a single grid point, `dim_l` will be the number of model variables at this grid point.
     30  * 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).
     31   * In this case, `dim_l` will be the number of vertical grid points at this location times the number of model fields that exist in the vertical, plus possible variables at e.g. the surface.
     32   * In this case only the horizontal coordinates are used in `coords_l`.
     33
     34The 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. For using PDAFlocal one has to provide `id_lstate_in_pstate` to PDAFlocal by calling `PDAFlocal_set_indices'. The interface is:
     35
     36{{{
     37SUBROUTINE PDAFlocal_set_indices(dim_l, id_lstate_in_pstate)
     38
     39  INTEGER, INTENT(in) :: dim_l                          ! Dimension of local state vector
     40  INTEGER, INTENT(in) :: id_lstate_in_pstate(dim_l)     ! Index array for mapping
     41}}}
     42
     43Hint for `id_lstate_in_pstate`:
     44 * 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.
     45 * See the [wiki:PDAFlocal_overview PDAFlocal overview page] for more information on the functionality of PDAFlocal.