Extract coordinate values in xarray
arr1.coords['lon']
gives you longitude as a xarray.DataArray
, and arr1.coords['lon'].values
gives you the values as a numpy array.
Another possible solution is:
time, lat, lon = arr1.indexes.values()
The result is a Float64Index for your lat/lon coordinates.