Changes between Version 7 and Version 8 of OMI_observation_modules_PDAF3


Ignore:
Timestamp:
Jun 4, 2025, 2:57:49 PM (44 hours ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OMI_observation_modules_PDAF3

    v7 v8  
    4343'''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.
    4444
    45 == Data type obs_f ==
     45== Data type `obs_f` ==
    4646
    4747To 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`.
     
    8585Next 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`.
    8686
    87 == `init_dim_obs_OBSTYPE` ==
     87== Required routines ==
     88
     89=== `init_dim_obs_OBSTYPE` ===
    8890
    8991This is the main routine to initialize observation information. In addition, this routine is used to initialize information for covariance localization in the LEnKF, EnSRF and EAKF methods.
    9092
    91 ||= Please see the template file `templates/omi/obs_OBSTYPE_pdafomi_TEMPLATE.F90`[[br]] for a step-by-step description of the implementation steps. =||
     93|| Please see the template file `templates/omi/obs_OBSTYPE_pdafomi_TEMPLATE.F90`[[br]] for a step-by-step description of the implementation steps. ||
     94
     95The operations in this routine are three parts
     96 1. Initialize variables to initialize an observation type in PDAF-OMI
     97 1. Call `PDAFomi_gather_obs` to initialize the observation type in PDAF-OMI
     98 2. Optionally initialize covariance localization
    9299
    93100Each observation module uses the generic name '''thisobs''' for the variable with observation type `obs_f`. Elements of `thisobs` are accessed like
    94101`thisobs%doassim`.
    95102
     103**1. Initialize variables **
     104
    96105The main variables that the filled in this routine are
    97  1. [wiki:OMI_observation_modules_PDAF3#thisobsdoassim thisobs%doassim]: Specify whether this observation type is assimilated
    98  1. [wiki:OMI_observation_modules_PDAF3#thisobsdisttype thisobs%disttype]: Specify the type of distance computation
    99  1. [wiki:OMI_observation_modules_PDAF3#thisobsncoord thisobs%ncoord]: Specify the number of dimensions used to compute distances
    100  1. [wiki:OMI_observation_modules_PDAF3#dim_obs_p dim_obs_p]: Count the number of available observations
    101  1. [wiki:OMI_observation_modules_PDAF3#obs_p obs_p]: Fill the vector of observations
    102  1. [wiki:OMI_observation_modules_PDAF3#ocoord_p ocoord_p]: store the coordinates of the observations (only actually used in case of localization)
    103  1. [wiki:OMI_observation_modules_PDAF3#ivar_obs_p ivar_obs_p]: store the inverse error variance of each observation for the default mode of OMI, which assumes a diagonal observation error covariance matrix
    104  1. [wiki:OMI_observation_modules_PDAF3#thisobsid_obs_p thisobs%id_obs_p]: store the indices of state vector elements that correspond to an observation (A single value for observation at grid points, or multiple values for derived quantities or interpolation; this is only used in the OMI-provided observation operators)
    105 
    106 When the observation operator performs interpolation, one further needs to initialize an array of interpolation coefficients ([wiki:OMI_observation_modules_PDAF3#thisobsicoeff_p thisobs%icoeff_p]). For Cartesian distance computation with periodicity one also needs to set [wiki:OMI_observation_modules#thisobsdomainsize thisobs%domainsize].
    107 
    108 Here one can also activate the [wiki:OMI_additional_functionality_PDAF3#Omittingobservationsthatarepotentialoutliers omission of observations that are too different from the ensemble mean]. This is activated by setting `thisobs%inno_omit>0.0`
    109 
    110 When parallel model with domain decomposition is used, the variables with suffix `_p` need to describe the observation information for a particular process domain. The following routine will perform the necessary operations to ensure that the parallelization is taken into account by PDAF.
    111 
    112 After these variables are filled, one calls
     106 * [wiki:#thisobsdoassim thisobs%doassim]: Specify whether this observation type is assimilated
     107 * [wiki:#thisobsdisttype thisobs%disttype]: Specify the type of distance computation
     108 * [wiki:#thisobsncoord thisobs%ncoord]: Specify the number of dimensions used to compute distances
     109 * [wiki:#dim_obs_p dim_obs_p]: Count the number of available observations
     110 * [wiki:#obs_p obs_p]: Fill the vector of observations
     111 * [wiki:#ocoord_p ocoord_p]: store the coordinates of the observations (only actually used in case of localization)
     112 * [wiki:#ivar_obs_p ivar_obs_p]: store the inverse error variance of each observation for the default mode of OMI, which assumes a diagonal observation error covariance matrix
     113 * [wiki:#thisobsid_obs_p thisobs%id_obs_p]: store the indices of state vector elements that correspond to an observation (A single value for observation at grid points, or multiple values for derived quantities or interpolation; this is only used in the OMI-provided observation operators)
     114
     115Further possible inittializations:
     116 * When the observation operator performs interpolation, one further needs to initialize an array of interpolation coefficients ([wiki:OMI_observation_modules_PDAF3#thisobsicoeff_p thisobs%icoeff_p]).
     117 * For Cartesian distance computation with periodicity one also needs to set [wiki:OMI_observation_modules#thisobsdomainsize thisobs%domainsize].
     118 * One can also activate the [wiki:OMI_additional_functionality_PDAF3#Omittingobservationsthatarepotentialoutliers omission of observations that are too different from the ensemble mean]. This is activated by setting `thisobs%inno_omit>0.0`
     119
     120When parallel model with domain decomposition is used, the variables with suffix `_p` need to describe the observation information for a particular process sub-domain.
     121
     122** 2. Call PDAFomi_gather_obs**
     123
     124After these variables are filled, one calls the routine `PDAFomi_gather_obs` to initialize an observation type for PDAF-OMI. The routine also performs the necessary operations to ensure that the parallelization is taken into account by PDAF.
     125
     126The routine is called as:
    113127{{{
    114128    CALL PDAFomi_gather_obs(thisobs, dim_obs_p, obs_p, ivar_obs_p, ocoord_p, &
     
    120134
    121135Notes:
    122  * The value is `cradius` is only used if [wiki:OMI_observation_modules_PDAF3#thisobsuse_global_obs thisobs%use_global_obs=0].
    123  * `cradius` is always a single value. It should be set of the largest radius of the directions in which the process domain is split by parallelization. It defines the radius within which observations from neighboring process domains are taken into account.
    124 
    125 === Initializing covariance localization ===
     136 * The value is `cradius` is only used if [wiki:OMI_observation_modules_PDAF3#thisobsuse_global_obs thisobs%use_global_obs=0]. This is the maximum cut-off radius around the process sub-domain.
     137  * `cradius` is always a single value. It should be set of the largest radius of the directions in which the process domain is split by parallelization. It defines the radius within which observations from neighboring process sub-domains are taken into account.
     138
     139** 3. Optionally initialize covariance localization **
     140
     141See section: [wiki:OMI_observation_modules_PDAF3#Initializingcovariancelocalization Initializing covariance localization].
     142
     143=== `obs_op_OBSTYPE` ===
     144
     145This routine applies the observation operator to a state vector. It returns the observed state vector to PDAF. The routine is used by all filters.
     146
     147PDAF-OMI provides several observation operators. For example the observation operator for observations that are grid point values is called as:
     148{{{
     149    CALL PDAFomi_obs_op_gridpoint(thisobs, state_p, ostate)
     150}}}
     151
     152Here, `state_p` is the state vector and `ostate` is the observed state vector.
     153
     154For more information on the available observation operators and on how to implement your own observation operator see the [wiki:OMI_observation_operators_PDAF3 documentation of observation operators for OMI].
     155
     156
     157=== `init_dim_obs_l_OBSTYPE` ===
     158
     159This routine initializes local observation information. The routine is only used by the domain-localized filters (LESTKF, LETKF, LSEIK, LNETF, LKNETF).
     160
     161For the initialization the following routine is called:
     162{{{
     163    CALL PDAFomi_init_dim_obs_l(thisobs_l, thisobs, coords_l, &
     164         locweight, cradius, sradius, dim_obs_l)
     165}}}
     166
     167Here, `thisobs` and `thisobs_l` are the data-type variables `obs_f` and `obs_l`. `dim_obs_l`, the local size of the observation vector, is the direct output of the routine.
     168
     169''Implementation steps:''
     170 - Ensure that `coords_l` is filled in `init_dim_l_pdaf` and that the unit of `coords_l` is the same as that used fo rthe observation coordinates.
     171 - Specify the localization variables (These variables are usually set in `init_pdaf` and included with `use mod_assimilation`)
     172   - `locweight`: Type of localization (see table below)
     173   - `cradius`: The localization radius or directional radii (cut-off radius for the observations, weight is always =0 for distances > cradius)
     174   - `sradius`: The support radius (or directional redii) of the localization weight function
     175Note, that starting with PDAF V2.2.1 these three variables can be either scalar values - for isotropic localization-, or arrays - for non-isotropic localization and for additionally choose separate weights functions for the horizontal and vertical directions (see the notes below for more information)
     176
     177The setting of `locweight` influences the weight function for the localization. The choices are standardized as follows
     178
     179||= '''locweight''' =||= '''0''' =||= '''1''' =||= '''2''' =||= '''3''' =||= '''4''' =||
     180||= function =|| unit weight ||  exponential  ||  5-th order[[BR]]polynomial  ||  5-th order[[BR]]polynomial  ||  5-th order[[BR]]polynomial  ||
     181||= regulation =||  -  ||  -  ||  -  ||  regulation using[[BR]]mean variance  ||  regulation using variance[[BR]]of single observation point  ||
     182||= '''cradius''' =||||||||||||  weight=0 if distance > cradius  ||
     183||= '''sradius''' =||  no impact  ||  weight = exp(-d / sradius)  ||||||||  weight = 0 if d >= sradius[[BR]] else[[BR]] weight = f(sradius, distance)  ||
     184
     185Here, 'regulation' refers to the regulated localization introduced in Nerger, L., Janjić, T., Schröter, J., Hiller, W. (2012). A regulated localization scheme for ensemble-based Kalman filters. Quarterly Journal of the Royal Meteorological Society, 138, 802-812. ​[https://doi.org/10.1002/qj.945 doi:10.1002/qj.945].
     186
     187**Notes:**
     188- **isotropic localization**: If `cradius` and `sradius` are scalar values, the localization is isotropic. Thus, it uses the same `cradius` in all directions. If different localization scales should be applied e.g. in the vertical compared to the horizonal one needs to scale the vertical coordinates.
     189- **non-isotropic localization**: Nonisotropic localization was introduced with PDAF V2.2: `cradius` and `sradius` can be declared as vectors of length `thisobs%ncoords` and each element can get a different value. In this case, the values define a non-isotropic localization according to the values specified in `cradius` and `sradius`. PDAF-OMI will use these values to compute a directional localization radius.
     190- **2D+1D factorized non-isotropic localization**: With PDAF V2.2.1 a factorized 2D+1D localization can be specified (see [wiki:OMI_observation_modules#thisobsdisttype explanation of disttype]. If the non-isotropic localization is used one can specify different weight functions for the vertical and horizontal directions. This is achieved by declaring `loweight` as a vector of size 2. Now the first element specifies the weight function (according to the table above) for the horizontal direction and the second element specified the wieght function for the vertical direction. When 'locweight' is used as a scalar variable, it specified the weight function in the horizontal direction while the weight function in the vertical dircetion is a constant value of one.
     191- A common choice is to use `locweight=2` or `locweight=4` in combination with `cradius=sradius`. Choosing `sradius>cradius` is possible, but `sradius<cradius` should be avoided (one would set the weights of distant observation to zero, but would still assimilate them).
     192
     193== Routine for backward compatibility ==
     194
     195=== `localize_covar_OBSTYPE` ===
     196
     197|| This routine exists for backward compatibility. In PDAF V3.0, we added the routine [wiki:OMI_observation_modules_PDAF3#Initializingcovariancelocalization PDAFomi_set_localize_covar], which was decribed above. When PDAFomi_set_localize_covar is used, the user-provided routine `localize_covar_OBSTYPE` is no longer required. ||
     198
     199This routine initializes local observation information. The routine is only used by the local EnKF (LEnKF).
     200
     201For the initialization the following routine is called:
     202{{{
     203    CALL PDAFomi_localize_covar(thisobs, dim_p, locweight, cradius, sradius, &
     204         coords_p, HP_p, HPH)
     205}}}
     206
     207Here, `thisobs` is the data-type variable `obs_f`. `HP_p` and `HPH` are the covariance matrices projected onto the observations. The localization will be applied to these variables.
     208
     209''Implementation steps:''
     210 - Ensure that `coords_p` is filled in `localize_covar_pdafomi`
     211 - Specify the localization variables (These variables are usually set in `init_pdaf` and included with `use mod_assimilation`)
     212   - `locweight`: Type of localization (see table above)
     213   - `cradius`: The localization radius (cut-off radius for the observations, weight is always =0 for distances > cradius)
     214   - `sradius`: The support radius of the localization weight function
     215Note, that starting with PDAF V2.2.1 these three variables can be either scalar values - for isotropic localization-, or arrays - for non-isotropic localization and for additionally choose separate weights functions for the horizontal and vertical directions (see the notes below for more information)
     216
     217**Notes:**
     218- **isotropic localization**: If `cradius` and `sradius` are scalar values, the localization is isotropic. Thus, it uses the same `cradius` in all directions. If different localization scales should be applied e.g. in the vertical compared to the horizonal one needs to scale the vertical coordinates.
     219- **non-isotropic localization**: Nonisotropic localization was introduced with PDAF V2.2: `cradius` and `sradius` can declared as vectors of length `thisobs%ncoords` and each element can get a different value. In this case, the values defined a non-isotropic localization according to the values specified in `cradius` and `sradius`.
     220- **non-isotropic localization**: Nonisotropic localization was introduced with PDAF V2.2: `cradius` and `sradius` can be declared as vectors of length `thisobs%ncoords` and each element can get a different value. In this case, the values define a non-isotropic localization according to the values specified in `cradius` and `sradius`. PDAF-OMI will use these values to compute a directional localization radius.
     221- **2D+1D factorized non-isotropic localization**: With PDAF V2.2.1 a factorized 2D+1D localization can be specified (see [wiki:OMI_observation_modules#thisobsdisttype explanation of disttype]. If the non-isotropic localization is used one can specify different weight functions for the vertical and horizontal directions. This is achieved by declaring `loweight` as a vector of size 2. Now the first element specifies the weight function (according to the table above) for the horizontal direction and the second element specified the wieght function for the vertical direction. When 'locweight' is used as a scalar variable, it specified the weight function in the horizontal direction while the weight function in the vertical dircetion is a constant value of one.
     222- A common choice for the localization is to use `locweight=2` or `locweight=4` in combination with `cradius=sradius`. Choosing `sradius>cradius` is possible, but `sradius<cradius` should be avoided (one would set the weights of distant observation to zero, but would still assimilate them).
     223- Particular for the LEnKF: When choosing `locweight=1` (exponential decrease) with a finite value of `cradius` if might be that the localized covariance matrices are no longer positive semidefinite. Mathematically consistent for `locweight=1` would be to set `cradius` so that the full model domain is covered. The width of the localization weight function is then defined by `sradius`. For `locweight>1` one should set `cradius=sradius`.
     224
     225== Additional routines for 3D-Var ==
     226
     227For the 3D-Var methods added with PDAF V2.0 two more routines are required in the observation module.
     228
     229=== `obs_op_lin_OBSTYPE` ===
     230
     231This 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.
     232
     233'''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`.
     234
     235PDAF-OMI provides several linear observation operators. For example the observation operator for observations that are grid point values is called as:
     236{{{
     237    CALL PDAFomi_obs_op_gridpoint(thisobs, state_p, ostate)
     238}}}
     239
     240Here, `state_p` is the state vector and `ostate` is the observed state vector.
     241
     242For more information on the available observation operators and on how to implement your own observation operator see the [wiki:OMI_observation_operators_PDAF3 documentation of observation operators for OMI].
     243
     244=== `obs_op_adj_OBSTYPE` ===
     245
     246This 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.
     247
     248PDAF-OMI provides consistent pairs of linear observation operators. For example the adjoint observation operator for observations that are grid point values is called as:
     249{{{
     250    CALL PDAFomi_obs_op_adj_gridpoint(thisobs, ostate, state_p)
     251}}}
     252
     253Here, `ostate` is the observation vector and `state_p` is the state vector.
     254
     255For more information on the available observation operators and on how to implement your own observation operator see the [wiki:OMI_observation_operators_PDAF3 documentation of observation operators for OMI].
     256
     257
     258== Initializing covariance localization ==
    126259
    127260The covariance localization should be initialized in `init_dim_obs_OBSTYPE`. This is achieved by calling `PDAFomi_set_localize_covar`. The routine can only be called after the call to `PDAFomi_gather_obs`.
     
    148281
    149282There is also a variant of this routine for non-isotropic localization. See the [wiki:PDAFomi_set_localize_covar Documentation on PDAFomi_set_localize_covar] for more information.
    150 
    151 == `obs_op_OBSTYPE` ==
    152 
    153 This routine applies the observation operator to a state vector. It returns the observed state vector to PDAF. The routine is used by all filters.
    154 
    155 PDAF-OMI provides several observation operators. For example the observation operator for observations that are grid point values is called as:
    156 {{{
    157     CALL PDAFomi_obs_op_gridpoint(thisobs, state_p, ostate)
    158 }}}
    159 
    160 Here, `state_p` is the state vector and `ostate` is the observed state vector.
    161 
    162 For more information on the available observation operators and on how to implement your own observation operator see the [wiki:OMI_observation_operators_PDAF3 documentation of observation operators for OMI].
    163 
    164 
    165 == `init_dim_obs_l_OBSTYPE` ==
    166 
    167 This routine initializes local observation information. The routine is only used by the domain-localized filters (LESTKF, LETKF, LSEIK, LNETF, LKNETF).
    168 
    169 For the initialization the following routine is called:
    170 {{{
    171     CALL PDAFomi_init_dim_obs_l(thisobs_l, thisobs, coords_l, &
    172          locweight, cradius, sradius, dim_obs_l)
    173 }}}
    174 
    175 Here, `thisobs` and `thisobs_l` are the data-type variables `obs_f` and `obs_l`. `dim_obs_l`, the local size of the observation vector, is the direct output of the routine.
    176 
    177 ''Implementation steps:''
    178  - Ensure that `coords_l` is filled in `init_dim_l_pdaf` and that the unit of `coords_l` is the same as that used fo rthe observation coordinates.
    179  - Specify the localization variables (These variables are usually set in `init_pdaf` and included with `use mod_assimilation`)
    180    - `locweight`: Type of localization (see table below)
    181    - `cradius`: The localization radius or directional radii (cut-off radius for the observations, weight is always =0 for distances > cradius)
    182    - `sradius`: The support radius (or directional redii) of the localization weight function
    183 Note, that starting with PDAF V2.2.1 these three variables can be either scalar values - for isotropic localization-, or arrays - for non-isotropic localization and for additionally choose separate weights functions for the horizontal and vertical directions (see the notes below for more information)
    184 
    185 The setting of `locweight` influences the weight function for the localization. The choices are standardized as follows
    186 
    187 ||= '''locweight''' =||= '''0''' =||= '''1''' =||= '''2''' =||= '''3''' =||= '''4''' =||
    188 ||= function =|| unit weight ||  exponential  ||  5-th order[[BR]]polynomial  ||  5-th order[[BR]]polynomial  ||  5-th order[[BR]]polynomial  ||
    189 ||= regulation =||  -  ||  -  ||  -  ||  regulation using[[BR]]mean variance  ||  regulation using variance[[BR]]of single observation point  ||
    190 ||= '''cradius''' =||||||||||||  weight=0 if distance > cradius  ||
    191 ||= '''sradius''' =||  no impact  ||  weight = exp(-d / sradius)  ||||||||  weight = 0 if d >= sradius[[BR]] else[[BR]] weight = f(sradius, distance)  ||
    192 
    193 Here, 'regulation' refers to the regulated localization introduced in Nerger, L., Janjić, T., Schröter, J., Hiller, W. (2012). A regulated localization scheme for ensemble-based Kalman filters. Quarterly Journal of the Royal Meteorological Society, 138, 802-812. ​[https://doi.org/10.1002/qj.945 doi:10.1002/qj.945].
    194 
    195 **Notes:**
    196 - **isotropic localization**: If `cradius` and `sradius` are scalar values, the localization is isotropic. Thus, it uses the same `cradius` in all directions. If different localization scales should be applied e.g. in the vertical compared to the horizonal one needs to scale the vertical coordinates.
    197 - **non-isotropic localization**: Nonisotropic localization was introduced with PDAF V2.2: `cradius` and `sradius` can be declared as vectors of length `thisobs%ncoords` and each element can get a different value. In this case, the values define a non-isotropic localization according to the values specified in `cradius` and `sradius`. PDAF-OMI will use these values to compute a directional localization radius.
    198 - **2D+1D factorized non-isotropic localization**: With PDAF V2.2.1 a factorized 2D+1D localization can be specified (see [wiki:OMI_observation_modules#thisobsdisttype explanation of disttype]. If the non-isotropic localization is used one can specify different weight functions for the vertical and horizontal directions. This is achieved by declaring `loweight` as a vector of size 2. Now the first element specifies the weight function (according to the table above) for the horizontal direction and the second element specified the wieght function for the vertical direction. When 'locweight' is used as a scalar variable, it specified the weight function in the horizontal direction while the weight function in the vertical dircetion is a constant value of one.
    199 - A common choice is to use `locweight=2` or `locweight=4` in combination with `cradius=sradius`. Choosing `sradius>cradius` is possible, but `sradius<cradius` should be avoided (one would set the weights of distant observation to zero, but would still assimilate them).
    200 
    201 == `localize_covar_OBSTYPE` ==
    202 
    203 || This routine exists for backward compatibility. In PDAF V3.0, we added the routine [wiki:OMI_observation_modules_PDAF3#Initializingcovariancelocalization PDAFomi_set_localize_covar], which was decribed above. When PDAFomi_set_localize_covar is used, the user-provided routine `localize_covar_OBSTYPE` is no longer required. ||
    204 
    205 This routine initializes local observation information. The routine is only used by the local EnKF (LEnKF).
    206 
    207 For the initialization the following routine is called:
    208 {{{
    209     CALL PDAFomi_localize_covar(thisobs, dim_p, locweight, cradius, sradius, &
    210          coords_p, HP_p, HPH)
    211 }}}
    212 
    213 Here, `thisobs` is the data-type variable `obs_f`. `HP_p` and `HPH` are the covariance matrices projected onto the observations. The localization will be applied to these variables.
    214 
    215 ''Implementation steps:''
    216  - Ensure that `coords_p` is filled in `localize_covar_pdafomi`
    217  - Specify the localization variables (These variables are usually set in `init_pdaf` and included with `use mod_assimilation`)
    218    - `locweight`: Type of localization (see table above)
    219    - `cradius`: The localization radius (cut-off radius for the observations, weight is always =0 for distances > cradius)
    220    - `sradius`: The support radius of the localization weight function
    221 Note, that starting with PDAF V2.2.1 these three variables can be either scalar values - for isotropic localization-, or arrays - for non-isotropic localization and for additionally choose separate weights functions for the horizontal and vertical directions (see the notes below for more information)
    222 
    223 **Notes:**
    224 - **isotropic localization**: If `cradius` and `sradius` are scalar values, the localization is isotropic. Thus, it uses the same `cradius` in all directions. If different localization scales should be applied e.g. in the vertical compared to the horizonal one needs to scale the vertical coordinates.
    225 - **non-isotropic localization**: Nonisotropic localization was introduced with PDAF V2.2: `cradius` and `sradius` can declared as vectors of length `thisobs%ncoords` and each element can get a different value. In this case, the values defined a non-isotropic localization according to the values specified in `cradius` and `sradius`.
    226 - **non-isotropic localization**: Nonisotropic localization was introduced with PDAF V2.2: `cradius` and `sradius` can be declared as vectors of length `thisobs%ncoords` and each element can get a different value. In this case, the values define a non-isotropic localization according to the values specified in `cradius` and `sradius`. PDAF-OMI will use these values to compute a directional localization radius.
    227 - **2D+1D factorized non-isotropic localization**: With PDAF V2.2.1 a factorized 2D+1D localization can be specified (see [wiki:OMI_observation_modules#thisobsdisttype explanation of disttype]. If the non-isotropic localization is used one can specify different weight functions for the vertical and horizontal directions. This is achieved by declaring `loweight` as a vector of size 2. Now the first element specifies the weight function (according to the table above) for the horizontal direction and the second element specified the wieght function for the vertical direction. When 'locweight' is used as a scalar variable, it specified the weight function in the horizontal direction while the weight function in the vertical dircetion is a constant value of one.
    228 - A common choice for the localization is to use `locweight=2` or `locweight=4` in combination with `cradius=sradius`. Choosing `sradius>cradius` is possible, but `sradius<cradius` should be avoided (one would set the weights of distant observation to zero, but would still assimilate them).
    229 - Particular for the LEnKF: When choosing `locweight=1` (exponential decrease) with a finite value of `cradius` if might be that the localized covariance matrices are no longer positive semidefinite. Mathematically consistent for `locweight=1` would be to set `cradius` so that the full model domain is covered. The width of the localization weight function is then defined by `sradius`. For `locweight>1` one should set `cradius=sradius`.
    230 
    231 == Additional routines for 3D-Var ==
    232 
    233 For the 3D-Var methods added with PDAF V2.0 two more routines are required in the observation module.
    234 
    235 === `obs_op_lin_OBSTYPE` ===
    236 
    237 This 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.
    238 
    239 '''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`.
    240 
    241 PDAF-OMI provides several linear observation operators. For example the observation operator for observations that are grid point values is called as:
    242 {{{
    243     CALL PDAFomi_obs_op_gridpoint(thisobs, state_p, ostate)
    244 }}}
    245 
    246 Here, `state_p` is the state vector and `ostate` is the observed state vector.
    247 
    248 For more information on the available observation operators and on how to implement your own observation operator see the [wiki:OMI_observation_operators_PDAF3 documentation of observation operators for OMI].
    249 
    250 === `obs_op_adj_OBSTYPE` ===
    251 
    252 This 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.
    253 
    254 PDAF-OMI provides consistent pairs of linear observation operators. For example the adjoint observation operator for observations that are grid point values is called as:
    255 {{{
    256     CALL PDAFomi_obs_op_adj_gridpoint(thisobs, ostate, state_p)
    257 }}}
    258 
    259 Here, `ostate` is the observation vector and `state_p` is the state vector.
    260 
    261 For more information on the available observation operators and on how to implement your own observation operator see the [wiki:OMI_observation_operators_PDAF3 documentation of observation operators for OMI].
    262283
    263284