def clone(self, zVar, name=None, data=True):
    '\n        Clone a zVariable (from another CDF or this) into this CDF\n\n        Parameters\n        ==========\n        zVar : :py:class:`Var`\n            variable to clone\n\n        Other Parameters\n        ================\n        name : str\n            Name of the new variable (default: name of the original)\n        data : boolean (optional)\n            Copy data, or only type, dimensions, variance, attributes?\n            (default: True, copy data as well)\n\n        Returns\n        =======\n        out : :py:class:`Var`\n            The newly-created zVar in this CDF\n        '
    if (name is None):
        name = zVar.name()
    if (name in self):
        del self[name]
    self.new(name, type=zVar.type(), recVary=zVar.rv(), dimVarys=zVar.dv(), dims=zVar._dim_sizes(), n_elements=zVar._nelems())
    self[name].compress(*zVar.compress())
    self[name].attrs.clone(zVar.attrs)
    if data:
        r = zVar._raw
        zVar._raw = True
        self.raw_var(name)[...] = zVar[...]
        zVar._raw = r
    return zVar
Clone a zVariable (from another CDF or this) into this CDF

Parameters
==========
zVar : :py:class:`Var`
    variable to clone

Other Parameters
================
name : str
    Name of the new variable (default: name of the original)
data : boolean (optional)
    Copy data, or only type, dimensions, variance, attributes?
    (default: True, copy data as well)

Returns
=======
out : :py:class:`Var`
    The newly-created zVar in this CDF
def clone(self, zVar, name=None, data=True):
    '\n        Clone a zVariable (from another CDF or this) into this CDF\n\n        Parameters\n        ==========\n        zVar : :py:class:`Var`\n            variable to clone\n\n        Other Parameters\n        ================\n        name : str\n            Name of the new variable (default: name of the original)\n        data : boolean (optional)\n            Copy data, or only type, dimensions, variance, attributes?\n            (default: True, copy data as well)\n\n        Returns\n        =======\n        out : :py:class:`Var`\n            The newly-created zVar in this CDF\n        '
    if (name is None):
        name = zVar.name()
    if (name in self):
        del self[name]
    self.new(name, type=zVar.type(), recVary=zVar.rv(), dimVarys=zVar.dv(), dims=zVar._dim_sizes(), n_elements=zVar._nelems())
    self[name].compress(*zVar.compress())
    self[name].attrs.clone(zVar.attrs)
    if data:
        r = zVar._raw
        zVar._raw = True
        self.raw_var(name)[...] = zVar[...]
        zVar._raw = r
    return zVar