Changes between Version 48 and Version 49 of PDAF_OMI_Overview


Ignore:
Timestamp:
May 16, 2025, 7:31:04 PM (41 hours ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PDAF_OMI_Overview

    v48 v49  
    3535[[PageOutline(2-3,Contents of this page)]]
    3636
    37 PDAF-OMI (Observation Module Infrastructure) is an extension to PDAF for a better modular implementation of the observation handling for PDAF. It was introduced with PDAF V1.16.
     37PDAF-OMI (Observation Module Infrastructure) provides a structured and modularized approach to implement the observation handling for PDAF. It was introduced with PDAF V1.16 and is now the recommended standard for implementations. However, one can also [wiki:ImplementationofAnalysisStep_noOMI implement the assimilation without using PDAF-OMI], but using the full interface routines requires significantly more programming.
    3838
    39 Compared to the classical variant to implement observations with PDAF, OMI is designed with '''two main aims'''
    40  1. '''reduce the coding effort''' for implementing the support for an observation type, its corresponding observation operator, and localization.
    41  2. '''simplify the implementation of complex cases''' in which several different observation types are assimilated by clearly separating each observation type
     39PDAF-OMI permits to implement the observation handling with limited number of user-provided routines. In addition, each observation type is encapsulated in a Fortran module (referred to as 'observation module'). With this, the implementations of different observation types cannot interfere which each other. The code strucutre is motivated from object-oriented programming, but we avoid here the abstract level of object-orientation in Fortran.
    4240
    4341To guarantee that each observation type (like sea surface temperature data from some satellite sensor, or altimetry data) is handled independently from the others one implements with OMI one Fortran module for each observation type.  Thus, different developers can implement observation types without interfering with the implementations by others.
    4442
    45 To reduce the coding effort only two routines (in the case of global ensemble filters) or three routines (in the case of localized ensemble filter) need to be implemented for an observation type. Always required are:
     43Only two routines (in the case of global ensemble filters) or three routines (in the case of localized ensemble filters) need to be implemented for an observation type. Always required are:
    4644 - '''init_dim_obs'''[[br]]
    4745  Reads observations from a file and initialize the information describing the observations
    4846 - '''obs_op'''[[br]]
    4947  Calls an observation operator routine
    50 For the domain localized filters LETKF/LESTKF/LNETF the following routine is required:
     48For the domain localized filters LETKF/LESTKF/LNETF/LKNETF one more routine is required:
    5149 - '''init_dim_obs_l''' [[br]]
    5250  Calls a generic routine to initialize local observations
     
    6058  Calls a routine for the adjoint observation operator
    6159
    62 The only 'real' coding effort will be in '''init_dim_obs''' because the other routines merely call a routine provided by PDAF-OMI. All functionality needed during the analyis step bases on variables that are initialized by these routines and is provided by PDAF-OMI.
     60The only 'real' coding effort will be in '''init_dim_obs''' because the other routines merely call a subroutine provided by PDAF-OMI. All functionality needed during the analyis step bases on variables that are initialized by these routines and is provided by PDAF-OMI.
    6361
    6462
     
    7169  One observation-specific Fortran module for each observation type
    7270 - '''callback_obs_pdafomi.F90'''[[br]]
    73   The observation-specific call-back routines are merely pass-through routines without own functionality. They are collected into this single file for compactness.
     71  PDAF can only call a generic call-back routine for the different functionaliteis, e.g. `init_dim_obs_pdafomi` or `obs_op_pdafomi`. This file contains these generic call-back routines, in which the observation-specific subroutines of the differnt observation modules are called. Thus, the subroutines in this file are merely pass-through routines without own functionality.
    7472 - '''PDAF-OMI core routines'''[[br]]
    7573  These routines are part of the PDAF library and provide functionality for observation handling, localization, and observation operators
     
    8179
    8280
    83 With OMI, the functionality to handle observations is included in generic routines and observation-specific modules (obs_*_pdafomi in the third column in Fig. 1, denoted obs-module below). Most routines for the observation handling are generic with OMI and included in PDAF so that only three to four routines with observation specific operations need to be implemented. There is one obs-module per observation type with collects these routines. For example, one can have one obs-module for the satellite sea surface temperature from one data provider and another one for sea level anomaly data. Important is that each of these obs-modules, which are further described below, is independent from the others. This allows us to switch between different combinations of observations ensuring that their implementations don’t interfere.
     81With OMI, the functionality to handle observations is included in generic routines and observation-specific modules (obs_*_pdafomi in the third column in Fig. 1, denoted obs-module below). Based on the information initialized in the call-back routines, PDAF can perform further observation handling internally. Only the routines mentioned above that perform observation-specific operations (initialization, observation operator, localization) need to be implemented. There is one obs-module per observation type with contains these routines. For example, one can have one obs-module for the satellite sea surface temperature from one data provider and another one for sea level anomaly data. Important is that each of these obs-modules, which are further described below, is independent from the others. This allows us to switch between different combinations of observations ensuring that their implementations don’t interfere.
    8482
    85 Since the actual operations are performed in the obs-modules obs_*_pdafomi, the remaining call-back routines (init_dim_obs, obs_op, init_dim_obs_l, localize_covar) are reduced to pass-through routines. Thus, each of these routines contains only calls to one observation-specific routine from each obs-module. There is, in addition, one routine for deallocating the observation-related arrays which calls a generic PDAF-OMI routine for each observation type.
    86 
    87 Because the call-back routines become very compact by this change, they are collected into the file `callback_obs_pdafomi.F90`. This is mainly for convenience, because all these routines are now ‘in one place’. Thus, when adding a new observation type only a new subroutine call has to be added to each of the routines in this file. (Note, that callback_obs_pdafomi.F90 does not define a Fortran module. This is because the call-back routines of PDAF are not contained in a module as this would require to compile the module together with the PDAF core so that the PDAF core would no longer be generic.)
     83Since the actual operations are performed in the obs-modules `obs_*_pdafomi`, the generic call-back routines (init_dim_obs_pdafomi, obs_op_pdafomi, init_dim_obs_l_pdafomi, localize_covar_pdafomi) are reduced to pass-through routines. Thus, each of these routines contains only calls to one observation-specific routine from each obs-module.
     84Because the generic call-back routines are very compact, they are collected into the file `callback_obs_pdafomi.F90`. This is mainly for convenience, because all these routines are now ‘in one place’. Thus, when adding a new observation type only a new subroutine call has to be added to each of the routines in this file. (Note, that callback_obs_pdafomi.F90 does not define a Fortran module. This is because the call-back routines of PDAF are not contained in a module as this would require to compile the module together with the PDAF core so that the PDAF core would no longer be generic.)
    8885
    8986Each obs-module contains four routines:
    90871. `init_dim_obs` initializes all variables holding the information about one observation type.   
    91 1. `obs_op` applies the observation operator to a state vector. One can call an observation operator routine provided by PDAF, or one can to implement a new operator.
     881. `obs_op` applies the observation operator to a state vector. One can call an observation operator routine provided by PDAF-OMI, or one can to implement a new operator.
    92891. `init_dim_obs_l` calls a PDAF-OMI routine to initialize the observation information corresponding to a local analysis domain. One can set localization parameters, like the localization radius, for each observation type.
    93 1. `localize_covar` calls a PDAF-OMI routine to apply covariance localization. One can set localization parameters, liek the localization radius, for each observation type.
     901. `localize_covar` calls a PDAF-OMI routine to apply covariance localization for the LEnKF. One can set localization parameters, like the localization radius, for each observation type.
    9491
    95 For each observation type, PDAF-OMI uses a data structure (Fortran 'type') that is initialized in `init_dim_obs` in the obs-module. The set of routines in `callback_obs_pdafomi.F90` provide the observation handling for all filters and smoothers provided by PDAF. Thus, once the routines in an obs-module are implemented for a particular observation and the subroutine calls in `callback_obs_pdafomi.F90` for this observation type are inserted, one can use each of the provided assimilation methods.
     92For each observation type, PDAF-OMI uses a data structure (Fortran 'type') that is initialized in `init_dim_obs` in the obs-module. The set of routines in `callback_obs_pdafomi.F90` provide the observation handling for all filters and smoothers provided by PDAF. Thus, once the routines in an obs-module are implemented for a particular observation and the subroutine calls in `callback_obs_pdafomi.F90` for this observation type are inserted, one can use this observation type with all of PDAF's assimilation methods.
    9693
    9794Note that `init_dim_obs_l` is only required if one plans to use domain-localized filters like LESTKF, LETKF or LNETF. Likewise, `localize_covar` is only required if on likes to use the loalized EnKF (LEnKF).
     
    128125
    129126The current version of PDAF-OMI has a few limitations
    130  - PDAF V2.3 added support for non-diagonal observation error covariance matrices **R** while older versions only supported diagonal observation error covariance matrices  (though, the observation variances can vary). Using nondiagonal **R**-matrices, requires a user-supplied code for operations relating to **R** (see the documentation on the implemenetation for [wiki:OMI_nondiagonal_observation_error_covariance_matrices using non-diagonal R-matrices with OMI])
    131  - OMI currently only includes observation operators with linear interpolation.
     127 - PDAF V2.3 added support for non-diagonal observation error covariance matrices **R** while previous versions only supported diagonal observation error covariance matrices  (though, the observation variances can vary). Using nondiagonal **R**-matrices, requires a user-supplied code for operations relating to **R** (see the documentation on the implemenetation for [wiki:OMI_nondiagonal_observation_error_covariance_matrices using non-diagonal R-matrices with OMI])
     128 - OMI currently only includes observation operators with linear interpolation and for observation located at grid points.
    132129 - We have not tested interoperability with other programming languages. Generally Fortran derived data types and C structs should be compatible. Obviously, taking the Fortran routines and calling C functions to perform the actual initializations will work.