title: Extracting nearest lat-lon and time value from netcdf using xarray
body: <p>I have a netCDF file with foll. structure:</p>
  
  <pre><code>&lt;xarray.Dataset&gt;
  Dimensions:    (latitude: 94, longitude: 192, time: 366)
  Coordinates:
    * longitude  (longitude) float32 -180.0 -178.125 -176.25 -174.375 -172.5 ...
    * latitude   (latitude) float32 88.5419 86.6532 84.7532 82.8508 80.9474 ...
    * time       (time) datetime64[ns] 2016-01-01 2016-01-02 2016-01-03 ...
  Data variables:
      m2t      (time, latitude, longitude) float64 246.5 246.4 246.4 246.4
      pre      (time, latitude, longitude) float64 9.988e-08 9.988e-08 ...
  Attributes:
      Conventions: CF-1.0
  </code></pre>
  
  <p>How do I extract values for a grid cell for a specific latitude and longitude (say 86.45, -156.25) and time (say 2016-01-10)? It is possible that the exact latitude/longitude value is not in the coordinates in which case we want the closest latitude/longitude value</p>
  
  <p>I can extract value for a specific longitude like this:</p>
  
  <pre><code>_hndl_nc.sel(longitude=(_hndl_nc.longitude == -20))
  </code></pre>
  
  <p>However, since -20 is not present in coordinates for longitude, this does not work.</p>