[cig-commits] r21411 - short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv22
brad at geodynamics.org
brad at geodynamics.org
Wed Feb 27 10:18:47 PST 2013
Author: brad
Date: 2013-02-27 10:18:47 -0800 (Wed, 27 Feb 2013)
New Revision: 21411
Modified:
short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv22/tabulate_onfaultdata.py
Log:
Fixed small errors in tabulating on-fault data.
Modified: short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv22/tabulate_onfaultdata.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv22/tabulate_onfaultdata.py 2013-02-27 18:05:14 UTC (rev 21410)
+++ short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv22/tabulate_onfaultdata.py 2013-02-27 18:18:47 UTC (rev 21411)
@@ -8,7 +8,7 @@
# ----------------------------------------------------------------------
#
-sim = "tpv22"
+sim = "tpv23"
cell = "tet4"
dx = 200
@@ -24,7 +24,7 @@
def extract(fault, targets):
tolerance = 1.0e-6
- h5 = h5py.File("%s.h5" % inputRoot, 'r', driver="sec2")
+ h5 = h5py.File("%s-%s.h5" % (inputRoot, fault), 'r', driver="sec2")
vertices = h5['geometry/vertices'][:]
ntargets = targets.shape[0]
indices = []
@@ -82,7 +82,6 @@
strike = vertices[:,1] / lengthScale
dip = -vertices[:,2] / lengthScale
- zero = numpy.zeros( (ntimesteps-1, 1), dtype=numpy.float64)
for iloc in xrange(ntargets):
pt = locName % (round(10*strike[iloc]),
round(10*dip[iloc]))
@@ -90,7 +89,7 @@
fout = open(filename, 'w');
fout.write(headerA)
fout.write("# time_step = %14.6E\n" % dt)
- fout.write("# num_timesteps = %8d\n" % (ntimesteps-1))
+ fout.write("# num_timesteps = %8d\n" % (nsteps))
fout.write(locHeader % (strike[iloc], dip[iloc]))
fout.write(headerB)
data = numpy.transpose((timeStamps,
More information about the CIG-COMMITS
mailing list