[cig-commits] r5693 - mc/3D/CitcomS/trunk/visual
tan2 at geodynamics.org
tan2 at geodynamics.org
Mon Jan 8 14:19:15 PST 2007
Author: tan2
Date: 2007-01-08 14:19:14 -0800 (Mon, 08 Jan 2007)
New Revision: 5693
Modified:
mc/3D/CitcomS/trunk/visual/plot_annulus.py
mc/3D/CitcomS/trunk/visual/plot_layer.py
Log:
Truncate the temperature grd file at specified min/max
Sometimes the temperature field has overshoot/undershoot, which would be leave
a blank area in the contour plot. This is a simple workaround.
Modified: mc/3D/CitcomS/trunk/visual/plot_annulus.py
===================================================================
--- mc/3D/CitcomS/trunk/visual/plot_annulus.py 2007-01-08 19:26:23 UTC (rev 5692)
+++ mc/3D/CitcomS/trunk/visual/plot_annulus.py 2007-01-08 22:19:14 UTC (rev 5693)
@@ -166,6 +166,10 @@
botlayer = 0
toplayer = nodez - 1
+## min/max values to truncate temperature field
+tmin = 0
+tmax = 1
+
bounds = '0/360/-90/90'
xsectfile = '%s.xsect.%d.xyz' % (modelname, step)
out = open(xsectfile,'w')
@@ -183,7 +187,8 @@
if not os.path.isfile(grdfile):
command = '''
cut -d' ' -f1,2,6 %(all_zfiles)s | \
- surface -I%(az_resolution)s -G%(grdfile)s -R%(bounds)s -N1
+ surface -I%(az_resolution)s -G%(grdfile)s -R%(bounds)s -N1 \
+ -Ll%(tmin)d -Lu%(tmax)d
''' % vars()
os.system(command)
@@ -239,7 +244,8 @@
yshift = mapwidth * 1.2
command = '''
-surface %(xsectfile)s -G%(grdfile2)s -I%(resolution)s -R%(bounds2)s
+surface %(xsectfile)s -G%(grdfile2)s -I%(resolution)s -R%(bounds2)s \
+ -Ll%(tmin)d -Lu%(tmax)d
grdimage %(grdfile2)s -C%(cptfile)s -JP%(mapwidth)fa -B30ns -R%(bounds2)s -X0.2 -Y-%(yshift)f -P -O >> %(psfile)s
Modified: mc/3D/CitcomS/trunk/visual/plot_layer.py
===================================================================
--- mc/3D/CitcomS/trunk/visual/plot_layer.py 2007-01-08 19:26:23 UTC (rev 5692)
+++ mc/3D/CitcomS/trunk/visual/plot_layer.py 2007-01-08 22:19:14 UTC (rev 5693)
@@ -144,9 +144,15 @@
## 7. plot the colorbar
## 8. remove the grdfile and cptfile
#######################################################################
+
+## min/max values to truncate temperature field
+tmin = 0
+tmax = 1
+
command = '''
cut -d' ' -f1,2,6 %(all_zfiles)s | \
- surface -I%(resolution)s -G%(grdfile)s -R%(bounds)s
+ surface -I%(resolution)s -G%(grdfile)s -R%(bounds)s \
+ -Ll%(tmin)d -Lu%(tmax)d
makecpt -Cpolar -T0/1/.1 > %(cptfile)s
More information about the cig-commits
mailing list