Changes between Version 14 and Version 15 of OfflineImplementationGuide


Ignore:
Timestamp:
May 18, 2025, 3:24:29 PM (6 hours ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OfflineImplementationGuide

    v14 v15  
    1818}}}
    1919
    20 || We recommend to check first the **[wiki:PdafTutorial PDAF Tutorials]**, which provide an easy step-by-step description for assimilation program in the offline and oneline modes utilizing example tutorial codes. [[BR]]The Implementation Guide here provides more details, e.g. descriptions of the defined interfaces, but is less applied. ||
     20|| We recommend to check first the **[wiki:PdafTutorial PDAF Tutorials]**, which provide an easy step-by-step description for assimilation program in the offline and oneline modes utilizing example tutorial codes. [[BR]][[BR]]The Implementation Guide provides more details, e.g. descriptions of the defined interfaces, but is less applied. ||
    2121
    22 This page contains the implementation guide for the offline mode of PDAF. The [ImplementationGuide implementation guide for the online mode], which uses a direct coupling of the model and PDAF is provided on a separate page. The differences between the online and offline modes is described on the page on the [GeneralImplementationConcept Implementation concept of PDAF].
     22This page contains the Implementation Guide for the offline mode of PDAF. The [ImplementationGuide implementation guide for the online mode], which uses a direct coupling of the model and PDAF, is provided on a separate page. The differences between the online and offline modes is described on the page on the [GeneralImplementationConcept Implementation concept of PDAF].
    2323
    2424
    2525== The implementation of PDAF in offline mode ==
    2626
    27 For the offline mode of data assimilation, the ensemble integrations by the numerical model are executed separately from the assimilation program, which computes the filter analysis step. Thus, the model code can remain unchanged in the offline mode. The calls to functions of PDAF are only contained in the assimilation program.
     27For the offline mode of data assimilation, the ensemble integrations by the numerical model are executed separately from the assimilation program, which computes the analysis step. Thus, the model code can remain unchanged in the offline mode. The calls to functions of PDAF are only contained in the assimilation program.
     28
     29An example of the implementation is given in the tutorial provided with PDAF  in `tutorial/offline_2D_serial` (or `tutorial/offline 2D_parallel` for a parallelized case). These examples base on the template code at `templates/offline`. Several subroutines that contain specific operations for the model and observations are called by PDAF through its defined interface as call-back routines. These subroutines need to be implemented by the user. The operations in all these subroutines are rather elementary like filling the array of the ensemble of model states from model output files and the initialization of the vector of observations. The tutorial code includes examples for these routines for a simple case.
     30
     31We recommend to base your own implementation on the tutorial example or the template by adding to or adapting the functionality, adding reading and writing routines for model files.
     32
     33Figure 1 provide an overview of the call structure of the offline code.
     34
     35[[Image(//pics/PDAFstructure_offline_V3.png)]]
     36[[BR]]'''Figure 1:''' Overall call structure in PDAF's offline mode. 
     37
     38The code structure is as follows from left to right
     39* **column 1 'User code'**: The main program calls the three routines shown in this column. These are interface routines, which define variables for PDAF and then call core-subroutines of PDAF
     40* **column 2 'PDAF'**: These are the PDAF core routines which are called by the routines in column 1 to the left.
     41* **column 3 'Call-back routines'**: This column shows the call-back routines, which are called by the PDAF routines in column 2 to the left. The routines in the purple box `callback_obs_pdafomi.F90` are the subroutines that handle observations. The three red routines are used only for localized ensemble filters.
     42* **column 4 'OMI observation modules'**: This column shows observation modules that are used for the specific handling of each observation type. This handling is arranged by the PDAF Observation Module Interface (OMI). The observation-related call-back routines in column 3 to the left call routines in each of the observation modules.
     43* **column 5 'PDAF'**: Some of the call-back routines and the routines in the observation modules call PDAF core routines, e.g. for diagnostics, localization, and to intialize OMI.
    2844
    2945The implementation of the assimilation program for PDAF in offline mode can be performed in several steps. A possible sequence is the following:
     
    3450 4. [OfflineAddingMemoryandTimingInformation Adding memory and timing information]
    3551
    36 The implementation steps are described on the pages linked above. An example of the implementation is given in the tutorial provided with PDAF  in `tutorial/offline_2D_serial` (or `tutorial/offline 2D_parallel` for a parallelized case). It should be possible to base you own implementation on this example by adding reading and writing routines for model files as well as adding the user-supplied routines for the handling of observations.
    37 
    38 Several routines that contain model and observation specific operations are called by PDAF through its defined interface. These routines need to be implemented by the user. The operations in all these routines are rather elementary like filling the array of the ensemble of model states from model output files and the initialization of the vector of observations. The example mentioned above also includes examples for these routines. In addition, the directory `templates/` contains template implementations of the routines that can be used as a basis for new implementations.
    39 
    40 An overview of the available options for each filter that can be specified when PDAF is initialized is given on the [wiki:AvailableOptionsforInitPDAF overview page on options].
    41 
    4252
    4353== Generating initial ensembles ==
    4454
    45 To perform ensemble data assimilation one has to create an initial ensemble which is then used in the data assimilation process. There are various different ways to generate an ensemble (like random picking of model states, breeding, short-term integrations of perturbed model fields, second-order exact sampling from EOFs). PDAF provides routines to use snapshots from a model integration to first compute EOFs (empirical orthogonal functions) and then to use the EOFs to perform a constrained random transformation to obtain ensemble perturbations to which a central state (i.e. ensemble mean) is added. This second-order exact sampling (Pham, 2001) showed good performance in our own data assimilation applications.
     55To perform ensemble data assimilation one has to create an initial ensemble, which is then used in the data assimilation process. There are various different ways to generate an ensemble (like random picking of model states, breeding, short-term integrations of perturbed model fields, second-order exact sampling from EOFs). PDAF provides routines to use snapshots from a model integration to first compute EOFs (empirical orthogonal functions) and then to use the EOFs to perform a constrained random transformation to obtain ensemble perturbations to which a central state (i.e. ensemble mean) is added. This second-order exact sampling (Pham, 2001) showed good performance in our own data assimilation applications.
    4656
    4757The ensemble generation is described on the separate page: