def CopyAtts(inVar, outVar):
    """Copy all attributes of one variable to the other

        INPUTS:
        inVar  - netCDF4 variable containing attributes to copy
        outVar - netCDF4 variable to which attributes will be copied
        OUTPUTS:
        outVar - netCDF4 variable with all copied attributes
        """
    for att in inVar.ncattrs():
        outVar.setncattr(att, inVar.getncattr(att))
    return outVar
