title: How to check if two xarray objects have the same dimensions and coordinates (but not necessarily values)
body: <p>I have 2 xarray objects. I would like to check if these 2 arrays have the same dimensions and coordinates. But the two objects don't need to have the same values or meta data.</p>
  <p>For example:</p>
  <pre><code>import xarray as xr
  
  arr1_data = [[1, 2], [3, 4]]
  arr2_data = [[5, 6], [7, 8]]
  
  arr1 = xr.DataArray(arr1_data, dims=[&quot;y&quot;, &quot;x&quot;], coords={&quot;y&quot;: [&quot;coord1&quot;, &quot;coord2&quot;]})
  arr2 = xr.DataArray(arr2_data, dims=[&quot;y&quot;, &quot;x&quot;], coords={&quot;y&quot;: [&quot;coord1&quot;, &quot;coord2&quot;]})
  
  compare_xarray_objects(arr1, arr2)  # Should return True
  </code></pre>
  <p>The <code>.dims</code> attribute returns a tuple, so it is easy to tell if dimensions are the same. But <code>.coords</code> attribute returns a <code>DataArrayCoordinates</code> object and I don't know how to compare a <code>DataArrayCoordinates</code> object with another one.</p>