pyPDAF.PDAFomi.get_interp_coeff_tri_vec

pyPDAF.PDAFomi.get_interp_coeff_tri_vec()

get_interp_coeff_tri(gpc: np.ndarray, oc: np.ndarray, icoeff: np.ndarray) -> np.ndarray

The coefficient for linear interpolation in 2D on unstructure triangular grid.

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

This function is for triangular model grid interpolation coefficients determined as barycentric coordinates.

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

Parameters:
  • gpc (ndarray[tuple[3, 2, nobs], np.float64]) – Coordinates of grid points with dimension of (3, 2, nobs). 3 grid points surrounding the observation; each containing lon and lat coordinates. 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 last dimension nobs is the number of observations.

  • oc (ndarray[tuple[2, nobs], np.float64]) – Coordinates of observation (targeted location); dim(2, nobs)

  • icoeff (ndarray[tuple[3, nobs], np.float64]) – Interpolation coefficients; dim(3, nobs)

Returns:

icoeff – Interpolation coefficients; dim(3, nobs)

Return type:

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