Version 2 (modified by 13 years ago) (diff) | ,
---|
Adding a Filter Algorithm to PDAF
This text describes the implementation strategy and internal structure of PDAF valid for version 1.7.0 and later. If you use an earlier version of PDAF, we recommend to update to the most recent version. In this text, we assume that the reader is already familiar with PDAF to the extend of experience with the implementation of a model with PDAF that is described in the implementation guide.
The internal structure of PDAF is organized into a generic part providing the infrastructure to perform ensemble forecasts and filter analysis steps. The generic part is independent of the particular filter algorithm and only distinguishes between ensemble based filters (all filters except SEEK) and mode based filters (currently only SEEK). The filter-specific routines are called through an internal interface.
Each filter algorithm consists of a minimum of 6 routines. All routines are called trough the internal interface of PDAF, except for the "put state" routine (PDAF_put_state_FILTERNAME
where FILTERNAME is the name of the selected filter).
Internal Interface of PDAF
The internal interface of PDAF is scructured as follows:
The routine PDAF_init
calls
PDAF_init_filters
- interface routine toPDAF_FILTERNAME_init
PDAF_FILTERNAME_init
performs the filter-specific initialization of parameters and calls the user-supplied routine that initializes the initial ensemble of model states.
PDAF_alloc_filters
- interface routine toPDAF_FILTERNAME_alloc
PDAF_FILTERNAME_alloc
allocates the filter-specific arrays.
PDAF_options_filters
- interface routine toPDAF_FILTERNAME_options
PDAF_FILTERNAME_options
is an optional routine. Its purpose is to display an overview of available options for the filter algorithm.
The routine PDAF_get_state
calls
PDAF_initinfo_filters
- interface routine toPDAF_FILTERNAME_initinfo
PDAF_FILTERNAME_initinfo
displays information on the current configuration of the filter algorithm.
The routine PDAF_print_info
only includes the interface to PDAF_FILTERNAME_memtime
PDAF_FILTERNAME_memtime
displays information on the execution duration of the different parts of the assimilation process as well as information on the amount of allocated memory.
The routine PDAF_put_state_FILTERNAME
is called directly from the model code. There is a separate routine for each filter. The standard implementation calls
PDAF_FILTERNAME_initinfo
- This is the same routine that is called by
PDAF_get_state
. Here, it is only called, if the offline mode of PDAF is used.
- This is the same routine that is called by
PDAF_FILTERNAME_update
- This routine contains the actual assimilation or analysis step of the filter algorithm.