Changes between Version 27 and Version 28 of OMI_observation_modules
- Timestamp:
- Dec 17, 2021, 4:24:21 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OMI_observation_modules
v27 v28 39 39 Each obs-module contains four routines (where 'TYPE' will be replaced by the name of the observation): 40 40 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 46 The 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 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_OBSTYPE as a flag to control whether the observation type should be assimilated. 49 49 50 50 '''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. 51 51 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 54 52 == Data type obs_f == 55 53 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`.54 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_OBSTYPE_pdafomi_TEMPLATE.F90` shows the different steps needed to initialize `thisobs`. 57 55 58 56 The '''mandatory variables''' in `obs_f` that need to be set by the user are: … … 91 89 Next 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`. 92 90 93 == `init_dim_obs_ TYPE` ==91 == `init_dim_obs_OBSTYPE` == 94 92 95 93 This is the main routine to initialize observation information. 96 94 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. =|| 98 96 99 97 Each observation module uses the generic name '''thisobs''' for the variable with observation type `obs_f`. Elements of `thisobs` are accessed like … … 126 124 127 125 128 == `obs_op_ TYPE` ==126 == `obs_op_OBSTYPE` == 129 127 130 128 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. … … 140 138 141 139 142 == `init_dim_obs_l_ TYPE` ==140 == `init_dim_obs_l_OBSTYPE` == 143 141 144 142 This routine initializes local observation information. The routine is only used by the domain-localized filters (LESTKF, LETKF, LSEIK, LNETF). … … 161 159 162 160 163 == `localize_covar_ TYPE` ==161 == `localize_covar_OBSTYPE` == 164 162 165 163 This routine initializes local observation information. The routine is only used by the local EnKF (LEnKF). … … 184 182 For the 3D-Var methods added with PDAF V2.0 two more routines are required in the observation module. 185 183 186 === `obs_op_lin_ TYPE` ===184 === `obs_op_lin_OBSTYPE` === 187 185 188 186 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. 189 187 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`. 191 189 192 190 PDAF-OMI provides several linear observation operators. For example the observation operator for observations that are grid point values is called as: … … 199 197 For 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]. 200 198 201 === `obs_op_adj_ TYPE` ===199 === `obs_op_adj_OBSTYPE` === 202 200 203 201 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. … … 216 214 217 215 To 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).216 1. Create a copy of `obs_OBSTYPE_pdafomi_TEMPLATE.F90` 217 1. Rename the module and its subroutines according to the observation (replacing ‘OBSTYPE’ by name of observation). 220 218 1. Implement `init_dim_obs` for the observation type following the instructions in the template 221 219 1. Adapt `obs_op` for the observation type … … 229 227 === `thisobs%doassim` === 230 228 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 = 1229 Set 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 234 232 }}} 235 233