| 1 | = PDAFlocal_set_increment_weights = |
| 2 | |
| 3 | This page documents the routine `PDAFlocal_set_increment_weights` of PDAF, which is used with the [wiki:PDAFlocal] interface. This routine was introduced with PDAF V2.3. |
| 4 | |
| 5 | This routine provides the optional functionality to prescribe the assimilation increment of each element of the local state vector a different weight. This can be used, e.g. to implement a vertical localization in the case that the local state vector is a full vertical column of the model grid. In this case, one can make the increment weight depending on the height (or depth) of a grid point. Another application is to implement weakly-coupled assimilation in which the local state vector contains all variables, but only a subset of them is updated. This is achieved by givening those element that should not be updated the weight 0. |
| 6 | |
| 7 | The routine can be 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`. In addition one can initialize a vector of increment weights and provide it to PDAFlocal by calling this routine. |
| 8 | |
| 9 | The interface is: |
| 10 | {{{ |
| 11 | SUBROUTINE PDAFlocal_set_increment_weights(dim_l, weights) |
| 12 | |
| 13 | INTEGER, INTENT(in) :: dim_l ! Dimension of local state vector |
| 14 | REAL, INTENT(in) :: weights(dim_l) ! Weights array |
| 15 | }}} |
| 16 | |
| 17 | Hints: |
| 18 | * The loop to initialize `weights` can be analogous to the loop that initialize the index array for mapping between the global and local state vector (see [wiki:PDAFlocal_set_indices]. |
| 19 | * It is possible to clear the weights array by calling [wiki:PDAFlocal_clear_increment_weights]. Afterwards, unit weights are used. |