improver.regrid.idw module
Inverse distance weighting interpolation functions
- ecef_coords(lats, lons)[source]
Transform latitude-longitude coordinates to earth centred, earth fixed cartesian XYZ coordinates.
- inverse_distance_weighting(idw_out_indexes, in_latlons, out_latlons, indexes, weights, in_classified, out_classified)[source]
Locating source points and calculating inverse distance weights for selective target points.
- Parameters:
idw_out_indexes (
ndarray
) – Selected target points which will use Inverse Distance Weighting(idw) approach.in_latlons (
ndarray
) – Source points’s latitude-longitudes.out_latlons (
ndarray
) – Target points’s latitude-longitudes.indexes (
ndarray
) – Array of source grid point number for all target grid points.weights (
ndarray
) – Array of source grid point weighting for all target grid points.in_classified (
ndarray
) – Land_sea type for source grid points (land ->True).out_classified (
ndarray
) – Land_sea type for target grid points (land ->True).
- Return type:
- Returns:
Updated Indexes - source grid point number for all target grid points.
Updated weights - array from each target grid point to its source grid points.
Output_points_no_match - special target points without matching source points.