Extract time series at lon,lat location using Xarray

In [1]:
%matplotlib inline
import xarray as xr
In [2]:
fname = 'http://thredds.ucar.edu/thredds/dodsC/grib/NCEP/GFS/Global_onedeg/Best'  # Remote OPeNDAP Dataset 
#fname = 'my_raster_time_series_data.nc'   # Local NetCDF file
In [3]:
ds = xr.open_dataset(fname)
dsloc = ds.sel(lon=230.5,lat=55.0,method='nearest')
In [4]:
dsloc['Wind_speed_gust_surface'].plot();
In [ ]: