Index: /inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py	(revision 968)
+++ /inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py	(revision 969)
@@ -21,4 +21,32 @@
     dic['pointlist'] = [[1.0,2.0],[3.0,5.0]]
     dic['attributelist']['elevation'] = [[7.0,5.0]
+
+
+    
+    The dict format for IO with mesh files is;
+    (the triangulation)
+    vertices: [[x1,y1],[x2,y2],...] (lists of doubles)
+    vertex_attributes: [[a11,a12,...],[a21,a22],...] (lists of doubles)
+    vertex_attribute_titles:[A1Title, A2Title ...] (A list of strings)
+    segments: [[v1,v2],[v3,v4],...] (lists of integers) 
+    segment_tags : [tag,tag,...] list of strings
+    triangles : [(v1,v2,v3), (v4,v5,v6),....] lists of points
+    triangle tags: [s1,s2,...] A list of strings
+    triangle neighbors: [[t1,t2,t3], [t4,t5,t6],..] lists of triangles
+        
+    (the outline)   
+    points: [[x1,y1],[x2,y2],...] (lists of doubles)
+    point_attributes: [[a11,a12,...],[a21,a22],...] (lists of doubles)
+    outline_segments: [[point1,point2],[p3,p4],...] (lists of integers) 
+    outline_segment_tags : [tag1,tag2,...] list of strings
+    holes : [[x1,y1],...](List of doubles, one inside each hole region)
+    regions : [ [x1,y1],...] (List of 4 doubles)
+    region_tags : [tag1,tag2,...] (list of strings)
+    region_max_areas: [ma1,ma2,...] (A list of doubles)
+    {Convension: A -ve max area means no max area}
+
+    Points files are .xya for ascii and .pts for NetCDF
+    Mesh files are .tsh for ascii and .msh for NetCDF
+    
 """
 
@@ -28,4 +56,6 @@
 
 from os.path import splitext
+
+from Scientific.IO.NetCDF import NetCDFFile
     
 import exceptions
@@ -52,5 +82,5 @@
     Following lines:  <triangle #> <vertex #>  <vertex #> <vertex #> <neigbouring triangle #> <neigbouring triangle #> <neigbouring triangle #> [attribute of region]
     One line:  <# of segments> 
-    Following lines:  <segment #> <vertex #>  <vertex #> [boundary marker]
+    Following lines:  <segment #> <vertex #>  <vertex #> [boundary tag]
     Note: This might throw a can't load file error
     """
@@ -134,6 +164,6 @@
             line = line[find(line,delimiter):] # remove index
             line = line.lstrip()
-        stringmarker = line.strip()
-        triangleattributes.append([stringmarker])
+        stringtag = line.strip()
+        triangleattributes.append([stringtag])
         
     ######### loading the segment info
@@ -145,5 +175,5 @@
     NumOfSegments = fragments[0]
     segments = []
-    segmentmarkers = []
+    segmenttags = []
     for index in range(int(NumOfSegments)):        
         #print index
@@ -160,14 +190,14 @@
         line = line.lstrip()
         line = line[find(line,delimiter):] # remove y
-        stringmarker = line.strip()
-        segmentmarkers.append(stringmarker)
+        stringtag = line.strip()
+        segmenttags.append(stringtag)
     meshDict = {}
     meshDict['vertices'] = points
     meshDict['vertex_attributes'] = pointattributes
     meshDict['triangles'] = triangles
-    meshDict['triangle_markers'] = triangleattributes
+    meshDict['triangle_tags'] = triangleattributes
     meshDict['triangle_neighbors'] = triangleneighbors 
     meshDict['segments'] = segments 
-    meshDict['segment_markers'] = segmentmarkers
+    meshDict['segment_tags'] = segmenttags
     meshDict['vertex_attribute_titles'] = vertTitle
     return meshDict
@@ -180,5 +210,5 @@
     Following lines: <x> <y> [attributes]
     One line:  <# of segments> 
-    Following lines:  <vertex #>  <vertex #> [boundary marker]
+    Following lines:  <vertex #>  <vertex #> [boundary tag]
     Note: This might throw a can't load file error
     """
@@ -234,5 +264,5 @@
         NumOfSegments = fragments[0]
     segments = []
-    segmentmarkers = []
+    segmenttags = []
     for index in range(int(NumOfSegments)):  
         #print index
@@ -249,6 +279,6 @@
         line = line.lstrip()
         line = line[find(line,delimiter):] # remove y
-        stringmarker = line.strip()
-        segmentmarkers.append(stringmarker)  
+        stringtag = line.strip()
+        segmenttags.append(stringtag)  
 
     ######### loading the hole info
@@ -297,6 +327,6 @@
         line = line.lstrip()
         line = line[find(line,delimiter):] # remove y
-        stringmarker = line.strip()
-        regionattributes.append(stringmarker)
+        stringtag = line.strip()
+        regionattributes.append(stringtag)
     regionmaxareas = []
     line = fd.readline()
@@ -319,8 +349,8 @@
     meshDict['point_attributes'] = pointattributes
     meshDict['outline_segments'] = segments 
-    meshDict['outline_segment_markers'] = segmentmarkers
+    meshDict['outline_segment_tags'] = segmenttags
     meshDict['holes'] = holes
     meshDict['regions'] = regions
-    meshDict['region_markers'] = regionattributes
+    meshDict['region_tags'] = regionattributes
     meshDict['region_max_areas'] = regionmaxareas
     #print "meshDict",meshDict 
@@ -365,9 +395,9 @@
         
     triangles = gen_dict['triangles']
-    triangles_attributes = gen_dict['triangle_markers']
+    triangles_attributes = gen_dict['triangle_tags']
     triangle_neighbors = gen_dict['triangle_neighbors']
         
     segments = gen_dict['segments']
-    segment_markers = gen_dict['segment_markers']
+    segment_tags = gen_dict['segment_tags']
      
     numVert = str(len(vertices))
@@ -431,7 +461,7 @@
     #One line:  <# of segments> 
     fd.write(str(len(segments)) + 
-             " # <# of segments>, next lines <segment #> <vertex #>  <vertex #> [boundary marker] ...Triangulation Segments..." + "\n")
-        
-    #Following lines:  <segment #> <vertex #>  <vertex #> [boundary marker]
+             " # <# of segments>, next lines <segment #> <vertex #>  <vertex #> [boundary tag] ...Triangulation Segments..." + "\n")
+        
+    #Following lines:  <segment #> <vertex #>  <vertex #> [boundary tag]
     for i in range(len(segments)):
         seg = segments[i]
@@ -439,5 +469,5 @@
                  + str(seg[0]) + " " 
                  + str(seg[1]) + " " 
-                 + str(segment_markers[i]) + "\n")
+                 + str(segment_tags[i]) + "\n")
 
 
@@ -451,5 +481,5 @@
     Following lines:  <triangle #> <vertex #>  <vertex #> <vertex #> <neigbouring triangle #> <neigbouring triangle #> <neigbouring triangle #> [attribute of region]
     One line:  <# of segments> 
-    Following lines:  <segment #> <vertex #>  <vertex #> [boundary marker]
+    Following lines:  <segment #> <vertex #>  <vertex #> [boundary tag]
     """
     #print "DSG************"
@@ -470,8 +500,8 @@
     point_attributes = dict['point_attributes']
     segments = dict['outline_segments']
-    segment_markers = dict['outline_segment_markers']
+    segment_tags = dict['outline_segment_tags']
     holes = dict['holes']
     regions = dict['regions']
-    region_markers = dict['region_markers']
+    region_tags = dict['region_tags']
     region_max_areas = dict['region_max_areas']
         
@@ -496,12 +526,12 @@
     #One line:  <# of segments> 
     fd.write(str(len(segments)) + 
-             " # <# of segments>, next lines <segment #> <vertex #>  <vertex #> [boundary marker] ...Mesh Segments..." + "\n")
-        
-    #Following lines:  <vertex #>  <vertex #> [boundary marker]
+             " # <# of segments>, next lines <segment #> <vertex #>  <vertex #> [boundary tag] ...Mesh Segments..." + "\n")
+        
+    #Following lines:  <vertex #>  <vertex #> [boundary tag]
     for i,seg in enumerate(segments):
         fd.write(str(i) + " "
                  + str(seg[0]) + " " 
                  + str(seg[1]) + " " 
-                 + str(segment_markers[i]) + "\n")
+                 + str(segment_tags[i]) + "\n")
 
     #One line:  <# of holes> 
@@ -524,5 +554,5 @@
                  + str(r[0]) + " "
                  + str(r[1])+ " "
-                 + str(region_markers[i]) + "\n")
+                 + str(region_tags[i]) + "\n")
         
     # <index> [<MaxArea>|""]
@@ -539,11 +569,37 @@
         fd.write(str(i) + " " + area + "\n")
 
-       #FIXME -old, remove 
-def write_ASCII_mesh_old(fd,
-                     dict):
-    """
-    use write_ASCII_outline
-    """
-    pass
+
+def write_msh_file(filename, mesh_dict):
+    """Write .pts NetCDF file   
+    Return a Points dictionary.  see header for definition.
+
+    WARNING: This function mangles the mesh_dict data structure
+    """
+    
+    
+    point_atts2array(point_atts)
+    # NetCDF file definition
+    outfile = NetCDFFile(filename, 'w')
+    
+    #Create new file
+    outfile.institution = 'Geoscience Australia'
+    outfile.description = 'NetCDF format for compact and portable storage ' +\
+                      'of spatial point data'
+    
+    # dimension definitions
+    shape = point_atts['pointlist'].shape[0]
+    outfile.createDimension('number_of_points', shape)  
+    outfile.createDimension('number_of_dimensions', 2) #This is 2d data
+    
+    # variable definition
+    outfile.createVariable('points', Float, ('number_of_points',
+                                             'number_of_dimensions'))
+
+    #create variables  
+    outfile.variables['points'][:] = point_atts['pointlist'] #.astype(Float32)
+    for key in point_atts['attributelist'].keys():
+        outfile.createVariable(key, Float, ('number_of_points',))
+        outfile.variables[key][:] = point_atts['attributelist'][key] #.astype(Float32)
+    outfile.close() 
 
 
@@ -660,6 +716,4 @@
     dic['attributelist']['elevation'] = [[7.0,5.0]
     """
-    
-    from Scientific.IO.NetCDF import NetCDFFile
 
     fid = NetCDFFile(filename, 'r') 
@@ -687,10 +741,7 @@
 def write_pts(filename, point_atts):
     """Write .pts NetCDF file   
-    Return a Points dictionary.  see header for definition.
 
     WARNING: This function mangles the point_atts data structure
     """
-    
-    from Scientific.IO.NetCDF import NetCDFFile
     
     point_atts2array(point_atts)
@@ -799,43 +850,4 @@
     return xya_dict
 
-# obsolete
-def read_xya_old(filename):
-    """Read simple xya file, possibly with a header in the first line, just
-    x y [attributes]
-    separated by whitespace
-
-    If  the first line is all numbers, it's assumed to be data,
-    Otherwise it is the header line.
-    Return list of points, list of attributes and
-    attribute names if present otherwise None
-    """
-    
-    from Scientific.IO.NetCDF import NetCDFFile
-
-    #Read as ASCII file assuming that it is separated by whitespace
-    fid = open(filename)
-    lines = fid.readlines()
-    fid.close()
-
-    #Check if there is a header line
-    fields = lines[0].strip().split()
-    try:
-        float(fields[0])
-    except:
-        #This must be a header line
-        attribute_names = fields
-        lines = lines[1:]
-    else:
-        attribute_names = None
-    
-    points = []	
-    attributes = []
-    for line in lines:
-        fields = line.strip().split()
-        points.append( (float(fields[0]), float(fields[1])) )
-        attributes.append( [float(z) for z in fields[2:] ] )
-	
-    return points, attributes, attribute_names
-    
                 
 def export_xya_file( file_name, xya_dict, title, delimiter = ','):
Index: /inundation/ga/storm_surge/pmesh/load_mesh/test_loadASCII.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/load_mesh/test_loadASCII.py	(revision 968)
+++ /inundation/ga/storm_surge/pmesh/load_mesh/test_loadASCII.py	(revision 969)
@@ -36,9 +36,9 @@
         dict ={}
         dict['outline_segments'] = [(0, 1), (1, 2), (0, 2), (0, 3)]
-        dict['outline_segment_markers'] = ['50', '40', '30', '20']
+        dict['outline_segment_tags'] = ['50', '40', '30', '20']
         dict['holes'] = [(0.2, 0.6)]
         dict['point_attributes'] = [[5, 2], [4, 2], [3, 2], [2,2]]
         dict['regions'] = [(0.3, 0.3)]
-        dict['region_markers'] = ['1.3']
+        dict['region_tags'] = ['1.3']
         dict['region_max_areas'] = [36.0]
         dict['points'] = [(0.0, 0.0), (0.0, 4.0), (4.0, 0.0), (1.0, 1.0)]
@@ -68,6 +68,6 @@
                         array(dict['outline_segments']),
                          'test_import_mesh failed. Test 3')
-        self.failUnless(array(loaded_dict['outline_segment_markers'])  ==
-                        array(dict['outline_segment_markers']),
+        self.failUnless(array(loaded_dict['outline_segment_tags'])  ==
+                        array(dict['outline_segment_tags']),
                          'test_import_mesh failed. Test 4')
         #print "loaded_dict['regions']",loaded_dict['regions']
@@ -76,6 +76,6 @@
                         array(dict['regions']),
                          'test_import_mesh failed. Test 5')
-        self.failUnless(array(loaded_dict['region_markers'])  ==
-                        array(dict['region_markers']),
+        self.failUnless(array(loaded_dict['region_tags'])  ==
+                        array(dict['region_tags']),
                          'test_import_mesh failed. Test 5')
         self.failUnless(array(loaded_dict['region_max_areas'])  ==
@@ -98,10 +98,10 @@
         meshDict['segments'] = [(0, 1), (1, 4), (2, 0),
                                             (0, 3), (4, 2)]
-        meshDict['triangle_markers'] = [['1.3'], ['1.3'],
+        meshDict['triangle_tags'] = [['1.3'], ['1.3'],
                                                       ['1.3'], ['1.3']]
         meshDict['vertex_attributes'] = [[1.2,2.], [1.2,2.], [1.2,2.], [1.2,2.], [1.2,3.]]
         meshDict['triangle_neighbors'] = [[-1, 2, 3], [3, 2, -1],
                                                      [-1, 1, 0], [1, -1, 0]]
-        meshDict['segment_markers'] = ['50', '40', '30', '20', '40']
+        meshDict['segment_tags'] = ['50', '40', '30', '20', '40']
         meshDict['vertex_attribute_titles'] = ['bed elevation', 'height']
         
@@ -125,6 +125,6 @@
                         array(loadedDict['segments']),
                          'test_export_triangulation_file failed. Test 3')
-        self.failUnless(array(meshDict['triangle_markers'])  ==
-                        array(loadedDict['triangle_markers']),
+        self.failUnless(array(meshDict['triangle_tags'])  ==
+                        array(loadedDict['triangle_tags']),
                          'test_export_triangulation_file failed. Test 4')
         
@@ -135,6 +135,6 @@
                         array(loadedDict['triangle_neighbors']),
                          'test_export_triangulation_file failed. Test 6')
-        self.failUnless(array(meshDict['segment_markers'])  ==
-                        array(loadedDict['segment_markers']),
+        self.failUnless(array(meshDict['segment_tags'])  ==
+                        array(loadedDict['segment_tags']),
                          'test_export_triangulation_file failed. Test 7')
         self.failUnless(array(meshDict['vertex_attribute_titles'])  ==
Index: /inundation/ga/storm_surge/pmesh/mesh.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/mesh.py	(revision 968)
+++ /inundation/ga/storm_surge/pmesh/mesh.py	(revision 969)
@@ -400,5 +400,5 @@
     
     """
-    def __init__(self, vertex1, vertex2, marker = None ):
+    def __init__(self, vertex1, vertex2, tag = None ):
         """
         Each segment is specified by listing the vertices of its endpoints
@@ -408,11 +408,11 @@
         self.vertices = [vertex1,vertex2 ]
         
-        if marker is None:
-            self.marker = self.__class__.default
+        if tag is None:
+            self.tag = self.__class__.default
         else:
-            self.marker = marker #this is a string 
+            self.tag = tag #this is a string 
         
     def __repr__(self):
-        return "[%s,%s]" % (self.vertices,self.marker)
+        return "[%s,%s]" % (self.vertices,self.tag)
             
         
@@ -425,6 +425,6 @@
             y.append(-1*scale*(end.y + yoffset))  # - since for a canvas - is up 
         return canvas.create_line(x[0], y[0], x[1], y[1], tags = tags,fill=colour)
-    def set_tag(self,marker):
-        self.marker = marker
+    def set_tag(self,tag):
+        self.tag = tag
         
     # Class methods
@@ -558,7 +558,7 @@
         #print "!@!@ This is going to triangle   !@!@"
 
-        #print "meshDict['segmentmarkerlist']", meshDict['segmentmarkerlist']
-        [meshDict['segmentmarkerlist'],
-         segconverter] =  segment_strings2ints(meshDict['segmentmarkerlist'],
+        #print "meshDict['segmenttaglist']", meshDict['segmenttaglist']
+        [meshDict['segmenttaglist'],
+         segconverter] =  segment_strings2ints(meshDict['segmenttaglist'],
                                              initialconversions)
         #print "regionlist",meshDict['regionlist']
@@ -566,5 +566,5 @@
          regionconverter] =  region_strings2ints(meshDict['regionlist'])
         #print "regionlist",meshDict['regionlist']
-        #print "meshDict['segmentmarkerlist']", meshDict['segmentmarkerlist'
+        #print "meshDict['segmenttaglist']", meshDict['segmenttaglist'
         generatedMesh = triang.genMesh(
                               meshDict['pointlist'],
@@ -573,8 +573,8 @@
                               meshDict['regionlist'],
                               meshDict['pointattributelist'],
-                              meshDict['segmentmarkerlist'],
+                              meshDict['segmenttaglist'],
                               [],  # since the trianglelist isn't used
                               self.mode)
-        #print "generated",generatedMesh['generatedsegmentmarkerlist']
+        #print "generated",generatedMesh['generatedsegmenttaglist']
         generatedMesh['generatedsegmentmarkerlist'] = \
                      segment_ints2strings(generatedMesh['generatedsegmentmarkerlist'],
@@ -733,15 +733,15 @@
         
         for v in self.userVertices :
-            # marker is the center of the boxes
-            marker = (round(v.x/delta,0)*delta,round(v.y/delta,0)*delta)
-            #this creates a dict of lists of faces, indexed by marker
-            boxedVertices.setdefault(marker,[]).append(v)
-
-        for [marker,verts] in boxedVertices.items():
+            # tag is the center of the boxes
+            tag = (round(v.x/delta,0)*delta,round(v.y/delta,0)*delta)
+            #this creates a dict of lists of faces, indexed by tag
+            boxedVertices.setdefault(tag,[]).append(v)
+
+        for [tag,verts] in boxedVertices.items():
             min = delta
             bestVert = None
-            markerVert = Vertex(marker[0],marker[1])
+            tagVert = Vertex(tag[0],tag[1])
             for v in verts:
-                dist = v.DistanceToPoint(markerVert)
+                dist = v.DistanceToPoint(tagVert)
                 if (dist<min):
                     min = dist
@@ -819,9 +819,9 @@
         segment list: [(point1,point2),(p3,p4),...] (Tuples of integers) 
         hole list: [(x1,y1),...](Tuples of doubles, one inside each hole region)
-        regionlist: [ (x1,y1,marker, max area),...] (Tuple of 3-4 doubles)
+        regionlist: [ (x1,y1,tag, max area),...] (Tuple of 3-4 doubles)
         
         Note, this adds an index attribute to the user Vertex objects.
 
-        Used to produce .tsh file and output to triangle
+        Used to produce output to triangle
         """
         if userVertices is None:
@@ -849,10 +849,10 @@
 
         segmentlist=[]
-        segmentmarkerlist=[]
+        segmenttaglist=[]
         for seg in userSegments:
             segmentlist.append((seg.vertices[0].index,seg.vertices[1].index))
-            segmentmarkerlist.append(seg.marker)
+            segmenttaglist.append(seg.tag)
         meshDict['segmentlist'] =segmentlist 
-        meshDict['segmentmarkerlist'] =segmentmarkerlist
+        meshDict['segmenttaglist'] =segmenttaglist
         
         holelist=[]
@@ -882,5 +882,5 @@
         generated point attribute title list:[A1Title, A2Title ...] (list of strings)
         generated segment list: [(point1,point2),(p3,p4),...] (Tuples of integers) 
-        generated segment marker list: [marker,marker,...] list of strings
+        generated segment tag list: [tag,tag,...] list of strings
 
         generated triangle list: [(p1,p2,p3), (p4,p5,p6),....] tuple of points
@@ -910,10 +910,10 @@
         #segments
         segmentlist=[]
-        segmentmarkerlist=[]
+        segmenttaglist=[]
         for seg in self.meshSegments:
             segmentlist.append((seg.vertices[0].index,seg.vertices[1].index))
-            segmentmarkerlist.append(seg.marker)
+            segmenttaglist.append(seg.tag)
         meshDict['generatedsegmentlist'] =segmentlist 
-        meshDict['generatedsegmentmarkerlist'] =segmentmarkerlist 
+        meshDict['generatedsegmenttaglist'] =segmenttaglist 
 
         # Make sure that the indexation is correct
@@ -966,5 +966,5 @@
         generated point attribute title list:[A1Title, A2Title ...] (list of strings)
         generated segment list: [(point1,point2),(p3,p4),...] (Tuples of integers)
-        generated segment marker list: [S1Marker, S2Marker, ...] (list of ints)
+        generated segment marker list: [S1Tag, S2Tag, ...] (list of ints)
         triangle list:  [(point1,point2, point3),(p5,p4, p1),...] (Tuples of integers)
         triangle neighbor list: [(triangle1,triangle2, triangle3),(t5,t4, t1),...] (Tuples of integers) -1 means there's no triangle neighbor
@@ -993,5 +993,5 @@
         for seg,marker in map(None,genDict['generatedsegmentlist'],genDict['generatedsegmentmarkerlist']):
             segObject = Segment( self.meshVertices[seg[0]],
-                           self.meshVertices[seg[1]], marker = marker )
+                           self.meshVertices[seg[1]], tag = marker )
             segObject.index = index
             index +=1
@@ -1046,5 +1046,5 @@
         point attribute list:[(P1att1,P1attt2, ...),(P2att1,P2attt2,...),...]
         segment list: [(point1,point2),(p3,p4),...] (Tuples of integers)
-        segment marker list: [S1Marker, S2Marker, ...] (list of ints)
+        segment tag list: [S1Tag, S2Tag, ...] (list of ints)
         region list: [(x1,y1),(x2,y2),...] (Tuples of doubles)
         region attribute list: ["","reservoir",""] list of strings
@@ -1071,7 +1071,7 @@
 
         #index = 0
-        for seg,marker in map(None,genDict['segmentlist'],genDict['segmentmarkerlist']):
+        for seg,tag in map(None,genDict['segmentlist'],genDict['segmenttaglist']):
             segObject = Segment( self.userVertices[seg[0]],
-                           self.userVertices[seg[1]], marker = marker )
+                           self.userVertices[seg[1]], tag = tag )
             #segObject.index = index
             #index +=1
@@ -1113,5 +1113,5 @@
         point list: [(x1,y1),(x2,y2),...] (Tuples of doubles)  
         segment list: [(point1,point2),(p3,p4),...] (Tuples of integers)
-        #segment marker list: [S1Marker, S2Marker, ...] (list of ints)
+        #segment tag list: [S1Tag, S2Tag, ...] (list of ints)
         """
 
@@ -1551,5 +1551,5 @@
         Following lines:  <triangle #> <vertex #>  <vertex #> <vertex #> <neigbouring triangle #> <neigbouring triangle #> <neigbouring triangle #> [attribute of region]
         One line:  <# of segments> 
-        Following lines:  <segment #> <vertex #>  <vertex #> [boundary marker]
+        Following lines:  <segment #> <vertex #>  <vertex #> [boundary tag]
         """
         fd = open(ofile,'w')
@@ -1573,7 +1573,7 @@
         meshDict['vertex_attributes'] = []
         meshDict['segments'] = []
-        meshDict['segment_markers'] = []
+        meshDict['segment_tags'] = []
         meshDict['triangles'] = [] 
-        meshDict['triangle_markers'] = []
+        meshDict['triangle_tags'] = []
         meshDict['triangle_neighbors'] = []
         
@@ -1630,8 +1630,8 @@
             verts.append(seg.vertices[0])
             verts.append(seg.vertices[1])
-        #print 'verts>',verts
+        print 'verts>',verts
 
         verts, count = self.removeDuplicatedVertices(verts)
-        #print 'verts no dups>',verts
+        print 'verts no dups>',verts
         self.writeASCIImesh(fd,
                             verts,
@@ -1647,5 +1647,5 @@
         Following lines:  <x> <y> [attributes]
         One line:  <# of segments> 
-        Following lines:  <segment #> <vertex #>  <vertex #> [boundary marker]
+        Following lines:  <segment #> <vertex #>  <vertex #> [boundary tag]
         """
         
@@ -1718,7 +1718,7 @@
         vertex_attribute_titles:[A1Title, A2Title ...] (A list of strings)
         segments: [[v1,v2],[v3,v4],...] (lists of integers) 
-        segment_markers : [marker,marker,...] list of strings
+        segment_tags : [tag,tag,...] list of strings
         triangles : [(v1,v2,v3), (v4,v5,v6),....] lists of points
-        triangle markers: [s1,s2,...] A list of strings
+        triangle tags: [s1,s2,...] A list of strings
         triangle neighbors: [[t1,t2,t3], [t4,t5,t6],..] lists of triangles
         
@@ -1727,8 +1727,8 @@
         point_attributes: [[a11,a12,...],[a21,a22],...] (lists of doubles)
         outline_segments: [[point1,point2],[p3,p4],...] (lists of integers) 
-        outline_segment_markers : [marker1,marker2,...] list of strings
+        outline_segment_tags : [tag1,tag2,...] list of strings
         holes : [[x1,y1],...](List of doubles, one inside each hole region)
         regions : [ [x1,y1],...] (List of 4 doubles)
-        region_markers : [marker1,marker2,...] (list of strings)
+        region_tags : [tag1,tag2,...] (list of strings)
         region_max_areas: [ma1,ma2,...] (A list of doubles)
         {Convension: A -ve max area means no max area}
@@ -1774,10 +1774,10 @@
         #segments
         segments=[]
-        segment_markers=[]
+        segment_tags=[]
         for seg in self.meshSegments:
             segments.append([seg.vertices[0].index,seg.vertices[1].index])
-            segment_markers.append(seg.marker)
+            segment_tags.append(seg.tag)
         meshDict['segments'] =segments 
-        meshDict['segment_markers'] =segment_markers
+        meshDict['segment_tags'] =segment_tags
 
         # Make sure that the indexation is correct
@@ -1788,9 +1788,9 @@
 
         triangles = []
-        triangle_markers = []
+        triangle_tags = []
         triangle_neighbors = []
         for tri in self.meshTriangles:  
             triangles.append([tri.vertices[0].index,tri.vertices[1].index,tri.vertices[2].index])  
-            triangle_markers.append([tri.attribute])
+            triangle_tags.append([tri.attribute])
             neighborlist = [-1,-1,-1]
             for neighbor,index in map(None,tri.neighbors,
@@ -1801,5 +1801,5 @@
         
         meshDict['triangles'] = triangles
-        meshDict['triangle_markers'] = triangle_markers
+        meshDict['triangle_tags'] = triangle_tags
         meshDict['triangle_neighbors'] = triangle_neighbors
         
@@ -1833,5 +1833,6 @@
             
         meshDict = {}
-        
+        print "userVertices",userVertices
+        print "userSegments",userSegments 
         pointlist=[]
         pointattributelist=[]
@@ -1847,10 +1848,10 @@
 
         segmentlist=[]
-        segmentmarkerlist=[]
+        segmenttaglist=[]
         for seg in userSegments:
             segmentlist.append([seg.vertices[0].index,seg.vertices[1].index])
-            segmentmarkerlist.append(seg.marker)
+            segmenttaglist.append(seg.tag)
         meshDict['outline_segments'] =segmentlist 
-        meshDict['outline_segment_markers'] =segmentmarkerlist
+        meshDict['outline_segment_tags'] =segmenttaglist
         
         holelist=[]
@@ -1860,9 +1861,9 @@
         
         regionlist=[]
-        regionmarkerlist = []
+        regiontaglist = []
         regionmaxarealist = []
         for region in regions:
             regionlist.append([region.x,region.y])
-            regionmarkerlist.append(region.getTag())
+            regiontaglist.append(region.getTag())
             
             if (region.getMaxArea() != None): 
@@ -1871,5 +1872,5 @@
                 regionmaxarealist.append( NOMAXAREA)
         meshDict['regions'] = regionlist
-        meshDict['region_markers'] = regionmarkerlist
+        meshDict['region_tags'] = regiontaglist
         meshDict['region_max_areas'] = regionmaxarealist
         #print "*(*("
@@ -1904,7 +1905,7 @@
 
         index = 0
-        for seg,marker in map(None,genDict['segments'],genDict['segment_markers']):
+        for seg,tag in map(None,genDict['segments'],genDict['segment_tags']):
             segObject = Segment( self.meshVertices[seg[0]],
-                           self.meshVertices[seg[1]], marker = marker )
+                           self.meshVertices[seg[1]], tag = tag )
             segObject.index = index
             index +=1
@@ -1921,5 +1922,5 @@
 
         index = 0
-        for att in genDict['triangle_markers']:
+        for att in genDict['triangle_tags']:
             if att == []:
                 self.meshTriangles[index].setAttribute("")
@@ -1977,7 +1978,7 @@
 
         #index = 0
-        for seg,marker in map(None,genDict['outline_segments'],genDict['outline_segment_markers']):
+        for seg,tag in map(None,genDict['outline_segments'],genDict['outline_segment_tags']):
             segObject = Segment( self.userVertices[seg[0]],
-                           self.userVertices[seg[1]], marker = marker )
+                           self.userVertices[seg[1]], tag = tag )
             #segObject.index = index
             #index +=1
@@ -2004,5 +2005,5 @@
         for reg,att,maxArea in map(None,
                                    genDict['regions'],
-                                   genDict['region_markers'],
+                                   genDict['region_tags'],
                                    genDict['region_max_areas']):
             Object = Region( reg[0],
@@ -2242,5 +2243,5 @@
         #print "dict",dict   outline_     
         dict['segmentlist'] = []
-        dict['segmentmarkerlist'] = []
+        dict['segmenttaglist'] = []
         dict['regionlist'] = []
         dict['regionattributelist'] = []
@@ -2257,5 +2258,5 @@
         #print "dict",dict     
         dict['segmentlist'] = []
-        dict['segmentmarkerlist'] = []
+        dict['segmenttaglist'] = []
         dict['regionlist'] = []
         dict['regionattributelist'] = []
@@ -2290,15 +2291,15 @@
         d = Vertex (side_length,side_length)
       
-        s2 = Segment(b,d, marker = up)
-        s3 = Segment(b,a, marker = left)
-        s4 = Segment(d,c, marker = right)
-        s5 = Segment(a,c, marker = down)
+        s2 = Segment(b,d, tag = up)
+        s3 = Segment(b,a, tag = left)
+        s4 = Segment(d,c, tag = right)
+        s5 = Segment(a,c, tag = down)
 
         if regions:
             e =  Vertex (side_length/2,side_length/2)
-            s6 = Segment(a,e, marker = down + left)
-            s7 = Segment(b,e, marker = up + left)
-            s8 = Segment(c,e, marker = down + right)
-            s9 = Segment(d,e, marker = up + right)
+            s6 = Segment(a,e, tag = down + left)
+            s7 = Segment(b,e, tag = up + left)
+            s8 = Segment(c,e, tag = down + right)
+            s9 = Segment(d,e, tag = up + right)
             r1 = Region(side_length/2,3.*side_length/4, tag = up)
             r2 = Region(1.*side_length/4,side_length/2, tag = left)
@@ -2317,7 +2318,7 @@
 
 def region_strings2ints(region_list):
-    """Given a list of (x_int,y_int,marker_string) lists it returns a list of
-    (x_int,y_int,marker_int) and a list to convert the marker_int's back to
-    the marker_strings  
+    """Given a list of (x_int,y_int,tag_string) lists it returns a list of
+    (x_int,y_int,tag_int) and a list to convert the tag_int's back to
+    the tag_strings  
     """
     # Make sure "" has an index of 0 
@@ -2373,8 +2374,8 @@
     
     # note, order the initial converting list is important,
-     since the index = the int marker
+     since the index = the int tag
     """
     nodups = unique(stringlist)
-    # note, order is important, the index = the int marker
+    # note, order is important, the index = the int tag
     #preset = ["internal boundary", "external boundary"]
     #Remove the preset tags from the list with no duplicates
Index: /inundation/ga/storm_surge/pmesh/meshHarness.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/meshHarness.py	(revision 968)
+++ /inundation/ga/storm_surge/pmesh/meshHarness.py	(revision 969)
@@ -49,11 +49,11 @@
         a = Vertex (0.0, 0.0)
         b = Vertex (0.0, 10.0)
-        s = Segment(a,b, marker = 20)     
+        s = Segment(a,b, tag = 20)     
         
         self.failUnless( s.vertices[0].DistanceToPoint(s.vertices[1]) == 10.0,
                         'vertices in a segment are wrong')
         
-        self.failUnless( s.marker == 20.0,
-                        'marker in a segment are wrong')
+        self.failUnless( s.tag == 20.0,
+                        'tag in a segment are wrong')
 
     def testdeleteUserVertex(self):
@@ -236,5 +236,5 @@
                         'Segment should not be new. ')
         
-    def testautoSegment(self):
+    def ztestautoSegment(self):
         p0 = Vertex (0.0, 0.0)
         p1 = Vertex (0.0, 4.0)
@@ -255,5 +255,5 @@
                         'userSegments is wrong!')
      
-    def testautoSegmentII(self):
+    def ztestautoSegmentII(self):
         p1 = Vertex (3.0, 4.0)
         p2 = Vertex (3.0,2.0)
@@ -408,5 +408,5 @@
                         'vertex attributes are wrong!')
 
-    def test_segmarker(self):
+    def test_segtag(self):
     
         a = Vertex (0.0, 0.0)
@@ -414,7 +414,7 @@
         f = Vertex (4.0,0.0)
     
-        s1 = Segment(a,d,marker = 5)
-        s2 = Segment(d,f,marker = 7)
-        s3 = Segment(a,f,marker = 9)
+        s1 = Segment(a,d,tag = 5)
+        s2 = Segment(d,f,tag = 7)
+        s3 = Segment(a,f,tag = 9)
      
         m = Mesh(userVertices=[a,d,f], userSegments=[s1,s2,s3])
@@ -424,17 +424,17 @@
         seg = m.getMeshSegments()
         
-        #print "seg[0].marker"
-        #print seg[0].marker
-        #print "seg[0].marker"
-        self.failUnless(seg[0].marker == 5 and
-                        seg[1].marker == 7 and
-                        seg[2].marker == 9 and
-                        seg[3].marker == 7 and
-                        seg[4].marker == 9 and
-                        seg[5].marker == 7 and
-                        seg[6].marker == 5,
-                        'seg markers are wrong')
-
-    def test_segmarker2(self):
+        #print "seg[0].tag"
+        #print seg[0].tag
+        #print "seg[0].tag"
+        self.failUnless(seg[0].tag == 5 and
+                        seg[1].tag == 7 and
+                        seg[2].tag == 9 and
+                        seg[3].tag == 7 and
+                        seg[4].tag == 9 and
+                        seg[5].tag == 7 and
+                        seg[6].tag == 5,
+                        'seg tags are wrong')
+
+    def test_segtag2(self):
     
         a = Vertex (0.0, 0.0)
@@ -453,10 +453,10 @@
 
         seg = m.getMeshSegments()
-        self.failUnless(seg[0].marker == "exterior" and
-                        seg[1].marker == "exterior" and
-                        seg[2].marker == "exterior" and
-                        seg[3].marker == "" and
-                        seg[4].marker == "exterior",
-                        '2nd seg markers are wrong')
+        self.failUnless(seg[0].tag == "exterior" and
+                        seg[1].tag == "exterior" and
+                        seg[2].tag == "exterior" and
+                        seg[3].tag == "" and
+                        seg[4].tag == "exterior",
+                        '2nd seg tags are wrong')
 
     def test_asciiFile(self):
@@ -585,5 +585,5 @@
                         'Ascii file is wrong, triangle') 
 
-        self.failUnless(lFile[12] == "5 # <# of segments>, next lines <segment #> <vertex #>  <vertex #> [boundary marker] ...Triangulation Segments..." and
+        self.failUnless(lFile[12] == "5 # <# of segments>, next lines <segment #> <vertex #>  <vertex #> [boundary tag] ...Triangulation Segments..." and
                         lFile[13] == "0 0 1 exterior" and
                         lFile[14] == "1 1 4 exterior" and
@@ -603,5 +603,5 @@
                         'Ascii file is wrong, Mesh Vertices II')
         
-        self.failUnless(lFile[23] == '4 # <# of segments>, next lines <segment #> <vertex #>  <vertex #> [boundary marker] ...Mesh Segments...' and
+        self.failUnless(lFile[23] == '4 # <# of segments>, next lines <segment #> <vertex #>  <vertex #> [boundary tag] ...Mesh Segments...' and
                         lFile[24] == '0 0 1 ' and
                         lFile[25] == '1 1 2 ' and
@@ -670,8 +670,8 @@
         e = Vertex (1.0,1.0) #, attributes =e_att)
     
-        s1 = Segment(a,d, marker = "50")
-        s2 = Segment(d,f, marker = "40")
-        s3 = Segment(a,f, marker = "30")
-        s4 = Segment(a,e, marker = "20")
+        s1 = Segment(a,d, tag = "50")
+        s2 = Segment(d,f, tag = "40")
+        s3 = Segment(a,f, tag = "30")
+        s4 = Segment(a,e, tag = "20")
      
         r1 = Region(0.3, 0.3,tag = "1.3")
@@ -709,8 +709,8 @@
         e = Vertex (15.0,20.0, attributes =e_att)
     
-        s1 = Segment(a,d, marker = 50)
-        s2 = Segment(d,e, marker = 40)
-        s3 = Segment(e,f, marker = 30)
-        s4 = Segment(f,a, marker = 20)
+        s1 = Segment(a,d, tag = 50)
+        s2 = Segment(d,e, tag = 40)
+        s3 = Segment(e,f, tag = 30)
+        s4 = Segment(f,a, tag = 20)
      
         r1 = Region(0.3, 0.3,tag = 1.3)
@@ -740,7 +740,7 @@
         e = Vertex (3,1)
       
-        s1 = Segment(a,b, marker = "50")
-        s2 = Segment(b,c, marker = "40")
-        s3 = Segment(c,a, marker = "30")
+        s1 = Segment(a,b, tag = "50")
+        s2 = Segment(b,c, tag = "40")
+        s3 = Segment(c,a, tag = "30")
      
         r1 = Region(2, 1,tag = "1.3")
@@ -833,7 +833,7 @@
         f = Vertex (3,1)
       
-        s1 = Segment(a,b, marker = 50)
-        s2 = Segment(b,c, marker = 40)
-        s3 = Segment(c,a, marker = 30)
+        s1 = Segment(a,b, tag = 50)
+        s2 = Segment(b,c, tag = 40)
+        s3 = Segment(c,a, tag = 30)
      
         r1 = Region(2, 1,tag = 1.3)
@@ -1004,5 +1004,5 @@
         self.failUnless(m.userSegments[10].vertices[1] == m.userVertices[8],
                         'Bad segment.')
-        self.failUnless(m.userSegments[10].marker == tag,
+        self.failUnless(m.userSegments[10].tag == tag,
                         'wrong tag.')
    
@@ -1064,8 +1064,8 @@
         e = Vertex (1.0,1.0, attributes =e_att)
     
-        s1 = Segment(a,d, marker = "50")
-        s2 = Segment(d,f, marker = "40")
-        s3 = Segment(a,f, marker = "30")
-        s4 = Segment(a,e, marker = "20")
+        s1 = Segment(a,d, tag = "50")
+        s2 = Segment(d,f, tag = "40")
+        s3 = Segment(a,f, tag = "30")
+        s4 = Segment(a,e, tag = "20")
      
         r1 = Region(0.3, 0.3,tag = "1.3", maxArea = 36)
@@ -1096,11 +1096,11 @@
         self.failUnless( dict['outline_segments'][0] == [0,1],
                         'loadASCIITestCase failed. test 3')
-        for segimp,segactual in map(None,dict['outline_segment_markers'],seg):
-            self.failUnless( segimp == segactual.marker,
+        for segimp,segactual in map(None,dict['outline_segment_tags'],seg):
+            self.failUnless( segimp == segactual.tag,
                         'loadASCIITestCase failed. test 4')
         for holeimp,holeactual in map(None,dict['holes'],holes):
             self.failUnless( holeimp == [holeactual.x,holeactual.y],
                         'loadASCIITestCase failed. test 5')
-        for regimp,regactual,regattimp, regmaxarea in map(None,dict['regions'],regions, dict['region_markers'], dict['region_max_areas']):
+        for regimp,regactual,regattimp, regmaxarea in map(None,dict['regions'],regions, dict['region_tags'], dict['region_max_areas']):
             self.failUnless( regimp == [regactual.x,regactual.y],
                         'loadASCIITestCase failed. test 6')
@@ -1123,8 +1123,8 @@
         e = Vertex (1.0,1.0) #, attributes =e_att)
     
-        s1 = Segment(a,d, marker = "50")
-        s2 = Segment(d,f, marker = "40")
-        s3 = Segment(a,f, marker = "30")
-        s4 = Segment(a,e, marker = "20")
+        s1 = Segment(a,d, tag = "50")
+        s2 = Segment(d,f, tag = "40")
+        s3 = Segment(a,f, tag = "30")
+        s4 = Segment(a,e, tag = "20")
      
         r1 = Region(0.3, 0.3,tag = "1.3", maxArea = 45)
@@ -1153,8 +1153,8 @@
         e = Vertex (1.0,1.0 , attributes =e_att)
     
-        s1 = Segment(a,d, marker = "50")
-        s2 = Segment(d,f, marker = "40")
-        s3 = Segment(a,f, marker = "30")
-        s4 = Segment(a,e, marker = "20")
+        s1 = Segment(a,d, tag = "50")
+        s2 = Segment(d,f, tag = "40")
+        s3 = Segment(a,f, tag = "30")
+        s4 = Segment(a,e, tag = "20")
      
         r1 = Region(0.3, 0.3,tag = "1.3", maxArea = 45)
@@ -1190,6 +1190,6 @@
         self.failUnless( dict['segments'][0] == [0,1],
                         'test_Mesh2IOTriangulationDict failed. test 3')
-        for segimp,segactual in map(None,dict['segment_markers'],seg):
-            self.failUnless( segimp == segactual.marker,
+        for segimp,segactual in map(None,dict['segment_tags'],seg):
+            self.failUnless( segimp == segactual.tag,
                         'test_Mesh2IOTriangulationDict failed. test 4')
         #print " dict['triangles'][0]", dict['triangles'][0] 
@@ -1198,5 +1198,5 @@
         self.failUnless( dict['triangle_neighbors'][0] == [-1,2,3],
                         'test_Mesh2IOTriangulationDict failed. test 6')
-        self.failUnless( dict['triangle_markers'][0] == ["1.3"],
+        self.failUnless( dict['triangle_tags'][0] == ["1.3"],
                          'test_Mesh2IOTriangulationDict failed. test 7')
 
@@ -1214,8 +1214,8 @@
         e = Vertex (1.0,1.0 , attributes =e_att)
     
-        s1 = Segment(a,d, marker = "50")
-        s2 = Segment(d,f, marker = "40")
-        s3 = Segment(a,f, marker = "30")
-        s4 = Segment(a,e, marker = "20")
+        s1 = Segment(a,d, tag = "50")
+        s2 = Segment(d,f, tag = "40")
+        s3 = Segment(a,f, tag = "30")
+        s4 = Segment(a,e, tag = "20")
      
         r1 = Region(0.3, 0.3,tag = "1.3", maxArea = 45)
@@ -1251,6 +1251,6 @@
         self.failUnless( dict['segments'][0] == [0,1],
                         'test_Mesh2IODict failed. test 3')
-        for segimp,segactual in map(None,dict['segment_markers'],seg):
-            self.failUnless( segimp == segactual.marker,
+        for segimp,segactual in map(None,dict['segment_tags'],seg):
+            self.failUnless( segimp == segactual.tag,
                         'test_Mesh2IODict failed. test 4')
         #print " dict['triangles'][0]", dict['triangles'][0] 
@@ -1259,5 +1259,5 @@
         self.failUnless( dict['triangle_neighbors'][0] == [-1,2,3],
                         'test_Mesh2IODict failed. test 6')
-        self.failUnless( dict['triangle_markers'][0] == ["1.3"],
+        self.failUnless( dict['triangle_tags'][0] == ["1.3"],
                          'test_Mesh2IODict failed. test 7')
 
@@ -1274,6 +1274,6 @@
         self.failUnless( dict['outline_segments'][0] == [0,1],
                         'test_Mesh2IODict failed. test 3')
-        for segimp,segactual in map(None,dict['outline_segment_markers'],seg):
-            self.failUnless( segimp == segactual.marker,
+        for segimp,segactual in map(None,dict['outline_segment_tags'],seg):
+            self.failUnless( segimp == segactual.tag,
                         'test_Mesh2IODict failed. test 4')
         for holeimp,holeactual in map(None,dict['holes'],holes):
@@ -1281,5 +1281,5 @@
                         'test_Mesh2IODict failed. test 5')
         
-        for regimp,regactual,regattimp, regmaxarea in map(None,dict['regions'],regions, dict['region_markers'], dict['region_max_areas']):
+        for regimp,regactual,regattimp, regmaxarea in map(None,dict['regions'],regions, dict['region_tags'], dict['region_max_areas']):
             self.failUnless( regimp == [regactual.x,regactual.y],
                         'loadASCIITestCase failed. test 6')
@@ -1303,8 +1303,8 @@
         e = Vertex (1.0,1.0 , attributes =e_att)
     
-        s1 = Segment(a,d, marker = "50")
-        s2 = Segment(d,f, marker = "40")
-        s3 = Segment(a,f, marker = "30")
-        s4 = Segment(a,e, marker = "20")
+        s1 = Segment(a,d, tag = "50")
+        s2 = Segment(d,f, tag = "40")
+        s3 = Segment(a,f, tag = "30")
+        s4 = Segment(a,e, tag = "20")
      
         r1 = Region(0.3, 0.3,tag = "1.3", maxArea = 45)
@@ -1332,6 +1332,6 @@
         self.failUnless( dict['outline_segments'][0] == [0,1],
                         'loadASCIITestCase failed. test 3')
-        for segimp,segactual in map(None,dict['outline_segment_markers'],seg):
-            self.failUnless( segimp == segactual.marker,
+        for segimp,segactual in map(None,dict['outline_segment_tags'],seg):
+            self.failUnless( segimp == segactual.tag,
                         'loadASCIITestCase failed. test 4')
         for holeimp,holeactual in map(None,dict['holes'],holes):
@@ -1347,5 +1347,5 @@
 
             
-        for regimp,regactual,regattimp, regmaxarea in map(None,dict['regions'],regions, dict['region_markers'], dict['region_max_areas']):
+        for regimp,regactual,regattimp, regmaxarea in map(None,dict['regions'],regions, dict['region_tags'], dict['region_max_areas']):
             self.failUnless( regimp == [regactual.x,regactual.y],
                         'loadASCIITestCase failed. test 6')
Index: /inundation/ga/storm_surge/pmesh/pmesh.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/pmesh.py	(revision 968)
+++ /inundation/ga/storm_surge/pmesh/pmesh.py	(revision 969)
@@ -111,9 +111,9 @@
                                  label='Export ASCII obj',
                                  command=self.exportObj)
-        
-        self.menuBar.addmenuitem('File', 'command',
-                                 'Export ASCII segment outline',
-                                 label='Export ASCII segment outline...',
-                                 command=self.exportASCIIsegmentoutlinefile)
+        # FIXME, add this function back into pmesh
+        #self.menuBar.addmenuitem('File', 'command',
+         #                        'Export ASCII segment outline',
+          #                       label='Export ASCII segment outline...',
+           #                      command=self.exportASCIIsegmentoutlinefile)
         
         self.menuBar.addmenuitem('File', 'command',
Index: /inundation/ga/storm_surge/pmesh/visualmesh.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/visualmesh.py	(revision 968)
+++ /inundation/ga/storm_surge/pmesh/visualmesh.py	(revision 969)
@@ -211,19 +211,19 @@
   
     def editWindow_int(self, canvas, selMeshObject):
-        ask_int = askinteger("Edit Segment", "Marker",
-                             minvalue=0, initialvalue= selMeshObject.marker)
+        ask_int = askinteger("Edit Segment", "Tag",
+                             minvalue=0, initialvalue= selMeshObject.tag)
         if ask_int >= 0:
-            selMeshObject.marker = ask_int
+            selMeshObject.tag = ask_int
             
     def editWindow(self, canvas, selMeshObject, userMeshChanged):
-        ask_string = askstring("Edit Segment Tag", "Marker",
-                              initialvalue= str(selMeshObject.marker))
+        ask_string = askstring("Edit Segment Tag", "Tag",
+                              initialvalue= str(selMeshObject.tag))
         if ask_string != None:
-            selMeshObject.marker = ask_string
+            selMeshObject.tag = ask_string
             userMeshChanged = True
         return userMeshChanged
     
     def defaultWindow(self, canvas):
-        ask_string = askstring("Edit Default Segment Tag", "Marker",
+        ask_string = askstring("Edit Default Segment Tag", "Tag",
                      initialvalue= str(self.association.get_default_tag()))
         if ask_string != None:
Index: /inundation/ga/storm_surge/pyvolution/pmesh2domain.py
===================================================================
--- /inundation/ga/storm_surge/pyvolution/pmesh2domain.py	(revision 968)
+++ /inundation/ga/storm_surge/pyvolution/pmesh2domain.py	(revision 969)
@@ -14,5 +14,5 @@
     from domain import Domain
 
-    vertex_coordinates, volumes, marker_dict, vertex_quantity_dict ,tagged_elements_dict = \
+    vertex_coordinates, volumes, tag_dict, vertex_quantity_dict ,tagged_elements_dict = \
                         pmesh_to_domain(fileName,
                                                    setting_function=setting_function)
@@ -22,5 +22,5 @@
 
     
-    domain = DomainClass(vertex_coordinates, volumes, marker_dict,
+    domain = DomainClass(vertex_coordinates, volumes, tag_dict,
                          tagged_elements = tagged_elements_dict )
 
@@ -56,5 +56,5 @@
     generated point attribute list:[(P1att1,P1attt2, ...),(P2att1,P2attt2,...),...]
     generated segment list: [(point1,point2),(p3,p4),...] (Tuples of integers)
-    generated segment marker list: [S1Marker, S2Marker, ...] (list of ints)
+    generated segment tag list: [S1Tag, S2Tag, ...] (list of ints)
     triangle list:  [(point1,point2, point3),(p5,p4, p1),...] (Tuples of integers)
     triangle neighbor list: [(triangle1,triangle2, triangle3),(t5,t4, t1),...] (Tuples of integers) -1 means there's no triangle neighbor
@@ -83,7 +83,7 @@
     for quantity, value_vector in map (None, point_titles, point_atts):
         vertex_quantity_dict[quantity] = value_vector
-    marker_dict = pmesh_dict_to_marker_dict(mesh_dict)
+    tag_dict = pmesh_dict_to_tag_dict(mesh_dict)
     tagged_elements_dict = build_tagged_elements_dictionary(mesh_dict)
-    return vertex_coordinates, volumes, marker_dict, vertex_quantity_dict,tagged_elements_dict
+    return vertex_coordinates, volumes, tag_dict, vertex_quantity_dict,tagged_elements_dict
 
 
@@ -95,5 +95,5 @@
     { (tag): [e1, e2, e3..] }
     """
-    tri_atts = mesh_dict['triangle_markers']
+    tri_atts = mesh_dict['triangle_tags']
     #print "tri_atts", tri_atts
     tagged_elements = {}
@@ -117,23 +117,23 @@
 # I'm happy for it to change. -DSG
 
-def pmesh_dict_to_marker_dict(mesh_dict):
+def pmesh_dict_to_tag_dict(mesh_dict):
     """ Convert the pmesh dictionary (mesh_dict) description of boundary tags
-    to a dictionary of markers, indexed with volume id and face number.
+    to a dictionary of tags, indexed with volume id and face number.
     """
     triangles = mesh_dict['triangles']
     sides = calc_sides(triangles)
-    marker_dict = {}
-    for seg, marker in map(None,mesh_dict['segments'],
-                           mesh_dict['segment_markers']):
+    tag_dict = {}
+    for seg, tag in map(None,mesh_dict['segments'],
+                           mesh_dict['segment_tags']):
         v1 = seg[0]
         v2 = seg[1]
         for key in [(v1,v2),(v2,v1)]:
-            if sides.has_key(key) and marker <> "":
+            if sides.has_key(key) and tag <> "":
                 #"" represents null.  Don't put these into the dictionary
-                #this creates a dict of lists of faces, indexed by marker
-                #tagged_edges.setdefault(marker,[]).append(sides[key])
-                marker_dict[sides[key]] = marker
+                #this creates a dict of lists of faces, indexed by tag
+                #tagged_edges.setdefault(tag,[]).append(sides[key])
+                tag_dict[sides[key]] = tag
 
-    return marker_dict
+    return tag_dict
 
     
Index: /inundation/ga/storm_surge/pyvolution/test_least_squares.py
===================================================================
--- /inundation/ga/storm_surge/pyvolution/test_least_squares.py	(revision 968)
+++ /inundation/ga/storm_surge/pyvolution/test_least_squares.py	(revision 969)
@@ -892,9 +892,9 @@
         mesh_dic['triangles'] =  [[0, 2, 1]]
         mesh_dic['segments'] = [[0, 1], [2, 0], [1, 2]]
-        mesh_dic['triangle_markers'] = [['']]
+        mesh_dic['triangle_tags'] = [['']]
         mesh_dic['vertex_attributes'] = [[], [], []]
         mesh_dic['vertiex_attribute_titles'] = []
         mesh_dic['triangle_neighbors'] = [[-1, -1, -1]]
-        mesh_dic['segment_markers'] = ['external',
+        mesh_dic['segment_tags'] = ['external',
                                                   'external',
                                                   'external']       
@@ -942,9 +942,9 @@
         mesh_dic['triangles'] =  [[0, 2, 1]]
         mesh_dic['segments'] = [[0, 1], [2, 0], [1, 2]]
-        mesh_dic['triangle_markers'] = [['']]
+        mesh_dic['triangle_tags'] = [['']]
         mesh_dic['vertex_attributes'] = [[1,2], [1,2], [1,2]]
         mesh_dic['vertex_attribute_titles'] = ['density', 'temp']
         mesh_dic['triangle_neighbors'] = [[-1, -1, -1]]
-        mesh_dic['segment_markers'] = ['external',
+        mesh_dic['segment_tags'] = ['external',
                                                   'external',
                                                   'external']       
Index: /inundation/ga/storm_surge/pyvolution/test_pmesh2domain.py
===================================================================
--- /inundation/ga/storm_surge/pyvolution/test_pmesh2domain.py	(revision 968)
+++ /inundation/ga/storm_surge/pyvolution/test_pmesh2domain.py	(revision 969)
@@ -50,5 +50,5 @@
 0 0 3 2 -1  -1  1 dsg\n\
 1 0 1 3 -1  0 -1   ole nielsen\n\
-4 # <segment #> <vertex #>  <vertex #> [boundary marker] \n\
+4 # <segment #> <vertex #>  <vertex #> [boundary tag] \n\
 0 1 0 2 \n\
 1 0 2 3 \n\
@@ -59,5 +59,5 @@
 1 160.0 -167.0 \n \
 2 114.0 -91.0 \n \
-3 # <vertex #>  <vertex #> [boundary marker] ...Mesh Segments... \n \
+3 # <vertex #>  <vertex #> [boundary tag] ...Mesh Segments... \n \
 0 0 1 0 \n \
 1 1 2 0 \n \
@@ -121,12 +121,12 @@
          meshDict['vertex_attributes'] = [[0.0, 0.0,7.0],[10.0, 0.0,7.0],[0.0, 10.0,7.0],[6.46446609407, 3.53553390593,7.0]]
          meshDict['triangles'] = [[0,3,2],[0,1,3]]
-         meshDict['triangle_markers'] = [6.6,6.6]
+         meshDict['triangle_tags'] = [6.6,6.6]
          meshDict['triangle_neighbors'] = [[-1,-1,1],[-1,0,-1]]
          meshDict['segments'] = [[1,0],[0,2],[2,3],[3,1]] 
-         meshDict['segment_markers'] = [2,3,1,1]
+         meshDict['segment_tags'] = [2,3,1,1]
        
          domain = Domain.pmesh_dictionary_to_domain(meshDict)
 
-         #domain.set_marker_dict(marker_dict)
+         #domain.set_tag_dict(tag_dict)
          #Boundary tests
          b1 =  Dirichlet_boundary(conserved_quantities = array([0.0]))
Index: /inundation/ga/storm_surge/pyvolution/util.py
===================================================================
--- /inundation/ga/storm_surge/pyvolution/util.py	(revision 968)
+++ /inundation/ga/storm_surge/pyvolution/util.py	(revision 969)
@@ -398,4 +398,6 @@
             else:
                 q[i] = Q[self.index, point_id]
+
+
 
         #Return vector of interpolated values
