title: xarray interp variable with two dimensional gird into one point
body: <p>I have a dataset with two-dimension lon/lat and I want to calculate the value of one certain point.</p>
  <p>The ncfile can be download from <a href="ftp://ftp.awi.de/sea_ice/product/cryosat2_smos/v204/nh/LATEST/" rel="nofollow noreferrer">ftp://ftp.awi.de/sea_ice/product/cryosat2_smos/v204/nh/LATEST/</a> and the variable can be retrieved by the following ways</p>
  <pre><code>SAT = xr.open_dataset('W_XX-ESA,SMOS_CS2,NH_25KM_EASE2_20181231_20190106_r_v204_01_l4sit.nc')
  SAT_lon,SAT_lat = SAT.lon,SAT.lat
  SAT_SIT = SAT.analysis_sea_ice_thickness
  </code></pre>
  <p>The SAT_SIT is presented as</p>
  <pre><code>&lt;xarray.DataArray 'analysis_sea_ice_thickness' (time: 1, yc: 432, xc: 432)&gt;
  [186624 values with dtype=float64]
  Coordinates:
    * time     (time) datetime64[ns] 2019-01-03T12:00:00
    * xc       (xc) float32 -5.388e+03 -5.362e+03 ... 5.362e+03 5.388e+03
    * yc       (yc) float32 5.388e+03 5.362e+03 ... -5.362e+03 -5.388e+03
      lon      (yc, xc) float32 -135.0 -135.1 -135.3 -135.4 ... 44.73 44.87 45.0
      lat      (yc, xc) float32 16.62 16.82 17.02 17.22 ... 17.02 16.82 16.62
  Attributes:
      units:          m
      long_name:      CS2SMOS merged sea ice thickness
      standard_name:  sea_ice_thickness
      grid_mapping:   Lambert_Azimuthal_Grid
  </code></pre>
  <p>Now, I want to check the value of <em><strong>SAT_SIT</strong></em> in one certain point, for example, lon=100 lat=80. Is there any potential way to handle this?</p>
  <p>Note: the xarray only support interpolation of 1d coordinate, <a href="https://xarray.pydata.org/en/stable/user-guide/interpolation.html" rel="nofollow noreferrer">&quot;Currently, our interpolation only works for regular grids. Therefore, similarly to sel(), only 1D coordinates along a dimension can be used as the original coordinate to be interpolated.&quot;</a></p>
  <p>There are some possible ways to solve this questions in this <a href="https://stackoverflow.com/questions/58758480/xarray-select-nearest-lat-lon-with-multi-dimension-coordinates/64431809#64431809">link</a>. However, the first method is somehow complex because I need to interp the variable to many points. The second methods comes up with a error.</p>
  <pre><code>SAT = xr.open_dataset('W_XXESA,SMOS_CS2,NH_25KM_EASE2_20181231_20190106_r_v204_01_l4sit.nc')
  SAT_lon,SAT_lat = SAT.lon,SAT.lat
  lon_test,lat_test = -80,80
  data_crs = ccrs.LambertAzimuthalEqualArea(central_latitude=90,central_longitude=0,false_easting=0,false_northing=0)
  x, y = data_crs.transform_point(lon_test, lat_test, src_crs=ccrs.PlateCarree())
  SAT.sel(xc=x,yc=y)
  </code></pre>
  <p>the error is</p>
  <pre><code>Traceback (most recent call last):
    File &quot;/Users/osamuyuubu/anaconda3/envs/xesmf_env/lib/python3.7/site-packages/IPython/core/interactiveshell.py&quot;, line 3441, in run_code
      exec(code_obj, self.user_global_ns, self.user_ns)
    File &quot;&lt;ipython-input-54-b210190142ea&gt;&quot;, line 6, in &lt;module&gt;
      SAT.sel(xc=x,yc=y)
    File &quot;/Users/osamuyuubu/anaconda3/envs/xesmf_env/lib/python3.7/site-packages/xarray/core/dataset.py&quot;, line 2475, in sel
      self, indexers=indexers, method=method, tolerance=tolerance
    File &quot;/Users/osamuyuubu/anaconda3/envs/xesmf_env/lib/python3.7/site-packages/xarray/core/coordinates.py&quot;, line 422, in remap_label_indexers
      obj, v_indexers, method=method, tolerance=tolerance
    File &quot;/Users/osamuyuubu/anaconda3/envs/xesmf_env/lib/python3.7/site-packages/xarray/core/indexing.py&quot;, line 117, in remap_label_indexers
      idxr, new_idx = index.query(labels, method=method, tolerance=tolerance)
    File &quot;/Users/osamuyuubu/anaconda3/envs/xesmf_env/lib/python3.7/site-packages/xarray/core/indexes.py&quot;, line 225, in query
      label_value, method=method, tolerance=tolerance
    File &quot;/Users/osamuyuubu/anaconda3/envs/xesmf_env/lib/python3.7/site-packages/pandas/core/indexes/base.py&quot;, line 3363, in get_loc
      raise KeyError(key) from err
  KeyError: 2087687.75
  </code></pre>
  <p>Can anyone help me? Thanks in advance.</p>