climepi.ClimEpiDatasetAccessor.sel_geo

climepi.ClimEpiDatasetAccessor.sel_geo#

ClimEpiDatasetAccessor.sel_geo(location, **kwargs)#

Get data for the nearest grid point(s) to a specified location(s).

Obtains the latitude and longitude co-ordinates of a specified location using geopy’s Nominatim geocoder, and returns a new dataset containing the data for the nearest grid point.

Uses OpenStreetMap data (https://openstreetmap.org/copyright).

Parameters:
  • location (str or list of str) – Name(s) of the location(s) to select.

  • **kwargs (dict, optional) – Additional keyword arguments to pass to the geocode method of the Nominatim geocoder.

Returns:

xarray.Dataset – A new dataset containing the data for the specified location.