Changes between Version 27 and Version 28 of OMI_observation_modules


Ignore:
Timestamp:
Dec 17, 2021, 4:24:21 PM (2 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OMI_observation_modules

    v27 v28  
    3939Each obs-module contains four routines (where 'TYPE' will be replaced by the name of the observation):
    4040
    41  - `init_dim_obs_TYPE` initializes all variables holding the information about one observation type. The information about the observation type is stored in a data structure (Fortran derived type).
    42  - `obs_op_TYPE` 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.
    43  - `init_dim_obs_l_TYPE` 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.
    44  - `localize_covar_TYPE` calls a PDAF-OMI routine to apply covariance localization. One can set localization parameters, like the localization radius, for each observation type.
    45 
    46 The template file `obs_TYPE_pdafomi_TEMPLATE.F90` shows the different steps needed when implementing these routines. The main work is to implement `init_dim_obs`, while the other routines mainly call a subroutine provided by PDAF-OMI.
    47 
    48 In the obs-module the subroutines are named according to the observation type. The template file uses generic names which can be replaced by the user. Having distinct names for each observation type is relevant to include the subroutine from the module in the call-back routine with ‘use’. In the header of each obs-module, the user can declare further variables, e.g. assim_TYPE as a flag to control whether the observation type should be assimilated.
     41 - `init_dim_obs_OBSTYPE` initializes all variables holding the information about one observation type. The information about the observation type is stored in a data structure (Fortran derived type).
     42 - `obs_op_OBSTYPE` 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.
     43 - `init_dim_obs_l_OBSTYPE` 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.
     44 - `localize_covar_OBSTYPE` calls a PDAF-OMI routine to apply covariance localization. One can set localization parameters, like the localization radius, for each observation type.
     45
     46The template file `obs_OBSTYPE_pdafomi_TEMPLATE.F90` shows the different steps needed when implementing these routines. The main work is to implement `init_dim_obs`, while the other routines mainly call a subroutine provided by PDAF-OMI.
     47
     48In the obs-module the subroutines are named according to the observation type. The template file uses generic names which can be replaced by the user. Having distinct names for each observation type is relevant to include the subroutine from the module in the call-back routine with ‘use’. In the header of each obs-module, the user can declare further variables, e.g. assim_OBSTYPE as a flag to control whether the observation type should be assimilated.
    4949
    5050'''Note:''' In contrast to the 'classical' implementation of observation routines for PDAF, the global and local filters use the same routines `init_dim_obs` and `obs_op`. PDAF-OMI recognizes whether a global or local filter is used and does the necessary operations by itself.
    5151
    52 '''Note:''' When using the template please we recommend to us a find and replace method of an editor. Please replace `_TYPE`, since TYPE without leading underscore is also used elsewhere in the template code.
    53 
    5452== Data type obs_f ==
    5553
    56 To ensure the functionality within each obs-module, we rely on a derived data type called `obs_f` that contains all information about the observation. One instance of this data type is allocated in each obs-module with the generic variable name `thisobs`. A few of the elements of `obs_f` are initialized by the user when the observation information is initialized on `init_dim_obs_f`. Further variables is set in a call to the routine `PDAFomi_gather_obs`. This information is then used by all other routines in the obs-module. The template file `obs_TYPE_pdafomi_TEMPLATE.F90` shows the different steps needed to initialize `thisobs`.
     54To ensure the functionality within each obs-module, we rely on a derived data type called `obs_f` that contains all information about the observation. One instance of this data type is allocated in each obs-module with the generic variable name `thisobs`. A few of the elements of `obs_f` are initialized by the user when the observation information is initialized on `init_dim_obs_f`. Further variables is set in a call to the routine `PDAFomi_gather_obs`. This information is then used by all other routines in the obs-module. The template file `obs_OBSTYPE_pdafomi_TEMPLATE.F90` shows the different steps needed to initialize `thisobs`.
    5755
    5856The '''mandatory variables''' in `obs_f` that need to be set by the user are:
     
    9189Next to the derived data type `obs_f`, there is a derived type `obs_l` for localization. This is only used internally. It will be filled in the routine `init_dim_obs_l` when calling `PDAFomi_init_dim_obs_l`.
    9290
    93 == `init_dim_obs_TYPE` ==
     91== `init_dim_obs_OBSTYPE` ==
    9492
    9593This is the main routine to initialize observation information.
    9694
    97 ||= Please see the template file `templates/omi/obs_TYPE_pdafomi_TEMPLATE.F90`[[br]] for a step-by-step description of the implementation steps. =||
     95||= Please see the template file `templates/omi/obs_OBSTYPE_pdafomi_TEMPLATE.F90`[[br]] for a step-by-step description of the implementation steps. =||
    9896
    9997Each observation module uses the generic name '''thisobs''' for the variable with observation type `obs_f`. Elements of `thisobs` are accessed like
     
    126124
    127125
    128 == `obs_op_TYPE` ==
     126== `obs_op_OBSTYPE` ==
    129127
    130128This routine applies the observation operator to a state vector. It returns the observed state vector to PDAF. The routine is used by all filters.
     
    140138
    141139
    142 == `init_dim_obs_l_TYPE` ==
     140== `init_dim_obs_l_OBSTYPE` ==
    143141
    144142This routine initializes local observation information. The routine is only used by the domain-localized filters (LESTKF, LETKF, LSEIK, LNETF).
     
    161159
    162160
    163 == `localize_covar_TYPE` ==
     161== `localize_covar_OBSTYPE` ==
    164162
    165163This routine initializes local observation information. The routine is only used by the local EnKF (LEnKF).
     
    184182For the 3D-Var methods added with PDAF V2.0 two more routines are required in the observation module.
    185183
    186 === `obs_op_lin_TYPE` ===
     184=== `obs_op_lin_OBSTYPE` ===
    187185
    188186This routine applies the linearized observation operator to a state vector. It returns the observed state vector to PDAF. The routine is used only by the 3D-Var methods.
    189187
    190 '''Note:''' A separate routine for `obs_op_lin_TYPE` is only required if the full observation operator in `obs_op_TYPE` is nonlinear. If `obs_op_TYPE` is linear, one can just insert calls to this operator in the routine `obs_op_lin_pdafomi` in `callback_obs_pdafomi.F90`.
     188'''Note:''' A separate routine for `obs_op_lin_OBSTYPE` is only required if the full observation operator in `obs_op_OBSTYPE` is nonlinear. If `obs_op_OBSTYPE` is linear, one can just insert calls to this operator in the routine `obs_op_lin_pdafomi` in `callback_obs_pdafomi.F90`.
    191189
    192190PDAF-OMI provides several linear observation operators. For example the observation operator for observations that are grid point values is called as:
     
    199197For more information on the available observation operators and on how to implement your own observation operator see the [wiki:OMI_observation_operators documentation of observation operators for OMI].
    200198
    201 === `obs_op_adj_TYPE` ===
     199=== `obs_op_adj_OBSTYPE` ===
    202200
    203201This routine applies the adjoint observation operator to an observation vector. It returns the state vector to PDAF. The routine is used only by the 3D-Var methods.
     
    216214
    217215To implement a new observation type, the approach is generally as follows:
    218 1.      Create a copy of `obs_TYPE_pdafomi_TEMPLATE.F90`
    219 1.      Rename the module and its subroutines according to the observation (replacing ‘TYPE’ by name of observation).
     2161.      Create a copy of `obs_OBSTYPE_pdafomi_TEMPLATE.F90`
     2171.      Rename the module and its subroutines according to the observation (replacing ‘OBSTYPE’ by name of observation).
    2202181.      Implement `init_dim_obs` for the observation type following the instructions in the template
    2212191.      Adapt `obs_op` for the observation type
     
    229227=== `thisobs%doassim` ===
    230228
    231 Set this variable to 1 to let the filter assimilate this observation. The setting is usually conditional on the value of `assim_TYPE` which is set in `init_pdaf`:
    232 {{{
    233    IF (assim_TYPE) thisobs%doassim = 1
     229Set this variable to 1 to let the filter assimilate this observation. The setting is usually conditional on the value of `assim_OBSTYPE` which is set in `init_pdaf`:
     230{{{
     231   IF (assim_OBSTYPE) thisobs%doassim = 1
    234232}}}
    235233