Index: /anuga_work/development/classroom/ripcurrent.py
===================================================================
--- /anuga_work/development/classroom/ripcurrent.py	(revision 7587)
+++ /anuga_work/development/classroom/ripcurrent.py	(revision 7588)
@@ -7,7 +7,8 @@
 May 2006
 
-I will need to make a version which has the exact same geometry as the Georgia Tech wavetank
-if we wish to use a comparison to the results of this study as ANUGA validation as i played
-with the geometry somewhat as i completed this model.
+I will need to make a version which has the exact same geometry as the 
+Georgia Tech wavetank if we wish to use a comparison to the results of 
+this study as ANUGA validation as i played with the geometry somewhat 
+as i completed this model.
 """
 
@@ -20,5 +21,6 @@
 from anuga.shallow_water.shallow_water_domain import Time_boundary
 from anuga.shallow_water.data_manager import get_mesh_and_quantities_from_file
-from pylab import figure, quiver, show, cos, sin, pi
+from pylab import figure, plot, axis, quiver, quiverkey, show, title, axhline
+from pylab import cos, sin, pi
 import numpy
 import csv
@@ -30,5 +32,5 @@
 #------------------------------------------------------------------------------
 
-filename = "WORKING-RIP-LAB_Expt-Geometry_Triangular_Mesh"
+filename = 'WORKING-RIP-LAB_Expt-Geometry_Triangular_Mesh'
 
 location_of_shore = 140 # The position along the y axis of the shorefront
@@ -86,11 +88,13 @@
     z=0.05*(y-location_of_shore)
 
-    #Creates a steeper slope close to the seaward boundary giving a region of deepwater
+    # Steeper slope close to the seaward boundary giving a region of deep water
     N = len(x)
     for i in range(N):
         if y[i] < 25:
             z[i] = 0.2*(y[i]-25) + 0.05*(y[i]-location_of_shore)
-    #Creates a steeper slope close to the landward boundary, simulating a beach etc
-    #(helps to prevent too much reflection of wave energy off the landward boundary)         
+            
+    # Steeper slope close to the landward boundary, simulating a beach etc
+    # This helps to prevent too much reflection of wave energy off the 
+    # landward boundary         
     for i in range(N):
         if y[i]>150:
@@ -105,10 +109,13 @@
     N = len(x)
     
-    # Sets up the left hand side of the sandbank
-    #amount which it deviates from parallel with the beach is controlled by 'bank_slope'
-    #width of the channel (the gap between the two segments of the sandbank) is controlled by 'halfchannelwidth'
-    #the height of the sandbar is controlled by 'sandbar'
-    #'steepness' provides control over the slope of the soundbar (smaller values give a more rounded shape, if too small will produce peaks and troughs)
-    
+    # Set up the left hand side of the sandbank
+    # amount which it deviates from parallel with the beach is controlled 
+    # by 'bank_slope'
+    # width of the channel (the gap between the two segments of the sandbank) 
+    # is controlled by 'halfchannelwidth'
+    # The height of the sandbar is controlled by 'sandbar'
+    # 'steepness' provides control over the slope of the soundbar 
+    # (smaller values give a more rounded shape, if too small will produce 
+    # peaks and troughs)
     for i in range(N):
         ymin = -bank_slope*x[i] + 112 
@@ -119,7 +126,7 @@
             z[i] += sandbar*cos((y[i]-118)/steepness)
     
-    # Sets up the right hand side of the sandbank
-    #changing the sign in y min and y max allows the two halves of the sandbank to form a v shape
-    
+    # Set up the right hand side of the sandbank
+    # changing the sign in y min and y max allows the two halves of the 
+    # sandbank to form a v shape
     for i in range(N):
         ymin = -bank_slope*(x[i]-length/2) - bank_slope*length/2 + 112
@@ -135,5 +142,6 @@
 domain.add_quantity('elevation', topography3) # Add elevation modification
 domain.set_quantity('friction', 0.01)         # Constant friction
-domain.set_quantity('stage', 0)               # Constant initial condition at mean sea level
+domain.set_quantity('stage', 0)               # Constant initial condition at 
+                                              # mean sea level
 
 
@@ -207,13 +215,16 @@
 print 'Computation took %.2f seconds' % (time.time()-t0)
 
-key_auto_length = (max(V))/5     #makes the key vector a sensible length not sure how to label it with the correct value though
-
-from matplotlib import *
-from pylab import *
+key_auto_length = (max(V))/5 # Make the key vector a sensible length not 
+                             # sure how to label it with the correct value 
+                             # though
+
 
 figure()
 Q = quiver(X,Y,U,V)
-qk = quiverkey(Q,0.8,0.05,key_auto_length,r'$unknown \frac{m}{s}$',labelpos='E',        #need to get the label to show the value of key_auto_length
-               coordinates='figure', fontproperties={'weight': 'bold'})
+qk = quiverkey(Q, 0.8, 0.05, key_auto_length, r'$unknown \frac{m}{s}$',
+               labelpos='E', # Need to get the label to show the value of key_auto_length
+               coordinates='figure', 
+               fontproperties={'weight': 'bold'})
+               
 axis([-10,length + 10, -10, width +10])
 title('Simulation of a Rip-Current, Average Velocity Vector Field')
@@ -222,9 +233,9 @@
 axhline(y=(location_of_shore),color='r')
 
-x1 = arange(0,55,1)
+x1 = numpy.arange(0,55,1)
 y1 = -(bank_slope)*x1 + 112
 y12 = -(bank_slope)*x1 + 124
 
-x2 = arange(65,length,1)
+x2 = numpy.arange(65,length,1)
 y2 = -(bank_slope)*x2 + 112
 y22 = -(bank_slope)*x2 + 124
