Index: /trunk/tools/nc_var_tools.py
===================================================================
--- /trunk/tools/nc_var_tools.py	(revision 2822)
+++ /trunk/tools/nc_var_tools.py	(revision 2823)
@@ -1383,5 +1383,5 @@
 
   var = ncf.variables[varn]
-  var = set_attribute(var, attrn, attrv)
+  newattr = set_attribute(var, attrn, attrv)
 
   ncf.sync()
@@ -1450,5 +1450,5 @@
     quit(-1)
 
-  var = set_attribute(var, attrn, attrv)
+  newattr = set_attribute(var, attrn, attrv)
 
   ncf.sync()
@@ -1744,5 +1744,5 @@
   for attr in refvarattrs:
       attrv = refvarv.getncattr(attr)
-      atvar = set_attribute(varv, attr, attrv)
+      newattr = set_attribute(varv, attr, attrv)
   
   ncf.sync()
@@ -1785,5 +1785,5 @@
   for attr in refgattrs:
       attrv = ncref.getncattr(attr)
-      atvar = set_attribute(ncf, attr, attrv)
+      newattr = set_attribute(ncf, attr, attrv)
   
   ncf.sync()
@@ -6661,5 +6661,5 @@
             if not attrs == '_FillValue':
                 attrv = varobj.getncattr(attrs)
-                attr = set_attribute(newvar, attrs, attrv)
+                newattr = set_attribute(newvar, attrs, attrv)
         ncoobj.sync()
 
@@ -6668,5 +6668,5 @@
     for attrs in nciobj.ncattrs():
         attrv = nciobj.getncattr(attrs)
-        attr = set_attribute(ncoobj, attrs, attrv)
+        newattr = set_attribute(ncoobj, attrs, attrv)
 
     nciobj.close()
@@ -6854,5 +6854,5 @@
             if not attrs == '_FillValue':
                 attrv = varobj.getncattr(attrs)
-                attr = set_attribute(newvar, attrs, attrv)
+                newattr = set_attribute(newvar, attrs, attrv)
 
 # Global attributes
@@ -6860,5 +6860,5 @@
     for attrs in nciobj.ncattrs():
         attrv = nciobj.getncattr(attrs)
-        attr = set_attribute(ncoobj, attrs, attrv)
+        newattr = set_attribute(ncoobj, attrs, attrv)
 
     slicevalS = ''
@@ -6877,5 +6877,5 @@
               str(dimslices[dn][1]) + ',1); '
 
-    attr = set_attribute(ncoobj, 'sliced_dimensions', slicevalS)
+    newattr = set_attribute(ncoobj, 'sliced_dimensions', slicevalS)
 
     nciobj.close()
@@ -10830,5 +10830,5 @@
     for attr in gorigattrs:
         attrv = objnc.getncattr(attr)
-        atvar = set_attributek(objnewnc, attr, attrv, type(attrv))
+        newattr = set_attributek(objnewnc, attr, attrv, type(attrv))
 
     objnc.close()
@@ -11018,5 +11018,5 @@
     for attr in gorigattrs:
         attrv = objnc.getncattr(attr)
-        atvar = set_attribute(objnewnc, attr, attrv)
+        newattr = set_attribute(objnewnc, attr, attrv)
 
     objnc.close()
@@ -11783,5 +11783,5 @@
         newvar.setncattr('axis', 'T')
         newvar.setncattr('_CoordinateAxisType', 'Time')
-        set_attribute(newvar, 'calendar', 'standard')
+        newattr = set_attribute(newvar, 'calendar', 'standard')
     if urefvals == '-': urefvals = '- -'
 
@@ -14763,5 +14763,5 @@
             newvar[:] = secondvals
 
-        set_attribute(newvar, 'desc', 'Selected ' + newdimns[idn])
+        newattr = set_attribute(newvar, 'desc', 'Selected ' + newdimns[idn])
         idn = idn + 1
 
@@ -14990,5 +14990,5 @@
         if not attrs == '_FillValue':
             attrv = ov.getncattr(attrs)
-            attr = set_attribute(newvar, attrs, attrv)
+            newattr = set_attribute(newvar, attrs, attrv)
 
     return
@@ -15329,7 +15329,7 @@
     for attrs in nciobj.ncattrs():
         attrv = nciobj.getncattr(attrs)
-        attr = set_attribute(ncoobj, attrs, attrv)
-
-    attr = set_attribute(ncoobj, 'sliced_variables', slicevalS)
+        newattr = set_attribute(ncoobj, attrs, attrv)
+
+    newattr = set_attribute(ncoobj, 'sliced_variables', slicevalS)
     add_global_PyNCplot(ncoobj, main, fname, '1.1')
 
@@ -15568,5 +15568,5 @@
     for attrn in ovar.ncattrs():
         attrv = ovar.getncattr(attrn)
-        set_attribute(newvar, attrn, attrv)
+        newattr = set_attribute(newvar, attrn, attrv)
 
     oncf.sync()
@@ -16024,5 +16024,5 @@
     for attrs in onc.ncattrs():
         attrv = onc.getncattr(attrs)
-        attr = set_attribute(onewnc, attrs, attrv)
+        newattr = set_attribute(onewnc, attrs, attrv)
 
     onc.close()
