[cig-commits] r7223 - mc/3D/CitcomS/branches/compressible/visual

tan2 at geodynamics.org tan2 at geodynamics.org
Wed Jun 13 18:38:16 PDT 2007


Author: tan2
Date: 2007-06-13 18:38:16 -0700 (Wed, 13 Jun 2007)
New Revision: 7223

Modified:
   mc/3D/CitcomS/branches/compressible/visual/pasteCitcomData.py
Log:
Porting r7221 from trunk -- Fixing issue111: Expanding %RANK in autocombine.py

Modified: mc/3D/CitcomS/branches/compressible/visual/pasteCitcomData.py
===================================================================
--- mc/3D/CitcomS/branches/compressible/visual/pasteCitcomData.py	2007-06-14 01:37:29 UTC (rev 7222)
+++ mc/3D/CitcomS/branches/compressible/visual/pasteCitcomData.py	2007-06-14 01:38:16 UTC (rev 7223)
@@ -42,6 +42,7 @@
 
 def run(datadir, datafile, opts, rank, step, save_dir):
 
+    datadir = expand_datadir(datadir, rank)
     outfile = '%s/%s.%s.%d.%d.pasted' % (save_dir, datafile, opts, rank, step)
     f = open(outfile, 'w')
 
@@ -70,7 +71,7 @@
 
 
 
-def expand_datadir(datadir):
+def expand_datadir(datadir, rank):
     '''Expand the special strings in datadir
     '''
 
@@ -89,7 +90,7 @@
         datadir.index(s)
     except: pass
     else:
-        datadir = datadir.replace(s, rank)
+        datadir = datadir.replace(s, str(rank))
 
     ##
     if datadir == "%DATADIR":
@@ -120,7 +121,7 @@
     # how many header lines for each infix
     headers = {'coord': 1,
                'botm': 1,
-               'comp_nd': 2,
+               'comp_nd': 1,
                'pressure': 2,
                'stress': 2,
                'surf': 1,
@@ -158,7 +159,7 @@
         sys.exit()
 
 
-    datadir = expand_datadir(sys.argv[1])
+    datadir = sys.argv[1]
     datafile = sys.argv[2]
     opts = sys.argv[3]
     rank = int(sys.argv[4])



More information about the cig-commits mailing list