<p><b>dwj07@fsu.edu</b> 2012-03-15 11:18:06 -0600 (Thu, 15 Mar 2012)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Changing the total simulation time for test case.<br>
        Adding a visualization script.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/advective_transport/makeMeshes.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/advective_transport/makeMeshes.sh        2012-03-15 17:12:52 UTC (rev 1647)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/advective_transport/makeMeshes.sh        2012-03-15 17:18:06 UTC (rev 1648)
@@ -11,7 +11,7 @@
 ###############################################################
 ## Change reference spacing, time_step, and viscosities here ##
 ###############################################################
-REF_TIME_STEP=&quot;15&quot;
+REF_TIME_STEP=&quot;5&quot;
 REF_VISC_H=&quot;0.0&quot;
 REF_VISC_V=&quot;0.0&quot;
 REF_SPACING=&quot;10.0&quot;
@@ -35,17 +35,17 @@
 #######################################################
 ADVECTION_ROUTINES=&quot;std2 std3 std4 fct2 fct3 fct4&quot;
 TIME_STEPPERS=&quot;rk4 se1 se20 use&quot;
-TIME_STEPS=&quot;15&quot;
+TIME_STEPS=&quot;5&quot;
 
 ############################################################
 ## Setup Default namelist keys and values to update later ##
 ############################################################
 i=0
-KEYS[$i]=&quot;config_run_duration&quot;;           VALUES[$i]=&quot;'0000_00:02:40'&quot;; i=$i+1;
+KEYS[$i]=&quot;config_run_duration&quot;;           VALUES[$i]=&quot;'0000_02:00:00'&quot;; i=$i+1;
 KEYS[$i]=&quot;config_input_name&quot;;             VALUES[$i]=&quot;'grid.nc'&quot;; i=$i+1;
 KEYS[$i]=&quot;config_output_name&quot;;            VALUES[$i]=&quot;'output.nc'&quot;; i=$i+1;
 KEYS[$i]=&quot;config_restart_name&quot;;           VALUES[$i]=&quot;'restart.nc'&quot;; i=$i+1;
-KEYS[$i]=&quot;config_output_interval&quot;;        VALUES[$i]=&quot;'00_00:02:40'&quot;; i=$i+1;
+KEYS[$i]=&quot;config_output_interval&quot;;        VALUES[$i]=&quot;'00_02:00:00'&quot;; i=$i+1;
 KEYS[$i]=&quot;config_do_restart&quot;;             VALUES[$i]=&quot;.false.&quot;; i=$i+1;
 KEYS[$i]=&quot;config_vert_grid_type&quot;;         VALUES[$i]=&quot;'zstar'&quot;; i=$i+1;
 KEYS[$i]=&quot;config_rho0&quot;;                   VALUES[$i]=&quot;1000&quot;; i=$i+1;
@@ -197,11 +197,13 @@
                 do
                         if [ ${TIME_STEPPER} == 'rk4' ]; then
                                 TIME_INTEGRATOR=&quot;'RK4'&quot;
+                                SUB_CYCLES=20
                         elif [ ${TIME_STEPPER:0:2} == &quot;se&quot; ]; then
                                 TIME_INTEGRATOR=&quot;'split_explicit'&quot;
                                 SUB_CYCLES=${TIME_STEPPER:2}
                         elif [ ${TIME_STEPPER} == 'use' ]; then
                                 TIME_INTEGRATOR=&quot;'unsplit_explicit'&quot;
+                                SUB_CYCLES=20
                         fi
 
                         for TIME_STEP in ${TIME_STEPS}

Added: branches/ocean_projects/ocean_test_cases_staging/ocean/advective_transport/visualize_transport.py
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/advective_transport/visualize_transport.py                                (rev 0)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/advective_transport/visualize_transport.py        2012-03-15 17:18:06 UTC (rev 1648)
@@ -0,0 +1,124 @@
+#!/usr/bin/python
+import sys, os, glob, shutil, numpy
+
+sys.path.append('/home/douglasj/softwares/python/lib/python2.7/site-packages')
+
+from netCDF4 import *
+from netCDF4 import Dataset as NetCDFFile
+from pylab import *
+
+from optparse import OptionParser
+
+import time
+import matplotlib
+import matplotlib.pyplot as plt
+from scipy.interpolate import griddata
+
+parser = OptionParser()
+parser.add_option(&quot;-f&quot;, &quot;--file&quot;, dest=&quot;filename&quot;, help=&quot;file to visualize&quot;, metavar=&quot;FILE&quot;)
+parser.add_option(&quot;-v&quot;, &quot;--var&quot;, dest=&quot;variable&quot;, help=&quot;variable to visualize&quot;, metavar=&quot;VAR&quot;)
+parser.add_option(&quot;--max&quot;, dest=&quot;maximum&quot;, help=&quot;maximum for color bar&quot;, metavar=&quot;MAX&quot;)
+parser.add_option(&quot;--min&quot;, dest=&quot;minimum&quot;, help=&quot;minimum for color bar&quot;, metavar=&quot;MIN&quot;)
+
+options, args = parser.parse_args()
+
+if not options.filename:
+        parser.error(&quot;Filename is a required input.&quot;)
+
+if not options.variable:
+        parser.error(&quot;Variable is a required input.&quot;)
+
+if not options.maximum:
+        color_max = 0.0
+else:
+        color_max = float(options.maximum)
+
+if not options.minimum:
+        color_min = 0.0
+else:
+        color_min = float(options.minimum)
+
+f = NetCDFFile(options.filename,'r')
+
+times = f.variables['xtime']
+field = f.variables[options.variable]
+
+dim = field.dimensions[1]
+if dim == &quot;nCells&quot;:
+        x = f.variables['xCell'][:]
+        y = f.variables['yCell'][:]
+elif dim == &quot;nEdges&quot;:
+        x = f.variables['xEdge'][:]
+        y = f.variables['yEdge'][:]
+elif dim == &quot;nVertices&quot;:
+        x = f.variables['xVertex'][:]
+        y = f.variables['yVertex'][:]
+
+dcedge = f.variables['dcEdge']
+vert_levs = len(f.dimensions['nVertLevels'])
+
+junk = dcedge[:]
+resolution = junk.max()
+
+del dcedge
+del junk
+
+nx = int((x.max() - x.min())/resolution - 1)
+ny = int((y.max() - y.min())/resolution)
+
+time_length = times.shape[0]
+
+del times
+
+print &quot;nx = &quot;, nx, &quot; ny = &quot;, ny
+print &quot;vert_levs = &quot;, vert_levs, &quot; time_length = &quot;, time_length
+
+print &quot;Computing global max and min&quot;
+junk = field[:,:,0]
+maxval = junk.max()
+minval = junk.min()
+
+del junk
+
+junk = field[:,:,:]
+global_max = junk.max()
+global_min = junk.min()
+
+del junk
+
+print &quot;Global max = &quot;, global_max, &quot; Global min = &quot;, global_min
+print &quot;Surface max = &quot;, maxval, &quot; Surface min = &quot;, minval
+
+if color_max == color_min:
+        color_max = global_max
+        color_min = global_min
+
+steps = 30
+step = (color_max - color_min) / steps
+color_bar_levels = arange(color_min-step, color_max+step, step)
+
+xi = linspace(x.min(), x.max(), nx*2)
+yi = linspace(y.min(), y.max(), ny*2)
+
+zi = griddata((x, y), field[0,:,0], (xi[None,:], yi[:,None]), method='linear')
+
+plt.ion()
+fig = plt.figure(1)
+ax = fig.add_subplot(111)
+
+plt.contourf(xi, yi, zi, levels=color_bar_levels)
+plt.colorbar()
+plt.draw()
+
+for t in range(1, time_length):
+         ax.cla()
+        zi = griddata((x, y), field[t,:,0], (xi[None,:], yi[:,None]), method='linear')

+        plt.contourf(xi, yi, zi, levels=color_bar_levels)
+        plt.draw()
+         time.sleep(0.05)
+
+plt.ioff()
+
+plt.show()
+f.close()


Property changes on: branches/ocean_projects/ocean_test_cases_staging/ocean/advective_transport/visualize_transport.py
___________________________________________________________________
Added: svn:executable
   + *

</font>
</pre>