Index: /anuga_validation/okushiri_2005/compare_timeseries.py
===================================================================
--- /anuga_validation/okushiri_2005/compare_timeseries.py	(revision 3912)
+++ /anuga_validation/okushiri_2005/compare_timeseries.py	(revision 3913)
@@ -5,5 +5,5 @@
 """
 
-from Numeric import allclose
+from Numeric import allclose, argmin, argmax
 from Scientific.IO.NetCDF import NetCDFFile
 
@@ -67,15 +67,83 @@
 
 
-expected_covariances = {'Boundary': 5.299487474489660856e-05,
-                        'ch5': 1.169650160375980370e-04,
-                        'ch7': 1.123947836450141360e-04,
-                        'ch9': 1.248329330436513066e-04}
-
-expected_differences = {'Boundary': 8.269932106586290379e-04,
-                        'ch5': 3.411769502897898498e-03, 
-                        'ch7': 2.777024544282339583e-03,
-                        'ch9': 3.183530359567784788e-03}
-
-
+#expected_covariances = {'Boundary': 5.299487474489660856e-05,
+#                        'ch5': 1.169650160375980370e-04,
+#                        'ch7': 1.123947836450141360e-04,
+#                        'ch9': 1.248329330436513066e-04}
+#
+#expected_differences = {'Boundary': 8.269932106586290379e-04,
+#                        'ch5': 3.411769502897898498e-03, 
+#                        'ch7': 2.777024544282339583e-03,
+#                        'ch9': 3.183530359567784788e-03}
+#
+
+
+expected_covariance = {'Boundary': 5.265850426352561254e-05, 
+                       'ch5': 1.171913883449135149e-04,
+                       'ch7': 1.130834789656423632e-04,
+                       'ch9': 1.257648236914514148e-04}
+
+expected_difference = {'Boundary': 9.188561500629542633e-04,
+                       'ch5': 3.439740513194261117e-03,
+                       'ch7': 2.868914369295409543e-03,
+                       'ch9': 3.287722754612562841e-03}
+
+expected_maximum_diff = {'Boundary': 4.865498851439054029e-05,
+                         'ch5': 1.808007760316858448e-03,
+                         'ch7': 5.464055727564115506e-04,
+                         'ch9': 1.856547605566957748e-03}
+
+expected_minimum_diff = {'Boundary': 2.293007809784416290e-04,
+                         'ch5': 1.494336068527772621e-04,
+                         'ch7': 4.515664278503157131e-03,
+                         'ch9': 3.406785970601119290e-03}
+
+expected_argmax_timelag = {'Boundary': 3.000000000000007105e-01,
+                           'ch5': 9.999999999999786837e-02,
+                           'ch7': 0.000000000000000000e+00,
+                           'ch9': 0.000000000000000000e+00}
+
+expected_argmin_timelag = {'Boundary': 3.000000000000007105e-01,
+                           'ch5': 8.499999999999996447e-01,
+                           'ch7': 4.500000000000010658e-01,
+                           'ch9': 9.499999999999992895e-01}
+
+
+# Results from lwru2_variable_mesh.sww
+#
+#Validating Boundary
+#Covariance = 5.265850426352561254e-05
+#Accumulated difference = 9.188561500629542633e-04
+#Difference in maxima = 4.865498851439054029e-05
+#Difference in minima = 2.293007809784416290e-04
+#Timelag between maxima = 3.000000000000007105e-01
+#Timelag between minima = 3.000000000000007105e-01
+#Next
+#
+#Validating ch5
+#Covariance = 1.171913883449135149e-04
+#Accumulated difference = 3.439740513194261117e-03
+#Difference in maxima = 1.808007760316858448e-03
+#Difference in minima = 1.494336068527772621e-04
+#Timelag between maxima = 9.999999999999786837e-02
+#Timelag between minima = 8.499999999999996447e-01
+#Next#
+#
+#Validating ch7
+#Covariance = 1.130834789656423632e-04
+#Accumulated difference = 2.868914369295409543e-03
+#Difference in maxima = 5.464055727564115506e-04
+#Difference in minima = 4.515664278503157131e-03
+#Timelag between maxima = 0.000000000000000000e+00
+#Timelag between minima = 4.500000000000010658e-01
+#
+#Next
+#Validating ch9
+#Covariance = 1.257648236914514148e-04
+#Accumulated difference = 3.287722754612562841e-03
+#Difference in maxima = 1.856547605566957748e-03
+#Difference in minima = 3.406785970601119290e-03
+#Timelag between maxima = 0.000000000000000000e+00
+#Timelag between minima = 9.499999999999992895e-01
 
 
@@ -149,18 +217,20 @@
         model.append(f(t, point_id=k)[0])
 
+
     # Covariance measures    
     res = cov(observed_timeseries, model)     
     print 'Covariance = %.18e' %res
 
-    if res < expected_covariances[name]-eps:
-        print 'Result is better than expected by: %.18e'\
-              %(res-expected_covariances[name])
-        print 'Expect = %.18e' %expected_covariances[name]    
-    elif res > expected_covariances[name]+eps:
-        print 'FAIL: Result is worse than expected by: %.18e'\
-                                %(res-expected_covariances[name])
-        print 'Expect = %.18e' %expected_covariances[name]
-    else:
-        pass
+    if res < expected_covariance[name]-eps:
+        print '  Result is better than expected by: %.18e'\
+              %(res-expected_covariance[name])
+        print '  Expect = %.18e' %expected_covariance[name]    
+    elif res > expected_covariance[name]+eps:
+        print '  FAIL: Result is worse than expected by: %.18e'\
+                                %(res-expected_covariance[name])
+        print '  Expect = %.18e' %expected_covariance[name]
+    else:
+        pass
+    
 
     # Difference measures    
@@ -168,12 +238,78 @@
     print 'Accumulated difference = %.18e' %res
 
-    if res < expected_differences[name]-eps:
-        print 'Result is better than expected by: %.18e'\
-              %(res-expected_differences[name])
-        print 'Expect = %.18e' %expected_differences[name]    
-    elif res > expected_differences[name]+eps:
-        print 'FAIL: Result is worse than expected by: %.18e'\
-                                %(res-expected_differences[name])
-        print 'Expect = %.18e' %expected_differences[name]
+    if res < expected_difference[name]-eps:
+        print '  Result is better than expected by: %.18e'\
+              %(res-expected_difference[name])
+        print '  Expect = %.18e' %expected_difference[name]    
+    elif res > expected_difference[name]+eps:
+        print '  FAIL: Result is worse than expected by: %.18e'\
+                                %(res-expected_difference[name])
+        print '  Expect = %.18e' %expected_difference[name]
+    else:
+        pass
+
+
+    # Extrema
+    res = abs(max(observed_timeseries)-max(model))
+    print 'Difference in maxima = %.18e' %res
+
+    if res < expected_maximum_diff[name]-eps:
+        print '  Result is better than expected by: %.18e'\
+              %(res-expected_maximum_diff[name])
+        print '  Expect = %.18e' %expected_maximum_diff[name]    
+    elif res > expected_maximum_diff[name]+eps:
+        print '  FAIL: Result is worse than expected by: %.18e'\
+                                %(res-expected_maximum_diff[name])
+        print '  Expect = %.18e' %expected_maximum_diff[name]
+    else:
+        pass
+    
+
+    
+    res = abs(min(observed_timeseries)-min(model))
+    print 'Difference in minima = %.18e' %res
+
+    if res < expected_minimum_diff[name]-eps:
+        print '  Result is better than expected by: %.18e'\
+              %(res-expected_minimum_diff[name])
+        print '  Expect = %.18e' %expected_minimum_diff[name]    
+    elif res > expected_minimum_diff[name]+eps:
+        print '  FAIL: Result is worse than expected by: %.18e'\
+                                %(res-expected_minimum_diff[name])
+        print '  Expect = %.18e' %expected_minimum_diff[name]
+    else:
+        pass
+    
+
+    # Locations of extrema
+    i0 = argmax(observed_timeseries)
+    i1 = argmax(model)
+    res = abs(reference_time[i1] - reference_time[i0])
+    print 'Timelag between maxima = %.18e' %res
+
+    if res < expected_argmax_timelag[name]-eps:
+        print '  Result is better than expected by: %.18e'\
+              %(res-expected_argmax_timelag[name])
+        print '  Expect = %.18e' %expected_argmax_timelag[name]    
+    elif res > expected_argmax_timelag[name]+eps:
+        print '  FAIL: Result is worse than expected by: %.18e'\
+                                %(res-expected_argmax_timelag[name])
+        print '  Expect = %.18e' %expected_argmax_timelag[name]
+    else:
+        pass
+    
+
+    i0 = argmin(observed_timeseries)
+    i1 = argmin(model)
+    res = abs(reference_time[i1] - reference_time[i0])
+    print 'Timelag between minima = %.18e' %res
+    if res < expected_argmin_timelag[name]-eps:
+        print '  Result is better than expected by: %.18e'\
+              %(res-expected_argmin_timelag[name])
+        print '  Expect = %.18e' %expected_argmin_timelag[name]    
+    elif res > expected_argmin_timelag[name]+eps:
+        print '  FAIL: Result is worse than expected by: %.18e'\
+                                %(res-expected_argmin_timelag[name])
+        print '  Expect = %.18e' %expected_argmin_timelag[name]
     else:
         pass
@@ -186,5 +322,5 @@
         hold(False)
     
-        plot(reference_time, validation_data[name], 'r.-',
+        plot(reference_time, validation_data[name], 'r-',
              reference_time, model, 'k-')
         title('Gauge %s' %name)
Index: /anuga_validation/okushiri_2005/create_okushiri.py
===================================================================
--- /anuga_validation/okushiri_2005/create_okushiri.py	(revision 3912)
+++ /anuga_validation/okushiri_2005/create_okushiri.py	(revision 3913)
@@ -152,13 +152,24 @@
     
 
-    # Island area and drawdown region
+    # Island area and drawdown region (original)
     island_0 = [xleft + 2*(xright-xleft)/3+1.2, ytop-0.5]
     island_1 = [xleft + 2*(xright-xleft)/3+0.5, ybottom + 2*(ytop-ybottom)/3]
-    island_2 = [xleft + (xright-xleft)/2+0.4, ybottom + 2*(ytop-ybottom)/3-0.3]
-    island_3 = [xleft + (xright-xleft)/2+0.4, ybottom + (ytop-ybottom)/3+0.3]
-    island_4 = [xleft + 2*(xright-xleft)/3+0.4, ybottom + (ytop-ybottom)/3-0.3]
-    island_5 = [xleft + 2*(xright-xleft)/3+1.2, ybottom+0.8]
-    island_6 = [xl-.01, yb]  # Keep right edge just off the gulleys
-    island_7 = [xl-.01, yt]
+    island_2 = [xleft + (xright-xleft)/2+0.3, ybottom + 2*(ytop-ybottom)/3-0.3]
+    island_3 = [xleft + (xright-xleft)/2+0.3, ybottom + (ytop-ybottom)/3+0.3]
+    island_4 = [xleft + 2*(xright-xleft)/3+0.4, ybottom + (ytop-ybottom)/3-0.3] 
+    island_5 = [xleft + 2*(xright-xleft)/3+1.2, ybottom+0.2]
+    island_6 = [xl-.01, yb]  #OK
+    island_7 = [xl-.01, yt]  #OK      
+
+
+    # Island area and drawdown region
+    #island_0 = [xleft + 2*(xright-xleft)/3+1.2, ytop-0.5]
+    #island_1 = [xleft + 2*(xright-xleft)/3+0.5, ybottom + 2*(ytop-ybottom)/3]
+    #island_2 = [xleft + (xright-xleft)/2+0.4, ybottom + 2*(ytop-ybottom)/3-0.3]
+    #island_3 = [xleft + (xright-xleft)/2+0.4, ybottom + (ytop-ybottom)/3+0.3]
+    #island_4 = [xleft + 2*(xright-xleft)/3+0.4, ybottom + (ytop-ybottom)/3-0.3]
+    #island_5 = [xleft + 2*(xright-xleft)/3+1.2, ybottom+0.8]
+    #island_6 = [xl-.01, yb]  # Keep right edge just off the gulleys
+    #island_7 = [xl-.01, yt]
  
     island = [island_0, island_1, island_2,
@@ -167,9 +178,15 @@
 
 
+    # Region spanning half right hand side of domain just inside boundary (org)
+    rhs_nw = [xleft + (xright-xleft)/3+1, ytop-0.02]
+    rhs_sw = [xleft + (xright-xleft)/3+1, ybottom+0.02]
+    rhs_se = [xright-0.02, ybottom+0.02]
+    rhs_ne = [xright-0.02, ytop-0.02]
+
     # Region spanning half right hand side of domain just inside boundary
-    rhs_nw = [xleft + (xright-xleft)/3+1, ytop-1.4]
-    rhs_sw = [xleft + (xright-xleft)/3+1, ybottom+0.5]
-    rhs_se = [xright-0.1, ybottom+0.2]
-    rhs_ne = [xright-0.1, ytop-0.2]    
+    #rhs_nw = [xleft + (xright-xleft)/3+1, ytop-1.4]
+    #rhs_sw = [xleft + (xright-xleft)/3+1, ybottom+0.5]
+    #rhs_se = [xright-0.1, ybottom+0.2]
+    #rhs_ne = [xright-0.1, ytop-0.2]        
 
     rhs_region = [rhs_nw, rhs_ne, rhs_se, rhs_sw]
@@ -179,6 +196,6 @@
     # Interior regions and creation of mesh
     interior_regions = [[rhs_region, 0.0005],
-                        [gulleys, 0.00002*base_resolution],
-                        [island, 0.00007*base_resolution]] 
+                        [island, 0.0003*base_resolution],
+                        [gulleys, 0.00003*base_resolution]]    
 
     meshname = project.mesh_filename + '.msh'
Index: /anuga_validation/okushiri_2005/create_okushiri_original.py
===================================================================
--- /anuga_validation/okushiri_2005/create_okushiri_original.py	(revision 3912)
+++ /anuga_validation/okushiri_2005/create_okushiri_original.py	(revision 3913)
@@ -196,10 +196,13 @@
   
 
+    #inner = m.addRegionEN(island_3[0]+.1, island_3[1]+.1)
+    #inner.setMaxArea(0.00007*base_resolution)
+
     inner = m.addRegionEN(island_3[0]+.1, island_3[1]+.1)
-    inner.setMaxArea(0.00007*base_resolution)
+    inner.setMaxArea(0.0003*base_resolution)    
 
 
     gulleys = m.addRegionEN(p0[0]+0.1, p0[1]+0.1)
-    gulleys.setMaxArea(0.00002*base_resolution)
+    gulleys.setMaxArea(0.00003*base_resolution)
 
 
Index: /anuga_validation/okushiri_2005/project.py
===================================================================
--- /anuga_validation/okushiri_2005/project.py	(revision 3912)
+++ /anuga_validation/okushiri_2005/project.py	(revision 3913)
@@ -17,5 +17,5 @@
 
 # Model output
-output_filename = 'okushiri.sww'
+output_filename = 'okushiri_new.sww'
 
 
