157 | | |
158 | | |
159 | | === `U_prodRinvA` (prodrinva.F90) === |
160 | | |
161 | | This routine is used by all filters whose algorithm uses the inverse of the observation error covariance matrix (SEEK, SEIK, and ETKF). |
162 | | |
163 | | The interface for this routine is: |
164 | | {{{ |
165 | | SUBROUTINE prodRinvA(step, dim_obs_p, rank, obs_p, A_p, C_p) |
166 | | |
167 | | INTEGER, INTENT(in) :: step ! Current time step |
168 | | INTEGER, INTENT(in) :: dim_obs_p ! PE-local dimension of obs. vector |
169 | | INTEGER, INTENT(in) :: rank ! Rank of initial covariance matrix |
170 | | REAL, INTENT(in) :: obs_p(dim_obs_p) ! PE-local vector of observations |
171 | | REAL, INTENT(in) :: A_p(dim_obs_p,rank) ! Input matrix from analysis routine |
172 | | REAL, INTENT(out) :: C_p(dim_obs_p,rank) ! Output matrix |
173 | | }}} |
174 | | |
175 | | The routine is called during the analysis step. In the algorithms the product of the inverse of the observation error covariance matrix with some matrix has to be computed. For the SEIK filter this matrix holds the observed part of the ensemble perturbations. The matrix is provided as `A_p`. The product has to be given as `C_p`. |
176 | | |
177 | | For a model with domain decomposition, `A_p` contains the part of the matrix that resides on the model sub-domain of the calling process. The product has to be computed for this sub-domain, too. |
178 | | |
179 | | Hints: |
180 | | * the routine does not require that the product is implemented as a real matrix-matrix product. Rather, the product can be implemented in its most efficient form. For example, if the observation error covariance matrix is diagonal, only the multiplication of the diagonal with matrix `A_p` has to be implemented. |
181 | | * The observation vector `obs_p` is provided through the interface for cases where the observation error variance is relative to the actual value of the observations. |
| 158 | === `U_prepoststep` (prepoststep_seik.F90) === |
| 159 | |
| 160 | This routine can be identical to that used for the global SEIK filter. |
| 161 | See [ModifyModelforEnsembleIntegration#U_prepoststepprepoststep_seik.F90 here] for the description of this routine. |
| 162 | |
| 163 | |
| 164 | |
| 165 | === `U_prodRinvA_local` (prodrinva_local.F90) === |
| 166 | |
| 167 | This routine is used by the local filters (LSEIK and LETKF). |
| 168 | |
| 169 | The interface for this routine is: |
| 170 | {{{ |
| 171 | SUBROUTINE prodRinvA_local(domain_p, step, dim_obs_p, rank, obs_p, A_p, C_p) |
| 172 | SUBROUTINE prodRinvA_local(domain_p, step, dim_obs_l, rank, obs_l, A_l, C_l) |
| 173 | |
| 174 | INTEGER, INTENT(in) :: domain_p ! Current local analysis domain |
| 175 | INTEGER, INTENT(in) :: step ! Current time step |
| 176 | INTEGER, INTENT(in) :: dim_obs_l ! Dimension of local observation vector |
| 177 | INTEGER, INTENT(in) :: rank ! Rank of initial covariance matrix |
| 178 | REAL, INTENT(in) :: obs_l(dim_obs_l) ! Local vector of observations |
| 179 | REAL, INTENT(inout) :: A_l(dim_obs_l, rank) ! Input matrix from analysis routine |
| 180 | REAL, INTENT(out) :: C_l(dim_obs_l, rank) ! Output matrix |
| 181 | }}} |
| 182 | |
| 183 | The routine is called during the loop over the local analysis domains in the analysis step. In the algorithm the product of the inverse of the observation error covariance matrix with some matrix has to be computed. For the SEIK filter this matrix holds the observed part of the ensemble perturbations for the local analysis domain of index `domain_p`. The matrix is provided as `A_l`. The product has to be given as `C_l`. |
| 184 | |
| 185 | This routine is also the place to perform observation localization. To initialize a vector of weights, the routine `PDAF_local_weights` can be called. The procedure is used in the example implementation and also demonstrated in the template routine. |
| 186 | |
| 187 | Hints: |
| 188 | * the routine does not require that the product is implemented as a real matrix-matrix product. Rather, the product can be implemented in its most efficient form. For example, if the observation error covariance matrix is diagonal, only the multiplication of the diagonal with matrix `A_l` has to be implemented. |
| 189 | * The observation vector `obs_l` is provided through the interface for cases where the observation error variance is relative to the actual value of the observations. |