title: Using xarray to change coordinate system in order to Slice operation
body: <p>I am new here. 
  first on all, I am very thankful for your time and consideration.
  I have 2 questions regarding to managing 2 different netcdf files in python.
  I searched a lot but unfortunately I couldn't find a solution.</p>
  
  <p>1- I have a netcdf file which has coordinates like below:</p>
  
  <pre><code>time     datetime64[ns] 2016-08-16T22:00:00
  * y        (y) int32 220000  ...  620000
  * x        (x) int32 20000  ...  720000
   lat      (y, x) float64 dask.array&lt;shape=(401, 701), 
   lon      (y, x) float64 dask.array&lt;shape=(401, 701),
  </code></pre>
  
  <p>I need to change coords to lon/lat in order that I can slice an area based on specific lon/lat coords (by using xarray). But I don't know how to change x and y to lon lat.
  here my code:</p>
  
  <pre><code>import xarray as xr
  import matplotlib.pyplot as plt
  p = "R_201608.nc"
  ds = xr.open_mfdataset(p)
  q=ds.RR.sel(time='2016-08-16T21:00:00')
  </code></pre>
  
  <p>2- Similar to 1, I have another netcdf file which has coordinates like below:</p>
  
  <pre><code>   * X           (X) float32 557600.0 .. 579400.0
     * Y           (Y) float32 5190600 ... 5205400.0
     * time        (time) datetime64[ns] 2007-01I
  </code></pre>
  
  <p>How can I convert x and y to lon/lat system in order that I can plot it in lon/lat system?</p>
  
  <p><strong>Edit related to @Ryan :</strong>
  1- Yes. this file demonestrates rainfall over a large area. I want to cut it into smaller area -similar area of file related to q2- and compare them uusing bias, RMSE, etc. here is full information related to this file:</p>
  
  <pre><code> &lt;xarray.Dataset&gt;
    Dimensions:                  (time: 2976, x: 701, y: 401)
    Coordinates:
    * time             (time) datetime64[ns] 2016-08-31T23:45:00
    * y          (y) int32 220000 221000  ... 619000 620000
    * x          (x) int32 20000 21000  ... 719000 720000
    lat        (y, x) float64 dask.array&lt;shape=(401, 701),chunksize=(401, 701)&gt;
    lon        (y, x) float64 dask.array&lt;shape=(401, 701), chunksize=(401, 701)
  
   Data variables:
      RR       (time, y, x) float32 dask.array&lt;shape=(2976, 401, 701),    chunksize=(2976, 401, 701)&gt;
      lambert_conformal_conic  int32 ...
  
      Conventions:  CF-1.5
  </code></pre>
  
  <p>edit related to @Ryan :2- And here it is the full information about the second file (Smaller area):</p>
  
  <pre><code>   &lt;xarray.DataArray 'Precip' (time: 8928, Y: 75, X: 110)&gt;
     dask.array&lt;shape=(8928, 75, 110), dtype=float32, chunksize=(288, 75, 110)&gt;
     Coordinates:
  
        sensor_height_precip  float32 1.5
        sensor_height_P       float32 1.5
        * X                     (X) float32 557600.0 557800.0 ... 579200.0 579400.0
        * Y                     (Y) float32 5190600.0 5190800.0 ... 5205400.0
        * time                  (time) datetime64[ns]  2007-01-31T23:55:00
     Attributes:
        grid_mapping:         UTM33N
        ancillary_variables:  QFlag_Precip QGrid_Precip
        long_name:            Precipitation Amount
        standard_name:        precipitation_amount
        cell_methods:         time:sum
        units:                mm
  </code></pre>