Index: trunk/tools/nc_var_tools.py
===================================================================
--- trunk/tools/nc_var_tools.py	(revision 674)
+++ trunk/tools/nc_var_tools.py	(revision 675)
@@ -1993,5 +1993,5 @@
 def fvaradd(values, ncfile):
   """ Adding variable (and all its attributes and dimensions) from a reference file to a file
-  values = [netCDFref]:[varnref]
+  values = [netCDFref],[varnref]
     netCDFref = netCDF file name as reference for the variable to add
     varnref = name of the variable from [netCDFref] to be added
@@ -2006,10 +2006,10 @@
       quit()
 
-  refnc = values.split(':')[0]
-  refvar = values.split(':')[1]
+  refnc = values.split(',')[0]
+  refvar = values.split(',')[1]
 
   if not os.path.isfile(ncfile):
     print errormsg
-    print '    fvaradd: File "' + ncfile + '" does not exist !!'
+    print '  ' + fname + ': File "' + ncfile + '" does not exist !!'
     print errormsg
     quit(-1)    
@@ -2017,5 +2017,5 @@
   if not os.path.isfile(refnc):
     print errormsg
-    print '    fvaradd: Reference file "' + refnc + '" does not exist !!'
+    print '   ' + fname + ': Reference file "' + refnc + '" does not exist !!'
     print errormsg
     quit(-1)    
@@ -2029,5 +2029,5 @@
   else:
       print errormsg
-      print '    fvaradd: File "' + refnc + '" does not have variable: ' + refvar
+      print '   ' + fname + ': File "' + refnc + '" does not have variable: ' + refvar
       ncf.close()
       ncref.close()
@@ -2043,5 +2043,5 @@
   for rdim in vardims:
       if not searchInlist(newdims, rdim):
-          print '      fvaradd: Adding dimension ' + rdim
+          print '    ' + fname + ': Adding dimension ' + rdim
           ncf.close()
           ncref.close()
@@ -2057,5 +2057,5 @@
       varfil = False
 
-  print '      fvaradd: Adding refvar:', refvar, 'shape: ', refvarv.shape
+  print '    ' + fname + ': Adding refvar:', refvar, 'shape: ', refvarv.shape
   var = ncf.createVariable(refvar, vartype, vardims, fill_value=varfil)
 
@@ -2078,5 +2078,5 @@
       else:
           print errormsg
-          print '  fvaradd: variable size ',Nvars,' is not ready!!!!'
+          print '  ' + ': variable size ',Nvars,' is not ready!!!!'
 
 # Allocating all the necessary memory (just in case)
@@ -2120,4 +2120,6 @@
   ncref.close()
 
+  return
+
 def fdimadd(values, ncfile):
   """ Adding dimension from another reference file 
@@ -2300,5 +2302,5 @@
   for varn in ncvars:
       if not varn == var:
-           fvaradd(ncfile + ':' + varn, 'tmp_py.nc')
+           fvaradd(ncfile + ',' + varn, 'tmp_py.nc')
 
   fgaddattr(ncfile, 'tmp_py.nc')
@@ -3551,6 +3553,6 @@
   ncfo.close()
   fattradd('time', ncfile + ':time', ofile)
-  fvaradd(ncfile + ':lon', ofile)
-  fvaradd(ncfile + ':lat', ofile)
+  fvaradd(ncfile , ':lon', ofile)
+  fvaradd(ncfile , ':lat', ofile)
 
   ncfo = NetCDFFile(ofile,'a')
@@ -3739,6 +3741,6 @@
   ncfo.close()
   fattradd('time', ncfile + ':time', ofile)
-  fvaradd(ncfile + ':lon', ofile)
-  fvaradd(ncfile + ':lat', ofile)
+  fvaradd(ncfile , ':lon', ofile)
+  fvaradd(ncfile , ':lat', ofile)
 
   ncfo = NetCDFFile(ofile,'a')
@@ -5025,6 +5027,6 @@
   ncfo.close()
   fattradd('time', ncfile + ':time', ofile)
-  fvaradd(ncfile + ':lon', ofile)
-  fvaradd(ncfile + ':lat', ofile)
+  fvaradd(ncfile , ':lon', ofile)
+  fvaradd(ncfile , ':lat', ofile)
 
   ncfo = NetCDFFile(ofile,'a')
@@ -5489,6 +5491,6 @@
   ncfo.close()
 
-  fvaradd(ncfile + ':lon', ofile)
-  fvaradd(ncfile + ':lat', ofile)
+  fvaradd(ncfile , ':lon', ofile)
+  fvaradd(ncfile , ':lat', ofile)
 
   fgaddattr(ncfile, ofile)
@@ -6598,5 +6600,5 @@
     for varns in ncf.variables:
         if not varns == varn:
-            fvaradd(filename + ':' + varns, ofile)
+            fvaradd(filename + ',' + varns, ofile)
 
     ncfnew = NetCDFFile(ofile,'a')
@@ -8018,9 +8020,9 @@
     for varns in ncf.variables:
         if not varns == varn:
-            fvaradd(filename + ':' + varns, ofile)
+            fvaradd(filename + ',' + varns, ofile)
         elif varns == oldlon:
-            fvaradd(newprojectionfile + ':' + newlon, ofile)
+            fvaradd(newprojectionfile + ',' + newlon, ofile)
         elif varns == oldlat:
-            fvaradd(newprojectionfile + ':' + newlat, ofile)
+            fvaradd(newprojectionfile + ',' + newlat, ofile)
 
     chvarname(oldlon, ofile, newlon)
@@ -17199,5 +17201,6 @@
     else:
         print warnmsg
-        print '  ' + fname + ": Any  1D variables with dimension '" + dname + "' !!"
+        print '  ' + fname + ": Any 1D variables with dimension '" + dname + "' !!"
+        return
 
 # Dpouble precision
