pyPDAF.PDAFomi.get_interp_coeff_lin_vec

pyPDAF.PDAFomi.get_interp_coeff_lin_vec()

get_interp_coeff_lin(num_gp: int, n_dim: int, gpc: np.ndarray, oc: np.ndarray, icoeff: np.ndarray) -> np.ndarray

The coefficient for linear interpolation up to 3D.

The resulting coefficient is used in pyPDAF.PDAFomi.obs_op_interp_lin().

See introduction in relevant PDAF-OMI wiki page

This is similar to pyPDAF.PDAFomi.get_interp_coeff_lin(), but it embeds the loop in Fortran to avoid loops in Python so that one use a vector of observations.

Parameters:
  • gpc (ndarray[tuple[num_gp, n_dim, nobs], np.float64]) – Coordinates of grid points The order of the grid points in gcoords has to be consistent with the order of the indices specified in id_obs_p of obs_f. The 1st-th dimension num_gp is Length of icoeff The 2nd-th dimension n_dim is Number of dimensions in interpolation The 3rd-th dimension nobs is Number of observations

  • oc (ndarray[tuple[n_dim, nobs], np.float64]) – Coordinates of observation The array dimension n_dim is Number of dimensions in interpolation nobs is Number of observations

  • icoeff (ndarray[tuple[num_gp, nobs], np.float64]) – Interpolation coefficients (num_gp, nobs) The array dimension num_gp is Length of icoeff The 2nd-th dimension nobs is Number of observations

Returns:

icoeff – Interpolation coefficients (num_gp, nobs)

The array dimension num_gp is Length of icoeff The 2nd-th dimension nobs is Number of observations

Return type:

ndarray[tuple[num_gp, nobs], np.float64]