# Changes between Version 1 and Version 2 of OMI_observation_operators

Ignore:
Timestamp:
Nov 23, 2020, 4:57:08 PM (3 years ago)
Comment:

--

Unmodified
Removed
Modified
• ## OMI_observation_operators

 v1 An 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`. === PDAFomi_get_interp_coeff_lin === This routine computes interpolation coefficients for a rectangular grid in 1, 2, or 3 dimensions. The call to this routine is CALL PDAFomi_get_interp_coeff_lin(num_gp, n_dim, gcoords, ocoord, icoeff) INTEGER, INTENT(in) :: num_gp         !< Length of thisobs%icoeff_p(:,i) INTEGER, INTENT(in) :: n_dim          !< Number of dimensions in interpolation REAL, INTENT(in)    :: gcoords(:,:)   !< Coordinates of grid points REAL, INTENT(in)    :: ocoord(:)      !< Coordinates of observation (one column ocoord_p(:,i)) REAL, INTENT(inout) :: icoeff(:)      !< Interpolation coefficients (one column thisobs%icoeff_p(:,i)) INTEGER, INTENT(in) :: num_gp         ! Length of thisobs%icoeff_p(:,i) INTEGER, INTENT(in) :: n_dim          ! Number of dimensions in interpolation REAL, INTENT(in)    :: gcoords(:,:)   ! Coordinates of grid points REAL, INTENT(in)    :: ocoord(:)      ! Coordinates of observation (one column ocoord_p(:,i)) REAL, INTENT(inout) :: icoeff(:)      ! Interpolation coefficients (one column thisobs%icoeff_p(:,i)) }}} Here 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. In 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. In the array `gcoords`, 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. `ocoord_p(:,i)` holds the list of the coordinates for the observation with index i. `ocoord_p(:,i)` holds the list of the coordinates for the observation with index i The order of the coordinates and coefficients is the following: === PDAFomi_get_interp_coeff_lin1D === This routine is a simplified variant of `PDAFomi_get_interp_coeff_lin`. It computes interpolation coefficients in 1 dimension only The call to this routine is {{{ CALL PDAFomi_get_interp_coeff_lin1D(gcoords, ocoord, icoeff) REAL, INTENT(in)    :: gcoords(:)  ! Coordinates of grid points; dim=2 REAL, INTENT(in)    :: ocoord      ! Coordinates of observation REAL, INTENT(inout) :: icoeff(:)   ! Interpolation coefficients; dim=2 }}} === PDAFomi_get_interp_coeff_tri === For triangular model grid interpolation coefficients are determined as barycentric coordinates. This is performed in this routine. The call to this routine is {{{ CALL PDAFomi_get_interp_coeff_tri(gcoords, ocoord, icoeff) REAL, INTENT(in)    :: gcoords(:)      ! Coordinates of grid points; dim=(3,2) REAL, INTENT(in)    :: ocoord(:)       ! Coordinates of observation; dim=2 REAL, INTENT(inout) :: icoeff(:)       ! Interpolation coefficients; dim=3 }}} '''Notes:''' - In the array `gcoords`, 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 order of the grid points in `gcoords` has to be consistent with the order of the indices specified in `thisobs%id_obs_p` I