rcatool.utils.polygons.find_geo_indices
- rcatool.utils.polygons.find_geo_indices(lons, lats, x, y)[source]
Search for nearest decimal degree in an array of decimal degrees and return the index. np.argmin returns the indices of minimum value along an axis. Subtract dd from all values in dd_array, take absolute value and find index of minimum.
- Parameters:
lons/lats (1D/2D numpy array) – Latitude and longitude values defining the grid.
x (int/float) – Coordinates of searched for data point
y (int/float) – Coordinates of searched for data point
- Returns:
lat_idx/lon_idx – The latitude and longitude indices where closest to searched data point.
- Return type:
ints