pyPDAF.PDAFomi.set_id_obs_p

pyPDAF.PDAFomi.set_id_obs_p()

Setting the id_obs_p attribute of obs_f for i-th observation type. This is a mandatory property for OMI functionality.

The function is typically used in user-supplied function py__init_dim_obs_pdaf.

Here, id_obs_p(nrows, dim_obs_p) is a 2D array of integers. The value of nrows depends on the observation operator used for an observation.

Examples:

  • nrows=1: observations are located on model grid point. In this case, id_obs_p stores the index of the state vector (starting from 1) corresponds to the observations, e.g. id_obs_p[0, j] = i means that the location and variable of the i-th element of the state vector is the same as the j-th observation.

  • nrows=4: each observation corresponds to 4 indices of elements in the state vector. In this case, the location of these elements is used to perform bi-linear interpolation from model grid to observation location. For interpolation, this information is used in the pyPDAF.PDAF.omi_obs_op_interp_lin() functions. This information can also be used to perform a state vector averaging operator as observation operator in pyPDAF.PDAFomi.obs_op_gridavg() When interpolation is needed, the weighting of the interpolation is done in the pyPDAF.PDAFomi.get_interp_coeff_lin(), pyPDAF.PDAFomi.get_interp_coeff_lin1D(), and pyPDAF.PDAFomi.get_interp_coeff_tri() functions. The details of interpolation setup can be found at PDAF wiki page.

Parameters:
  • i_obs (int) – index of observations

  • nrows (int) – number of state vector used to interpolate to one observation location

  • dim_obs_p (int) – dimension of PE local obs vector

  • id_obs_p (ndarray[tuple[nrows, dim_obs_p, ...], np.intc]) – indice corresponds to observations in the state vector The 1st-th dimension nrows is number of values to be averaged or used for interpolation The 2nd-th dimension dim_obs_p is dimension of PE local obs