Index: /documentation/user_manual/examples/runuptest.py
===================================================================
--- /documentation/user_manual/examples/runuptest.py	(revision 3222)
+++ /documentation/user_manual/examples/runuptest.py	(revision 3223)
@@ -17,5 +17,4 @@
 from pyvolution.shallow_water import Transmissive_boundary
 
-N = 10000.0
 waveheight = 1.0
 #------------------------------------------------------------------------------
@@ -23,8 +22,11 @@
 #------------------------------------------------------------------------------
 
-polygon = [[N,N],[-N,N],[-N,-N],[N,-N]]
-#polygon = [[N,N],[0,N],[0,0],[N,0]]
+west = 340000.
+east = 380000.
+south = 6265000.
+north = 6250000.
+polygon = [[east,north],[west,north],[west,south],[east,south]]
 meshname = 'test.msh'
-#interior_regions = 
+
 create_mesh_from_regions(polygon,
                          boundary_tags={'top': [0],
@@ -37,5 +39,5 @@
 
 domain = Domain(meshname,use_cache=True,verbose = True)
-domain.set_name('bedslope')                 # Output to bedslope.sww
+domain.set_name('test')                     # Output to test.sww
 domain.set_datadir('.')                     # Use current directory for output
 domain.set_quantities_to_be_stored(['stage',# Store all conserved quantities
@@ -49,11 +51,11 @@
 
 def topography(x,y):
-    return -x/2                              # linear bed slope
-    #return x*(-(2.0-x)*.5)                  # curved bed slope
+    slope = -1./400.
+    c = 850.0
+    return slope*x+c                              # linear bed slope
 
 domain.set_quantity('elevation', topography) # Use function for elevation
-domain.set_quantity('friction', 0.1)         # Constant friction 
-#domain.set_quantity('stage', -.4)            # Constant negative initial stage
-domain.set_quantity('stage', -N/2)            # Constant negative initial stage
+domain.set_quantity('friction', 0. )         # Constant friction 
+domain.set_quantity('stage', 0.0)            # Constant initial stage
 
 #------------------------------------------------------------------------------
@@ -64,7 +66,7 @@
 Br = Reflective_boundary(domain)      # Solid reflective wall
 Bt = Transmissive_boundary(domain)    # Continue all values on boundary 
-Bd = Dirichlet_boundary([-N/2.,0.,0.]) # Constant boundary values
+Bd = Dirichlet_boundary([0.,0.,0.])   # Constant boundary values
 Bw = Time_boundary(domain=domain,     # Time dependent boundary  
-                   f=lambda t: [((1<t<2)*waveheight), 0.0, 0.0])
+                   f=lambda t: [((10<t<20)*waveheight), 0.0, 0.0])
 
 # Associate boundary tags with boundary objects
@@ -77,11 +79,46 @@
 
 stagestep = []
-filename = 'runupheight%.2f.csv' %waveheight
-fid = open(filename, 'w')
 for t in domain.evolve(yieldstep = 10, finaltime = 100.0):
     domain.write_time()
-    thisstagestep = domain.get_quantity('stage')
-    stagestep.append(max(max(thisstagestep.get_values())))
 
-s = '%.2f, %.2f\n' %(waveheight, max(stagestep))
+# Gauge line
+def gauge_line(west,east,north,south):
+    from Numeric import arange
+    gaugex = arange(west,east,1000.)
+    gauges = []
+    for x in gaugex:
+        y = (north+south)/2.
+        gauges.append([x,y])
+    return gauges
+
+#-----------------------------------------------------------------------------
+# Interrogate solution
+#-----------------------------------------------------------------------------
+
+gauges = gauge_line(west,east,north,south)
+
+f = file_function(gauges)
+minw = 10000.0
+theminw = minw
+minws = []
+for k, g in enumerate(gauges):
+    for i, t in enumerate(f.get_time()):
+         if w < minw: minw = w
+    minws.append(minw) 
+    if theminw < minw: 
+       theminw = minw
+       gaugeloc = k
+
+filename = 'maxrunup'+waveheight+'.csv'
+fid = open(filename,'w')    
+s = 'Waveheight,Runup distance,Runup height\n'
 fid.write(s)
+gaugestar = gauges[gaugeloc]
+s = '%.2f, %.2f/n' %(waveheight,gaugestar[0],gaugestar[1])
+fid.write(s)
+
+from pylab import plot, xlabel, ylabel, title
+plot(gaugex,minws,'g-',gaugestar[0],gaugestar[1],'r*')
+xlabel('x')
+ylabel('stage')
+title('Minimum stage for gauge line')
