<p><b>mhoffman@lanl.gov</b> 2012-03-20 11:24:57 -0600 (Tue, 20 Mar 2012)</p><p>BRANCH COMMIT<br>
Modified dome visualization script to include plots of velocity.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/land_ice_projects/test_cases/dome/visualize_dome.py
===================================================================
--- branches/land_ice_projects/test_cases/dome/visualize_dome.py        2012-03-20 17:15:55 UTC (rev 1686)
+++ branches/land_ice_projects/test_cases/dome/visualize_dome.py        2012-03-20 17:24:57 UTC (rev 1687)
@@ -1,6 +1,7 @@
 #!/usr/bin/python
-# import numpy
+import numpy
 # from netCDF import *
+# import math
 from Scientific.IO.NetCDF import *
 # from pylab import *
 from optparse import OptionParser
@@ -43,8 +44,9 @@
 # else:
 #         color_min = float(options.minimum)
 
-nx = 30
-ny = 35
+# These are only needed if gridding.
+# nx = 30
+# ny = 35
 
 f = NetCDFFile(options.filename,'r')
 
@@ -54,9 +56,16 @@
 bedTopography = f.variables['bedTopography']
 xCell = f.variables['xCell']
 yCell = f.variables['yCell']
+xEdge = f.variables['xEdge']
+yEdge = f.variables['yEdge']
+angleEdge = f.variables['angleEdge']
 temperature = f.variables['temperature']
 lowerSurface = f.variables['lowerSurface']
 upperSurface = f.variables['upperSurface']
+normalVelocity = f.variables['normalVelocity']
+uReconstructX = f.variables['uReconstructX']
+uReconstructX = f.variables['uReconstructX']
+uReconstructY = f.variables['uReconstructY']
 
 vert_levs = f.dimensions['nVertLevels']
 
@@ -123,6 +132,40 @@
 if options.saveimages:
         plt.savefig('dome_temperature.png')
 
+fig = plt.figure(4)
+ax = fig.add_subplot(121, aspect='equal')
+plt.scatter(xEdge[:], yEdge[:], 80, normalVelocity[time_slice,:,0], marker='h', edgecolors='none')
+plt.colorbar()
+plt.quiver(xEdge[:], yEdge[:], numpy.cos(angleEdge[:]) * normalVelocity[time_slice,:,0], numpy.sin(angleEdge[:]) * normalVelocity[time_slice,:,0])
+plt.title('normalVelocity of bottom layer at time ' + str(time_slice) )
+plt.draw()
+ax = fig.add_subplot(122, aspect='equal')
+plt.scatter(xEdge[:], yEdge[:], 80, normalVelocity[time_slice,:,vert_levs - 1], marker='h', edgecolors='none')
+plt.colorbar()
+plt.quiver(xEdge[:], yEdge[:], numpy.cos(angleEdge[:]) * normalVelocity[time_slice,:,vert_levs - 1], numpy.sin(angleEdge[:]) * normalVelocity[time_slice,:, vert_levs - 1])
+plt.title('normalVelocity of top layer at time ' + str(time_slice) )
+plt.draw()
+if options.saveimages:
+        plt.savefig('dome_normalVelocity.png')
+
+fig = plt.figure(5)
+ax = fig.add_subplot(121, aspect='equal')
+plt.scatter(xCell[:], yCell[:], 80, uReconstructX[time_slice,:,vert_levs - 1], marker='h', edgecolors='none')
+plt.colorbar()
+plt.quiver(xCell[:], yCell[:], uReconstructX[time_slice,:, vert_levs - 1], uReconstructY[time_slice,:, vert_levs - 1])
+plt.title('uReconstructX of top layer at time ' + str(time_slice) )
+plt.draw()
+ax = fig.add_subplot(122, aspect='equal')
+plt.scatter(xCell[:], yCell[:], 80, uReconstructY[time_slice,:,vert_levs - 1], marker='h', edgecolors='none')
+plt.colorbar()
+plt.quiver(xCell[:], yCell[:], uReconstructX[time_slice,:, vert_levs - 1], uReconstructY[time_slice,:, vert_levs - 1])
+plt.title('uReconstructY of top layer at time ' + str(time_slice) )
+plt.draw()
+if options.saveimages:
+        plt.savefig('dome_uReconstruct.png')
+
+
+
 if options.hidefigs:
      print &quot;Plot display disabled with -n argument.&quot;
 else:     

</font>
</pre>