<p><b>mhoffman@lanl.gov</b> 2012-06-15 09:36:08 -0600 (Fri, 15 Jun 2012)</p><p>BRANCH COMMIT --land ice<br>
A few minor updates to the python script for plotting MPAS output fields.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/land_ice_projects/grid_tools/plot_mpas_field.py
===================================================================
--- branches/land_ice_projects/grid_tools/plot_mpas_field.py        2012-06-15 05:13:30 UTC (rev 1983)
+++ branches/land_ice_projects/grid_tools/plot_mpas_field.py        2012-06-15 15:36:08 UTC (rev 1984)
@@ -19,12 +19,13 @@
raise ImportError('No netCDF module found')
+print "** Gathering information. (Invoke with 'python plot_mpas_field.py --help' for more details. All arguments are optional)"
parser = OptionParser()
-parser.add_option("-f", "--file", dest="filename", help="file to visualize", metavar="FILE")
-parser.add_option("-v", "--var", dest="variable", help="variable to visualize; use 'uMag' for velocity magnitude", metavar="VAR")
-parser.add_option("-t", "--time", dest="time", help="time step to visualize (0 based)", metavar="TIME")
-parser.add_option("-l", "--level", dest="vertlevel", help="vertical level to visualize (0 based)", metavar="LEVEL")
-parser.add_option("-s", "--save", action="store_true", dest="saveimages", help="include this flag to save plots as files")
+parser.add_option("-f", "--file", dest="filename", help="file to visualize; default: output.nc", metavar="FILE")
+parser.add_option("-v", "--var", dest="variable", help="variable to visualize; use 'uMag' for velocity magnitude; default: thickness", metavar="VAR")
+parser.add_option("-t", "--time", dest="time", help="time step to visualize (0 based), default: 0", metavar="TIME")
+parser.add_option("-l", "--level", dest="vertlevel", help="vertical level to visualize (0 based); default: 0", metavar="LEVEL")
+parser.add_option("-s", "--save", action="store_true", dest="saveimages", help="include this flag to save plot as .png file")
parser.add_option("-n", "--nodisp", action="store_true", dest="hidefigs", help="include this flag to not display plots (usually used with -s)")
parser.add_option("-x", "--max", dest="maximum", help="maximum for color bar", metavar="MAX")
parser.add_option("-m", "--min", dest="minimum", help="minimum for color bar", metavar="MIN")
@@ -32,7 +33,6 @@
options, args = parser.parse_args()
-print "** Gathering information. (Invoke with 'python plot_mpas_field.py --help' for more details.)"
if not options.filename:
        print "No filename provided. Using output.nc."
options.filename = "output.nc"
@@ -61,7 +61,7 @@
f = NetCDFFile(options.filename,'r')
# Get grid stuff
-times = f.variables['xtime']
+#times = f.variables['xtime'] # Not needed unless trying to print actual time stamp
xCell = f.variables['xCell']
yCell = f.variables['yCell']
xEdge = f.variables['xEdge']
</font>
</pre>