Changes between Version 10 and Version 11 of OMI_observation_modules


Ignore:
Timestamp:
Nov 24, 2020, 5:28:49 PM (3 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OMI_observation_modules

    v10 v11  
    2929Each obs-module contains four routines:
    3030
    31  - init_dim_obs 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).
    32  - 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.
    33  - 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.
    34  - localize_covar calls a PDAF-OMI routine to apply covariance localization. One can set localization parameters, like the localization radius, for each observation type.
     31 - `init_dim_obs` 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).
     32 - `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.
     33 - `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.
     34 - `localize_covar` calls a PDAF-OMI routine to apply covariance localization. One can set localization parameters, like the localization radius, for each observation type.
    3535
    3636The 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.
    3737
    3838In 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.
     39
     40'''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 initializations by itself.
    3941
    4042== Data type obs_f ==
     
    9698 1. `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)
    9799
    98 When the observation operator performs interpolation, one further needs to initialize an array of interpolation coefficients (`thisobs%icoeff_p`).
     100When the observation operator performs interpolation, one further needs to initialize an array of interpolation coefficients (`thisobs%icoeff_p`). For Cartesian distance computation with periodicity one also needs to set `thisobs%domainsize`.
    99101
    100102When 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.
     
    1761781.      Adapt localize_covar for the observation type (if using a the local EnKF)
    1771791.      Add subroutine calls for the new observation type into the routines in callback_obs_pdafomi.F90
     180
     181
     182== Implementation hints for init_dim_obs_f ==
     183
     184=== `thisobs%doassim` ===
     185
     186Set 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`:
     187{{{
     188   IF (assim_TYPE) thisobs%doassim = 1
     189}}}
     190
     191=== `thisobs%ncoord` ===
     192
     193This variable specifies the dimension of the distnace computations. Thus thisobs%ncoord=2 will lead to distance computations in 2 dimensions.
     194
     195
     196=== `thisobs%disttype` ===
     197
     198This variable specifies the type of distance computation. Possible choices are
     199 - 0: Cartesian distance in ncoord dimension
     200 - 1: Cartesian distance in ncoord dimensions with periodicity (Needs specification of thisobs%domainsize(ncoord))
     201 - 2: Approximate geographic distance in meters with horizontal coordinates in radians (latitude: -pi/2 to +pi/2; longitude -pi/+pi or 0 to 2pi)
     202 - 3: Geographic distance computation in meters using haversine formula with horizontal coordinates in radians (latitude: -pi/2 to +pi/2; longitude -pi/+pi or 0 to 2pi)
     203
     204For 0 and 1 any distance unit can be used. The computed distance will be in the same unit. For 2 and 3 the input coordinates are in radians and the distance is computed in meters.
     205
     206See `/models/lorenz96_omi/` for an example using case 1 with periodicity in one dimension.
     207
     208=== `thisobs%domainsize` ===
     209
     210This array has to be allocated as
     211{{{
     212   ALLOCATE(thisobs%domainsize(thisobs%ncoord))
     213}}}
     214Here one has to specify the size of the domain in each of its thisobs%ncoord dimensions. The information is used to compute the Cartesian distance with periodicity.
     215
     216Setting one dimension to 0 or a negative value indicates that there is no periodicity in this direction.
     217
     218
     219=== `thisobs%id_obs_p` ===
     220
     221This array is allocated as
     222{{{
     223   ALLOCATE(thisobs%id_obs_p(NROWS, dim_obs_p))
     224}}}
     225For a fixed value of the second index the NROWS are the indices of the elements of the state vector that are treated in the observation operator.
     226The value of NROWS depends on the observation operator used for an observation. Examples:
     227 - Using observations that are grid points values:
     228   - NROWS=1
     229   - The entry is the index of a single element of the state vector
     230 - Using observations that are determined by bi-linear interpolation of 4 grid points:
     231   - NROWS=4
     232   - The entries are the indices of four elements of the state vector
     233
     234
     235=== `thisobs%icoeff_p` ===
     236
     237This array is allocate the in same way as `thisobs%id_obs_p`:
     238
     239{{{
     240   ALLOCATE(thisobs%icoeff_p(NROWS, dim_obs_p))
     241}}}
     242The value of NROWS has to be the same as for `thisobs%id_obs_p`. For a fixed value of the second index the NROWS of the array hold the interpolation coefficients corresponding to the indices specified in `thisobs%id_obs_p`.
     243
     244Please see the [wiki:OMI_observation_operators documentation of OMI observation operators] for information on how to initialize the array `thisobs%icoeff_p` using functions provided by PDAF-OMI.
     245
     246
     247=== `thisobs%obs_err_type` ===
     248
     249The particle filter methods NETF, LNETF and PF can handle observations with non-Gaussian errors. PDAF-OMI supports the following two choices:
     250 - 0: Gaussian errors (''default value'')
     251 - 1: double-exponential (Laplace) errors
     252
     253
     254=== `thisobs%use_global_obs` ===
     255
     256
     257
     258