Index: /trunk/anuga_core/source/anuga/__init__.py
===================================================================
--- /trunk/anuga_core/source/anuga/__init__.py	(revision 8756)
+++ /trunk/anuga_core/source/anuga/__init__.py	(revision 8757)
@@ -27,4 +27,6 @@
 # Make selected classes available directly
 #-----------------------------------------------------
+
+
 from anuga.__metadata__ import __version__, __date__, __author__
 
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/neighbour_mesh.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/neighbour_mesh.py	(revision 8756)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/neighbour_mesh.py	(revision 8757)
@@ -858,35 +858,56 @@
 
 
-        #print 'check neighbours'
+        # check that neighbour of neighbour is self
 
         # 0 neighbours
         neighs = self.neighbours
-        nids = neighs[:,0]
-        eids = self.neighbour_edges[:,0]
-
-        ids = num.arange(len(nids))
-        nnid = num.where(nids>-1, 3*nids+eids, 0)
-        
-        #assert num.all(num.where(nids>-1, neighs[nnid]-ids, 0)==0)
-
-
-
-
-
-
-
-        # Check neighbour structure
-        for i in xrange(N):
-            # For each triangle
-
-            for k, neighbour_id in enumerate(self.neighbours[i,:]):
-
-                #Assert that my neighbour's neighbour is me
-                #Boundaries need not fulfill this
-                if neighbour_id >= 0:
-                    edge = self.neighbour_edges[i, k]
-                    msg = 'Triangle %d has neighbour %d but it does not point back. \n' %(i,neighbour_id)
-                    msg += 'Only points to (%s)' %(self.neighbours[neighbour_id,:])
-                    assert self.neighbours[neighbour_id, edge] == i ,msg
+        ids = num.arange(len(neighs))
+
+        # 0 neighbours
+        nid = neighs[:,0]
+        eid = self.neighbour_edges[:,0]
+        nnid = num.argwhere(nid>-1).reshape(-1,)
+        nid = nid[nnid]
+        eid = eid[nnid]
+        id  = ids[nnid]
+
+        assert num.all(neighs[nid,eid] == id)
+
+        # 1 neighbours
+        nid = neighs[:,1]
+        eid = self.neighbour_edges[:,1]
+        nnid = num.argwhere(nid>-1).reshape(-1,)
+        nid = nid[nnid]
+        eid = eid[nnid]
+        id  = ids[nnid]
+
+        assert num.all(neighs[nid,eid] == id)
+
+        # 2 neighbours
+        nid = neighs[:,2]
+        eid = self.neighbour_edges[:,2]
+        nnid = num.argwhere(nid>-1).reshape(-1,)
+        nid = nid[nnid]
+        eid = eid[nnid]
+        id  = ids[nnid]
+
+        assert num.all(neighs[nid,eid] == id)
+
+
+
+
+#        # Check neighbour structure
+#        for i in xrange(N):
+#            # For each triangle
+#
+#            for k, neighbour_id in enumerate(self.neighbours[i,:]):
+#
+#                #Assert that my neighbour's neighbour is me
+#                #Boundaries need not fulfill this
+#                if neighbour_id >= 0:
+#                    edge = self.neighbour_edges[i, k]
+#                    msg = 'Triangle %d has neighbour %d but it does not point back. \n' %(i,neighbour_id)
+#                    msg += 'Only points to (%s)' %(self.neighbours[neighbour_id,:])
+#                    assert self.neighbours[neighbour_id, edge] == i ,msg
 
 
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_neighbour_mesh.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_neighbour_mesh.py	(revision 8756)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_neighbour_mesh.py	(revision 8757)
@@ -1849,5 +1849,5 @@
 
 if __name__ == "__main__":
-    suite = unittest.makeSuite(Test_Mesh, 'test_')
+    suite = unittest.makeSuite(Test_Mesh, 'test_mesh_and_neighbours')
     runner = unittest.TextTestRunner()#verbosity=2)
     runner.run(suite)
Index: /trunk/anuga_core/source/anuga/file/sww.py
===================================================================
--- /trunk/anuga_core/source/anuga/file/sww.py	(revision 8756)
+++ /trunk/anuga_core/source/anuga/file/sww.py	(revision 8757)
@@ -722,7 +722,7 @@
         outfile.variables['tri_l2g'][:] = tri_l2g.astype(num.int32)
 
-        print node_l2g.shape
+        #print node_l2g.shape
         #print node_l2g
-        print outfile.variables['node_l2g'].shape
+        #print outfile.variables['node_l2g'].shape
 
         outfile.variables['node_l2g'][:] = node_l2g.astype(num.int32)
Index: /trunk/anuga_core/source/anuga/file_conversion/file_conversion.py
===================================================================
--- /trunk/anuga_core/source/anuga/file_conversion/file_conversion.py	(revision 8756)
+++ /trunk/anuga_core/source/anuga/file_conversion/file_conversion.py	(revision 8757)
@@ -22,4 +22,6 @@
                             netcdf_float
 
+from anuga.anuga_exceptions import *
+
 
 #shallow water imports
Index: /trunk/anuga_core/source/anuga/file_conversion/test_file_conversion.py
===================================================================
--- /trunk/anuga_core/source/anuga/file_conversion/test_file_conversion.py	(revision 8756)
+++ /trunk/anuga_core/source/anuga/file_conversion/test_file_conversion.py	(revision 8757)
@@ -12,6 +12,7 @@
 from anuga.config import netcdf_float, epsilon, g
 from Scientific.IO.NetCDF import NetCDFFile
-from anuga.file_conversion.file_conversion import tsh2sww, \
-                        pmesh_to_domain_instance
+
+from anuga.file_conversion.file_conversion import tsh2sww
+from anuga.file_conversion.file_conversion import timefile2netcdf
 
 
@@ -888,5 +889,59 @@
         os.remove(sww.filename)
 
-
+    def test_timefile2netcdf_seconds(self):
+
+        pass
+        #Write txt time file
+        root = 'timefile2netcdf_seconds'
+
+        file_text = root+'.txt'
+        fid = open(file_text, 'w')
+        fid.write(
+"""0.0, 1.328223 0 0
+0.1, 1.292912 0
+0.2, 1.292912 0 0
+""")
+        fid.flush()
+        fid.close()
+
+        # Expecting error to be raised
+        try:
+            timefile2netcdf(file_text)
+        except:
+            pass
+
+        # Should pass
+        timefile2netcdf(file_text, time_as_seconds=True)
+        
+        #os.remove(root+'.tms')
+        os.remove(root+'.txt')
+        
+
+    def test_timefile2netcdf(self):
+
+        #Write txt time file
+        root = 'timefile2netcdf'
+
+        file_text = root+'.txt'
+        fid = open(file_text, 'w')
+        fid.write(
+"""31/08/04 00:00:00, 1.328223 0 0
+31/08/04 00:15:00, 1.292912 0 0
+31/08/04 00:30:00, 1.292912 0 0
+""")
+        fid.flush()
+        fid.close()
+
+        # Expecting error to be raised
+        try:
+            timefile2netcdf(file_text,time_as_seconds=True)
+        except:
+            pass
+
+        # Should pass
+        timefile2netcdf(file_text)
+
+        #os.remove(root+'.tms')
+        os.remove(root+'.txt')
 
 #-------------------------------------------------------------
Index: /trunk/anuga_core/source/anuga/fit_interpolate/fit.py
===================================================================
--- /trunk/anuga_core/source/anuga/fit_interpolate/fit.py	(revision 8756)
+++ /trunk/anuga_core/source/anuga/fit_interpolate/fit.py	(revision 8757)
@@ -576,9 +576,9 @@
 
         if verbose:
-            log.critical('FitInterpolate: Building mesh')
+            log.critical('_fit_to_mesh: Building mesh')
         mesh = Mesh(vertex_coordinates, triangles)
 
-        # This is very slow!
-        mesh.check_integrity()
+        # Don't need this as we have just created the mesh
+        #mesh.check_integrity()
 
     interp = Fit(mesh=mesh,
Index: /trunk/anuga_core/source/anuga/fit_interpolate/general_fit_interpolate.py
===================================================================
--- /trunk/anuga_core/source/anuga/fit_interpolate/general_fit_interpolate.py	(revision 8756)
+++ /trunk/anuga_core/source/anuga/fit_interpolate/general_fit_interpolate.py	(revision 8757)
@@ -100,5 +100,8 @@
                 if verbose:
                     log.critical('FitInterpolate: Building mesh')
+					
+
                 self.mesh = Mesh(vertex_coordinates, triangles)
+
                 #self.mesh.check_integrity() # Time consuming
             else:
Index: /trunk/anuga_core/source/anuga_parallel/test_parallel_file_boundary.py
===================================================================
--- /trunk/anuga_core/source/anuga_parallel/test_parallel_file_boundary.py	(revision 8756)
+++ /trunk/anuga_core/source/anuga_parallel/test_parallel_file_boundary.py	(revision 8757)
@@ -421,6 +421,6 @@
         Br = Reflective_boundary(domain_drchlt)
         #Bd = Dirichlet_boundary([2.0+tide,220+10*tide,-220-10*tide])
-        Bd = Time_boundary(domain=domain_drchlt, f=lambda t: [2.0+t/finaltime+tide,220.+10.*tide+10.*t/finaltime,-220.-10.*tide-10.*t/finaltime])
-        #Bd = Time_boundary(domain=domain_drchlt,f=lambda t: [2.0+num.sin(t)+tide,10.*(2+20.+num.sin(t)+tide),-10.*(2+20.+num.sin(t)+tide)])
+        Bd = Time_boundary(domain=domain_drchlt, function=lambda t: [2.0+t/finaltime+tide,220.+10.*tide+10.*t/finaltime,-220.-10.*tide-10.*t/finaltime])
+        #Bd = Time_boundary(domain=domain_drchlt,function=lambda t: [2.0+num.sin(t)+tide,10.*(2+20.+num.sin(t)+tide),-10.*(2+20.+num.sin(t)+tide)])
         domain_drchlt.set_boundary({'ocean': Bd,'otherocean': Br})
        
