Changes between Version 47 and Version 48 of AddFilterAlgorithm
- Timestamp:
- Nov 7, 2024, 11:54:24 AM (6 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AddFilterAlgorithm
v47 v48 11 11 == PDAF's Internal Interface == 12 12 13 Before explaining the filter-specific routines and the calling interface of each routine, we provide an overview of the internal interface routines of PDAF. The structure of the internal interface of PDAF is depicted in Figure 1 (For the filter-specific routines, 'X' is the name of the filter algorithm). Shown are only the routines that are relevant for the implementation of a new filter method grouped by type. To add a filter algorithm, new filter-specific routines (right column of Fig. 1) need to be implemented. These routines are registered in PDAF by modifying the internal interface routines in the middle column of Fig. 1.13 Before explaining the method-specific routines and the calling interface of each routine, we provide an overview of the internal interface routines of PDAF. The structure of the internal interface of PDAF is depicted in Figure 1 (For the method-specific routines, 'X' is the name of the DA method). Shown are only the routines that are relevant for the implementation of a new filter method grouped by type. To add a filter algorithm, new method-specific routines (right column of Fig. 1) need to be implemented. These routines are registered in PDAF by modifying the internal interface routines in the middle column of Fig. 1. 14 14 15 15 [[Image(//pics/internal_interface_omi.png)]] 16 [[BR]]'''Figure 1:''' Structure of the internal interface of PDAF. There are 4 interface routines (middle column) that connect the generic part with filter-specific routines. For each filter there are 5 filter-specific routines (right column). The three routines marked in blue are called inside the model code, while the routines marked in yellow are internal routines of PDAF.16 [[BR]]'''Figure 1:''' Structure of the internal interface of PDAF. There are 6 interface routines (middle column) that connect the generic part with filter-specific routines. For each filter there are 5 filter-specific routines (right column). The three routines marked in blue are called inside the model code, while the routines marked in yellow are internal routines of PDAF. For PDAF-OMI there are seprate routines for local filters (PDAFomi_assimilate_local) and global filters (PDAFomi_assimilate_global). 17 17 18 18 The separate routines are the following: The routine `PDAF_init` calls … … 23 23 24 24 The routine `PDAF_print_info` only includes the interface to `PDAF_X_memtime` 25 * `PDAF_X_memtime` displays information on the execution durationof the different parts of the assimilation process as well as information on the amount of allocated memory. This functionality is optional.25 * `PDAF_X_memtime` displays information on the run time of the different parts of the assimilation process as well as information on the amount of allocated memory. This functionality is optional. 26 26 27 27 28 The routine `PDAF_put_state_X` or `PDAF_assimilate_X` are called directly from the model code. There is a separate routine for each filter, mainly because of the fact that different user-supplied routines may be needed for the analysis step of the filter. However, the operations performed directly in `PDAF_put_state_X` are widely generic and the filter-specific analysis step is typically implemented as another subroutine. 29 The standard implementation calls 30 * `PDAF_X_update` 31 * This routine contains the actual assimilation or analysis step of the filter algorithm. 32 28 The routines `PDAFomi_assimilate_local` or `PDAFomi_assimilate_global` (or `PDAFomi_put_state_local` or `PDAFomi_put_state_global` for the flexible parallelization variant) are called directly from the model code. These are generic routines which internally call the method-specific routine (PDAF_assimilate_X or PDAF_put_state_X) according to the chosen filter which then calls the actual update routine (PDAF_X_update). 33 29 34 30 When `PDAF_init` is called, the filter algorithm is chosen by its ID number. Internally to PDAF, each filter is identified by a string that is defined in `PDAF_init_filters`. The interface routines have a very simple structure. In general, they select the filter-specific routine based on the string identifying the filters. When a filter algorithm is added, a line for the corresponding filter-specific routine has to be inserted to each of the interface routines. One can also remove a filter from PDAF by deleting the corresponding lines form the internal interface routines.