126 | | * `status`: The integer status flag. It is zero, if `PDAFomi_assimilate_global` is exited without errors. |
127 | | |
128 | | Note that the interface of `PDAFomi_assimilate_en3dvar_estkf` is identical to that of `PDAFomi_assimilate_3dvar` apart from using the routines `U_cvt_ens` and `U_cvt_adj_ens` in case of the ensemble variational method. |
129 | | |
130 | | |
131 | | === `PDAFomi_put_state_en3dvar_lestkf` === |
132 | | |
133 | | When the 'flexible' implementation variant is chosen for the assimilation system, the routine `PDAFomi_put_state_*` has to be used instead of `PDAFomi_assimilate_*`. The general aspects of the filter specific routines `PDAF_put_state_*` have been described on the page [ModifyModelforEnsembleIntegration Modification of the model code for the ensemble integration]. The interface of the routine is identical with that of `PDAF_assimilate_*` with the exception the specification of the user-supplied routines `U_distribute_state` and `U_next_observation` are missing. |
| 126 | * `status`: The integer status flag. It is zero, if the routine is exited without errors. |
| 127 | |
| 128 | |
| 129 | === `PDAF_put_state_en3dvar_lestkf` === |
| 130 | |
| 131 | When the 'flexible' implementation variant is chosen for the assimilation system, the routine `PDAF_put_state_*` has to be used instead of `PDAF_assimilate_*`. The general aspects of the filter specific routines `PDAF_put_state_*` have been described on the page [ModifyModelforEnsembleIntegration Modification of the model code for the ensemble integration]. The interface of the routine is identical with that of `PDAF_assimilate_*` with the exception the specification of the user-supplied routines `U_distribute_state` and `U_next_observation` are missing. |
137 | | SUBROUTINE PDAFomi_put_state_en3dvar_lestkf(U_collect_state, & |
138 | | U_init_dim_obs_pdafomi, U_obs_op_pdafomi, & |
139 | | U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin_pdafomi, U_obs_op_adj_pdafomi, & |
140 | | U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l_pdafomi, & |
141 | | U_g2l_state, U_l2g_state, U_prepoststep, outflag) |
142 | | }}} |
143 | | |
144 | | === `PDAFomi_put_state_en3dvar_estkf` === |
145 | | |
146 | | The interface of this routine is analogous to that of `PDAFomi_assimilate_en3dvar_estkf'. Thus it is identical to this routine with the exception the specification of the user-supplied routines `U_distribute_state` and `U_next_observation` are missing. |
| 135 | SUBROUTINE PDAF_put_state_en3dvar_lestkf(U_collect_state, & |
| 136 | U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & |
| 137 | U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & |
| 138 | U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & |
| 139 | U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_g2l_state, U_l2g_state, & |
| 140 | U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & |
| 141 | U_prepoststep, outflag) |
| 142 | }}} |
| 143 | |
| 144 | === `PDAF_put_state_en3dvar_estkf` === |
| 145 | |
| 146 | The interface of this routine is analogous to that of `PDAF_assimilate_en3dvar_estkf'. Thus it is identical to this routine with the exception the specification of the user-supplied routines `U_distribute_state` and `U_next_observation` are missing. |
150 | | SUBROUTINE PDAFomi_put_state_en3dvar_estkf(U_collect_state, & |
151 | | U_init_dim_obs_pdafomi, U_obs_op_pdafomi, & |
152 | | U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin_pdafomi, U_obs_op_adj_pdafomi, & |
153 | | U_prepoststep, outflag) |
| 150 | SUBROUTINE PDAF_put_state_en3dvar_estkf(U_collect_state, & |
| 151 | U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & |
| 152 | U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & |
| 153 | U_init_obsvar, U_prepoststep, outflag) |
158 | | Here all user-supplied routines are described that are required in the call to `PDAFomi_assimilate_3dvar`. For some of the generic routines, we link to the page on [ModifyModelforEnsembleIntegration modifying the model code for the ensemble integration]. |
159 | | |
160 | | To indicate user-supplied routines we use the prefix `U_`. In the template directory `templates/` as well as in the tutorial implementations in `tutorial/` these routines exist without the prefix, but with the extension `_pdaf.F90`. The user-routines relating to OMI are collected in the file `callback_obs_pdafomi.F90`. In the section titles below we provide the name of the template file in parentheses. |
| 158 | Here all user-supplied routines are described that are required in the calls to `PDAF_assimilate_en3dvar_*` and `PDAF_put_state_en3dvar_*`. For some of the generic routines, we link to the page on [ModifyModelforEnsembleIntegration modifying the model code for the ensemble integration]. |
| 159 | |
| 160 | To indicate user-supplied routines we use the prefix `U_`. In the template directory `templates/` as well as in the example implementation in `testsuite/src/dummymodel_1D` these routines exist without the prefix, but with the extension `_pdaf.F90`. In the section titles below we provide the name of the template file in parentheses. |
311 | | === `U_obs_op_lin_pdafomi` (callback_obs_pdafomi.F90) === |
312 | | |
313 | | This is a call-back routine for PDAF-OMI applying the linearized observation operator to the state vector. The routine calls a routine from the observation module for each observation type. If the full observation operator is lineaer the same operator can be used here. |
314 | | |
315 | | See the [wiki:OMI_Callback_obs_pdafomi documentation on callback_obs_pdafomi.F90] for more information. |
316 | | |
317 | | |
318 | | === `U_obs_op_adj_pdafomi` (callback_obs_pdafomi.F90) === |
319 | | |
320 | | This is a call-back routine for PDAF-OMI applying the adjoint observation operator to some vector inthe observation space. The routine calls a routine from the observation module for each observation type. |
321 | | |
322 | | See the [wiki:OMI_Callback_obs_pdafomi documentation on callback_obs_pdafomi.F90] for more information. |
| 311 | === `U_obs_op_lin` (obs_op_lin_pdaf.F90) === |
| 312 | |
| 313 | This routine is used by all 3D-Var methods. |
| 314 | |
| 315 | The interface for this routine is: |
| 316 | {{{ |
| 317 | SUBROUTINE obs_op_lin(step, dim_p, dim_obs_p, state_p, m_state_p) |
| 318 | |
| 319 | INTEGER, INTENT(in) :: step ! Current time step |
| 320 | INTEGER, INTENT(in) :: dim_p ! PE-local dimension of state |
| 321 | INTEGER, INTENT(in) :: dim_obs_p ! Dimension of observed state |
| 322 | REAL, INTENT(in) :: state_p(dim_p) ! PE-local model state |
| 323 | REAL, INTENT(out) :: m_state_p(dim_obs_p) ! PE-local observed state |
| 324 | }}} |
| 325 | |
| 326 | The routine is called during the analysis step. It has to perform the operation of the linearized observation operator acting on a state vector increment that is provided as `state_p`. The observed state has to be returned in `m_state_p`. |
| 327 | |
| 328 | For a model using domain decomposition, the operation is on the PE-local sub-domain of the model and has to provide the observed sub-state for the PE-local domain. |
| 329 | |
| 330 | Hint: |
| 331 | * If the observation operator involves a global operation, e.g. some global integration, while using domain-decomposition one has to gather the information from the other model domains using MPI communication. |
| 332 | |
| 333 | |
| 334 | === `U_obs_op_adj` (obs_op_adj_pdaf.F90) === |
| 335 | |
| 336 | This routine is used by all 3D-Var methods. |
| 337 | |
| 338 | The interface for this routine is: |
| 339 | {{{ |
| 340 | SUBROUTINE obs_op_adj(step, dim_p, dim_obs_p, state_p, m_state_p) |
| 341 | |
| 342 | INTEGER, INTENT(in) :: step ! Current time step |
| 343 | INTEGER, INTENT(in) :: dim_p ! PE-local dimension of state |
| 344 | INTEGER, INTENT(in) :: dim_obs_p ! Dimension of observed state |
| 345 | REAL, INTENT(in) :: m_state_p(dim_obs_p) ! PE-local observed state |
| 346 | REAL, INTENT(out) :: state_p(dim_p) ! PE-local model state |
| 347 | }}} |
| 348 | |
| 349 | The routine is called during the analysis step. It has to perform the operation of the adjoint observation operator acting on a vector in observation space that is provided as m_state_p. The resulting state vector has to be returned in `m_state_p`. |
| 350 | |
| 351 | For a model using domain decomposition, the operation is on the PE-local sub-domain of the model and has to provide the observed sub-state for the PE-local domain. |
| 352 | |
| 353 | Hint: |
| 354 | * If the observation operator involves a global operation, e.g. some global integration, while using domain-decomposition one has to gather the information from the other model domains using MPI communication. |
| 355 | |