pyPDAF.PDAF.omi_set_id_obs_p¶
- pyPDAF.PDAF.omi_set_id_obs_p()¶
Setting the id_obs_p attribute of obs_f.
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. This information is used in the
pyPDAF.PDAF.omi_obs_op_gridavg()
andpyPDAF.PDAF.omi_obs_op_interp_lin()
functions. When interpolation is needed, the weighting of the interpolation is done in thepyPDAF.PDAF.omi_get_interp_coeff_lin()
,pyPDAF.PDAF.omi_get_interp_coeff_lin1D()
, andpyPDAF.PDAF.omi_get_interp_coeff_tri()
functions. The details of interpolation setup can be found at PDAF wiki page.
- Parameters:
i_obs (int) – index of observations
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