def copy(self, deep=True):
        if deep and not isinstance(self.data, dask_array_type):
            # dask arrays don't have a copy method
            # https://github.com/blaze/dask/issues/911
            data = self.data.copy()
        else:
            data = self._data
        # note:
        # dims is already an immutable tuple
        # attributes and encoding will be copied when the new Array is created
        return type(self)(self.dims, data, self._attrs, self._encoding,
                          fastpath=True)
Returns a copy of this object.
dataset/ETHPy150Open pydata/xarray/xarray/core/variable.py/Variable.copy