Changes between Initial Version and Version 1 of OMI_observation_operators


Ignore:
Timestamp:
Nov 23, 2020, 4:30:08 PM (4 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OMI_observation_operators

    v1 v1  
     1= PDAF-OMI Observation Operators =
     2
     3[[PageOutline(2-3,Contents of this page)]]
     4
     5The observation operator is called for each observation type in the routine `obs_op_pdafomi` in the file `callback_obs_pdafomi.F90`.
     6
     7OMI currently provides 3 observation operators:
     8 - '''PDAFomi_obs_op_gridpoint'''[[br]]
     9  This observation operator is used for the case that observations are model variables located at grid points. Thus, the operation is to select single element from the state vector according to the index array `thisobs%id_obs_p` initialized in `init_dim_obs_f_TYPE`.
     10 - '''PDAFomi_obs_op_gridavg'''[[br]]
     11  This observation operator is used for the case that observations are the average of model variables at grid points. The averages are computed according to the number of rows in the index array `thisobs%id_obs_p` initialized in `init_dim_obs_f_TYPE`.
     12 - '''PDAFomi_obs_op_interp_lin'''[[br]]
     13  This observation operator computes the observation by linear interpolation. It uses the index array `thisobs%id_obs_p` and the array `thisobs%icoeff_p` holding interpolation coefficients initialized in `init_dim_obs_f_TYPE`. To use this observation operator, one has to allocate and initialize `thisobs%icoeff_p` as described below.
     14
     15The arguments of the observation operators are
     16{{{
     17       CALL PDAFomi_obs_op_X (thisobs,[nrows,] state_p, ostate)
     18}}}
     19Where `thisobs` is the observation type variable, `state_p` is the input state vector provided by PDAF and `ostate` is the observed state that will be returned to PDAF. `nrows` only exists for the observation operators X=gridavg and X=interp_lin and specifies the number of grid points involved in the observation operation. For X=gridpoint, this argument does not exist.
     20
     21
     22== Initializing interpolation coefficients ==
     23
     24The observation operator `PDAFomi_obs_op_interp_lin` requires that the interpolation coefficients have been initialized in the array `thisobs%icoeff_p`. This initialization is performed in `init_dim_obs_TYPE`. PDAF-OMI provides three routines for this task:
     25 - '''PDAFomi_get_interp_coeff_lin1D'''[[br]]
     26 Simplified initialization for 1-dimensional models
     27 - '''PDAFomi_get_interp_coeff_lin'''[[br]]
     28 Determine interpolation coefficients based on the coordinates of grid points and the observation for a rectangular grid in 1, 2, or 3 dimensions.
     29 - '''PDAFomi_get_interp_coeff_tri'''[[br]]
     30 Determine barycentric interpolation coefficients for triangular grids based on the coordinates of grid points and the observation
     31
     32An example of initializing interpolation coefficients with PDAFomi_get_interp_coeff_lin and of using PDAFomi_obs_op_interp_lin is provided in `tutorial/online_2D_serialmodel_omi/obs_C_pdafomi.F90`.
     33
     34=== PDAFomi_get_interp_coeff_lin ===
     35 
     36
     37The call to this routine is
     38{{{
     39  CALL PDAFomi_get_interp_coeff_lin(num_gp, n_dim, gcoords, ocoord, icoeff)
     40
     41    INTEGER, INTENT(in) :: num_gp         !< Length of thisobs%icoeff_p(:,i)
     42    INTEGER, INTENT(in) :: n_dim          !< Number of dimensions in interpolation
     43    REAL, INTENT(in)    :: gcoords(:,:)   !< Coordinates of grid points
     44    REAL, INTENT(in)    :: ocoord(:)      !< Coordinates of observation (one column ocoord_p(:,i))
     45    REAL, INTENT(inout) :: icoeff(:)      !< Interpolation coefficients (one column thisobs%icoeff_p(:,i))
     46
     47}}}
     48Here it is required that num_gp=2 for n_dim=1; num_gp=4 for n_dim=2; num_gp=8 for n_dim=3.
     49
     50In the array `gcoords` in init_dim_obs_TYPE, the first index specifies the grid point while the second specifies the coordinate, thus gcoords(j,:) is the list of coordinates for grid point j. The coordinates need to be consistent with the indices specified in `thisobs%id_obs_p` since these specify the elements of the state vector that are interpolated. Only the first `n_dim` entries of ocoord will be used for the interpolation.
     51
     52`ocoord_p(:,i)` holds the list of the coordinates for the observation with index i.
     53
     54The order of the coordinates and coefficients is the following:
     55{{{
     56                       (7)------(8)
     57                       /|       /|    with
     58                     (5)+-----(6)|       - column 1
     59                      | |      | |       / column 2
     60                      |(3)-----+(4)      | column 3
     61                      |/       |/
     62                     (1) ---- (2)
     63
     64   thus gcoords(1,1)/=gcoords(2,1),        but  gcoords(1,1)=gcoords(3,1)=gcoords(5,1),
     65        gcoords(1,2)/=gcoords(3,2),             gcoords(1,2)=gcoords(2,2)=gcoords(5,2),
     66        gcoords(1,3)/=gcoords(5,3)              gcoords(1,3)=gcoords(2,3)=gcoords(3,3)
     67}}}
     68
     69'''Notes:'''
     70 - For 1D linear interpolation (n_dim=1) only the coordinates for grid points 1 and 2 are used to compute the coefficients
     71 - For bi-linear interpolation (n_dim=2) only the coordinates for grid points 1, 2, and 3 are used to compute the coefficients
     72 - For tri-linear interpolation (n_dim=3) only the coordinates for grid points 1, 2, 3, and 5 are used to compute the coefficients
     73
     74