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 | |
| 23 | Hints: |
| 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 | |
| 34 | 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. For using PDAFlocal one has to provide `id_lstate_in_pstate` to PDAFlocal by calling `PDAFlocal_set_indices'. The interface is: |
| 35 | |
| 36 | {{{ |
| 37 | SUBROUTINE 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 | |
| 43 | Hint 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. |