xarray.Variable.identical

Variable.identical(other, equiv=<function array_equiv>)

Like equals, but also checks attributes.