ILAMB.ilamblib.NearestNeighborInterpolation

ILAMB.ilamblib.NearestNeighborInterpolation(lat1, lon1, data1, lat2, lon2)[source]

Interpolates globally grided data at another resolution

Parameters
  • lat1 (numpy.ndarray) – a 1D array of latitudes of cell centroids corresponding to the source data

  • lon1 (numpy.ndarray) – a 1D array of longitudes of cell centroids corresponding to the source data

  • data1 (numpy.ndarray) – an array of data to be interpolated of shape = (lat1.size,lon1.size,…)

  • lat2 (numpy.ndarray) – a 1D array of latitudes of cell centroids corresponding to the target resolution

  • lon2 (numpy.ndarray) – a 1D array of longitudes of cell centroids corresponding to the target resolution

Returns

data2 – an array of interpolated data of shape = (lat2.size,lon2.size,…)

Return type

numpy.ndarray