Index: /development/dam_2006/create_mesh.py
===================================================================
--- /development/dam_2006/create_mesh.py	(revision 3420)
+++ /development/dam_2006/create_mesh.py	(revision 3421)
@@ -9,13 +9,14 @@
 from coordinate_transforms.geo_reference import Geo_reference
 
-import project
-def generate(gate_position, is_course = False):
+
+def generate(mesh_filename, gate_position, is_course = False):
     #Basic geometry
     
-    xleft   = - gate_position
+    xedge   = - gate_position
     xright  = 3.0 - gate_position
     ybottom = 0
     ytop    = 0.4
-    xdam = 0.0 
+    xdam = 0.0
+    xleft = -5.0
 
     #Outline 
@@ -29,4 +30,8 @@
     point_dam_bottom = [xdam, ybottom]
 
+    # Catchment seperation
+    point_edge_top = [xedge, ytop]    
+    point_edge_bottom = [xedge, ybottom]
+    
 
     m = Mesh()
@@ -38,11 +43,14 @@
                       point_ne,
                       point_dam_top,
+                      point_edge_top,
                       point_nw,
                       point_sw,
+                      point_edge_bottom,
                       point_dam_bottom]
 
     dict['segments'] = [[0,1], [1,2], [2,3], [3,4],
-                        [4,5], [5,0],  #The outer border
-                        [2,5]]         #Separator
+                        [4,5], [5,6], [6,7 ],[7,0],  #The outer border
+                        [2,7],         #dam Separator
+                        [3,6]]         #edge Separator
     
     dict['segment_tags'] = ['wall',
@@ -52,4 +60,7 @@
                             'wall',
                             'wall',
+                            'wall',
+                            'wall',
+                            '',
                             '']           #Interior
 
@@ -59,6 +70,12 @@
     dam = m.add_region(0.0000001,(ytop - ybottom)/2)
     # this is the location of the region.
+    dam.setTag("dam")
 
-    dam.setTag("dam")
+    
+    dam = m.add_region(- gate_position - 0.0000001,(ytop - ybottom)/2)
+    # this is the location of the region.
+    dam.setTag("catchment")
+
+    
     if is_course:
         m.generate_mesh(maximum_triangle_area=0.01)
@@ -66,8 +83,8 @@
         m.generate_mesh(maximum_triangle_area=0.0001)
 
-    m.export_mesh_file(project.mesh_filename)
+    m.export_mesh_file(mesh_filename)
     print "mesh created"
 
 #-------------------------------------------------------------
 if __name__ == "__main__":
-    pass
+    generate("aa.tsh", 0.75, is_course = True)
Index: /development/dam_2006/project.py
===================================================================
--- /development/dam_2006/project.py	(revision 3420)
+++ /development/dam_2006/project.py	(revision 3421)
@@ -38,4 +38,5 @@
 #community_scenario = gaugedir + 'community_onslow.csv'
 #gaugetimeseries = gaugedir + 'onslow'
+depth_filename = 
 
 
Index: /development/dam_2006/run_dam.py
===================================================================
--- /development/dam_2006/run_dam.py	(revision 3420)
+++ /development/dam_2006/run_dam.py	(revision 3421)
@@ -51,5 +51,8 @@
     #-------------------------------------------------------------------------
 
-    create_mesh.generate(0.75, is_course=False) # this creates the mesh
+    create_mesh.generate(project.mesh_filename,
+                         0.75,
+                         is_course=True) # this creates the mesh
+                         #is_course=False) # this creates the mesh
 
     head,tail = path.split(project.mesh_filename)
@@ -87,4 +90,8 @@
 
     domain.set_region(Set_region('dam','stage',0.2,
+                                 location = 'unique vertices'))    
+    domain.set_region(Set_region('catchment','elevation',-1,
+                                 location = 'unique vertices'))   
+    domain.set_region(Set_region('catchment','stage',-1,
                                  location = 'unique vertices'))
 
@@ -105,4 +112,19 @@
         print 'finished'
 
+    points = [[-0.1,0.2],
+              [-0.2,0.2],
+              [-0.3,0.2],
+              [-0.4,0.2],
+              [-0.5,0.2],
+              ]
+
+    #-------------------------------------------------------------------------
+    # Calc gauge info
+    #-------------------------------------------------------------------------
+    #interpolate_sww2csv(project.basename +".sww",
+    #                    points,
+    #                    "depth.csv",
+    #                    "velocity.csv")
+
 #-------------------------------------------------------------
 if __name__ == "__main__":
