| 121 | The other arguments are names of user-supplied subroutines that are only executed if the analysis step is executed (See the section [ModifyModelforEnsembleIntegration#Compilationandtesting 'Compilation and testing'] for how to provide these routines for compilation at this stage). These routines are explained in the section of the implementation guide on ([ImplementationofAnalysisStep Implementation of the Analysis step]) separately for each available filter algorithm. |
| 122 | |
| 123 | |
| 124 | == `PDAF_assimilate_X_si` == |
| 125 | |
| 126 | There is a separate routine `PDAF_assimilate_X_si` for each of the filter algorithms. The name of the routine includes the name of the filter (instead of `X`). The purpose of the `PDAF_assimilate_X_si` routines is to write back the forecast model fields into the array holding the ensemble of model state vectors and to compute the analysis step of the chosen filter algorithm. Each filter algorithm has its own 'assimilate' routine, because the distinct names of several user-supplied routines. The different names do not appear in the simplified interfaces but are defined internally to PDAF. |
| 127 | |
| 128 | The interface for all filters is the following: |
| 129 | {{{ |
| 130 | SUBROUTINE PDAF_assimilate_X_si(status) |
| 131 | }}} |
| 132 | and has only a single argument: |
| 133 | * `status`: The integer status flag. It is zero, if PDAF_get_state is exited without errors. |
| 134 | |
| 135 | At the stage of [ModifyModelforEnsembleIntegration implementing the ensemble integration], only three user-supplied routine are relevant: |
| 136 | * `collect_state_pdaf` |
| 137 | * `distribute_state_pdaf` |
| 138 | * `next_observation_pdaf` |
| 139 | The interface of these routines is described on the page on [ModifyModelforEnsembleIntegration#U_collect_statecollect_state.F90 implementing the ensemble integration with the full interface]. |
| 140 | |