| 307 | == Integration into PDAF3 interface == |
| 308 | |
| 309 | The PDAF3 interface routines provide the advanced interface in which functionality is provided by PDAF-OMI and PDAFlocal, so that the interface routines have a minimum number of arguments. This alos allowed to provide the universal routines `PDAF3_assimilate` and `PDAF3_assim_offline` (see the [wiki:ImplementationofAnalysisStep_PDAF3 Page on implementing the analysis step in PDAF3] and the [wiki:PDAF3_interface Page on the PDAF3 interface]). |
| 310 | |
| 311 | A new DA method should be integrated into the PDAF3 interface routines. If the new DA method uses only the call-back routines that are already available and defined in `src/PDAF_cb_procedures.F90` one can right away add the call to, e.g. `PDAF_assimilate_X` into `PDAF3_assimilate` (in the file `src/PDAF3_assimilate_ens.F90`) and the call to `PDAF_assim_offline_X` into `PDAF3_assim_offline` (in the file `src/PDAF3_assim_offline_ens.F90`). |
| 312 | |
| 313 | For 3D-Var methods there are separate files `src/PDAF3_assimilate_3dvars.F90` and `src/PDAF3_assim_offline_3dvar.F90`. |
| 314 | |
| 315 | If one introduced a new call-back routine for the DA method one should check if this can be integrated into PDAF-OMI (if it is related to observations) or into PDAFlocal (if related to state localization). If this is not the case, the DA method is most likely not compatible with the universal interface routines. In this case, one has to generate a new for PDAF3_assimilate and for PDAF3_assim_offline. An example for such a routine is `PDAF3_assimilate_lenkf` in `src/PDAF2_assimilate_ens.F90`, which contains the additional routine `localize_pdaf` for covariance localization. |