Changes between Version 21 and Version 22 of ImplementationConceptOnline


Ignore:
Timestamp:
May 31, 2025, 6:37:05 PM (2 days ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ImplementationConceptOnline

    v21 v22  
    3939'''Extensions for the fully-parallel assimilation system'''[[BR]]
    4040The right side of Figure 1 shows the extensions required for the ''fully-parallel'' assimilation system (marked green):
    41  * **init_parallel_PDAF**: This subroutine is inserted close to the start of the model code. If the model itself is parallelized the correct location is directly after the initialization of the parallelization in the model code. `init_parallel_pdaf` creates the parallel environment that allows to compute the time stepping for an ensemble of models ("model tasks") at the same time.
    42  * **init_PDAF**: This subroutine is added after the initialization part of the model, just before the time stepping loop. In this subroutine one defines parameters for PDAF and then one calls the core initialization routine `PDAF_init`. This core routine initializes internal parameters and afterwards the array of ensemble states using a user-provided call-back routine. Subsequently, one calls the PDAF core routine `PDAF_init_forecast` (in implementations of PDAF before version 3.0, this routine was called `PDAF_get_state`). This routine initializes model fields from the array of ensemble states using a call-back routine. In addition, it returns the number of time steps that have to be computed in the following forecast phase.
    43  * **assimilate_PDAF**: This routine is added to the model code before the end of the time stepping loop (usually just before the ''END DO'' in a Fortran program). The routine declares the names of user-supplied subroutines and calls a PDAF-core routine `PDAF3_assimilate`. (In implementations of PDAF before version 3.0, different routines named `PDAFomi_assimilate_X` with, e.g., X=`local`, for local filters are used). This routine has to be called at the end of each time step. It counts whether all time steps of the current forecast phase have been computed. If this is not the case, the program continues integrating the model. If the forecast phase is completed, the analysis step, i.e. the actual assimilation of the observations, is computed. Subsequently, the next forecast phase is initialized by writing the analysis state vector into the model fields and setting the number of time steps in the next forecast phase.
    44  * **finalize_PDAF**: This routine is used to let PDAF display timing and memory information and to call PDAF to deallocate its internal arrays.
     41 * **init_parallel_pdaf**: This subroutine is inserted close to the start of the model code. If the model itself is parallelized the correct location is directly after the initialization of the parallelization in the model code. `init_parallel_pdaf` creates the parallel environment that allows to compute the time stepping for an ensemble of models ("model tasks") at the same time.
     42 * **init_pdaf**: This subroutine is added after the initialization part of the model, just before the time stepping loop. In this subroutine one defines parameters for PDAF and then one calls the core initialization routine `PDAF_init`. This core routine initializes internal parameters and afterwards the array of ensemble states using a user-provided call-back routine. Subsequently, one calls the PDAF core routine `PDAF_init_forecast` (in implementations of PDAF before version 3.0, this routine was called `PDAF_get_state`). This routine initializes model fields from the array of ensemble states using a call-back routine. In addition, it returns the number of time steps that have to be computed in the following forecast phase.
     43 * **assimilate_pdaf**: This routine is added to the model code into the time stepper before the end of the time stepping loop (usually just before the ''END DO'' in a Fortran program). The routine declares the names of user-supplied subroutines and calls a PDAF-core routine like `PDAF3_assimilate`. (In implementations of PDAF before version 3.0, different routines named `PDAFomi_assimilate_X` with, e.g., X=`local`, for local filters are used). This routine has to be called at the end of each time step. It counts whether all time steps of the current forecast phase have been computed. If this is not the case, the program continues integrating the model. If the forecast phase is completed, the analysis step, i.e. the actual assimilation of the observations, is computed. Subsequently, the next forecast phase is initialized by writing the analysis state vector into the model fields and setting the number of time steps in the next forecast phase.
     44 * **finalize_pdaf**: This routine is used to let PDAF display timing and memory information and to call PDAF to deallocate its internal arrays.
    4545
    4646With the implementation strategy of PDAF, calls to four subroutines are added to the model code. These additions are usually only single lines of code and the changes only affect the general part of the model code. 
     
    5353* The implementation with PDAF does not require that the time stepping part of the model is implemented as a subroutine. Instead calls to subroutines that control the the ensemble integration are added to the model code. This minimizes the changes in the model code.
    5454* In the ''fully parallel'' mode described here, we use as many model tasks as ensemble members. Thus, the model always moves forward in time.
    55 * PDAF uses the concept to 'pull' information at the time when it is needed. All model-specific operations, like the initialization of the array of ensemble states in `PDAF_init`, are performed by user-supplied routines which are called through PDAF's standard interface as call-back routines. Details on the interface and the required routines are given on the pages describing the implementation steps. The concept of the call-back routines is depicted in Fig. 2.
     55* PDAF uses the concept to 'pull' information at the time when it is needed. All model-specific operations, like the initialization of the array of ensemble states in `PDAF_init`, are performed by user-supplied routines which are called through PDAF's standard interface as call-back routines. Also the reading of observational infromation is performed by user-supplied call-back subroutines. Details on the interface and the required routines are given on the pages describing the implementation steps. The concept of the call-back routines is depicted in Fig. 2.
    5656* The assimilation system is controlled by the user-supplied routines that are called through PDAF as call-back routines.  With this strategy, the assimilative model program is essentially driven by the model part of the program. Thus, the model is not a sub-component of the assimilation system, but the implementation with PDAF results in a model extended for data assimilation. 
    5757* The user-supplied call-back routines can be implemented in the context of the model analogously to the model code. For example, if the model is implemented using Fortran modules (or even common blocks), these can be used to implement the user-supplied routines, too. This simplifies the implementation of the user-supplied routines knowing about the particularities of their model.