Index: /inundation/ga/storm_surge/pyvolution/data_manager.py
===================================================================
--- /inundation/ga/storm_surge/pyvolution/data_manager.py	(revision 340)
+++ /inundation/ga/storm_surge/pyvolution/data_manager.py	(revision 341)
@@ -2,6 +2,6 @@
 There are two kinds of data
 
-  1: Constant data: Vertex coordinates and field values
-  2: Variable data: Conserved quantities
+  1: Constant data: Vertex coordinates and field values. Stored once
+  2: Variable data: Conserved quantities. Stored once per timestep.
 
 All data is assumed to reside at vertex locations.  
@@ -134,134 +134,4 @@
     return glob.glob(pattern)
 
-#Native checkpoint format.
-#Information needed to recreate a state is preserved
-#FIXME: Rethink and maybe use netcdf format
-def cpt_variable_writer(filename, t, v0, v1, v2):
-    """Store all conserved quantities to file
-    """
-
-    M, N = v0.shape
-	
-    FN = create_filename(filename, 'cpt', M, t)
-    #print 'Writing to %s' %FN
-    
-    fid = open(FN, 'w')
-    for i in range(M):
-        for j in range(N):        
-            fid.write('%.16e ' %v0[i,j])            
-        for j in range(N):
-            fid.write('%.16e ' %v1[i,j])                        
-        for j in range(N):
-            fid.write('%.16e ' %v2[i,j])                        
-            
-        fid.write('\n')
-    fid.close()
-
-
-def cpt_variable_reader(filename, t, v0, v1, v2):
-    """Store all conserved quantities to file
-    """
-
-    M, N = v0.shape
-	
-    FN = create_filename(filename, 'cpt', M, t)
-    #print 'Reading from %s' %FN
-    
-    fid = open(FN)
-
-
-    for i in range(M):
-        values = fid.readline().split() #Get one line
-
-        for j in range(N):
-            v0[i,j] = float(values[j])
-            v1[i,j] = float(values[3+j])
-            v2[i,j] = float(values[6+j])
-    
-    fid.close()
-
-def cpt_constant_writer(filename, X0, X1, X2, v0, v1, v2):
-    """Writes x,y,z,z,z coordinates of triangles constituting the bed
-    elevation.
-    Not in use pt
-    """
-
-    M, N = v0.shape
-
-    print X0
-    import sys; sys.exit() 
-    FN = create_filename(filename, 'cpt', M)
-    print 'Writing to %s' %FN
-    
-    fid = open(FN, 'w')
-    for i in range(M):
-        for j in range(2):        
-            fid.write('%.16e ' %X0[i,j])   #x, y
-        for j in range(N):                    
-            fid.write('%.16e ' %v0[i,j])       #z,z,z,
-            
-        for j in range(2):                    
-            fid.write('%.16e ' %X1[i,j])   #x, y
-        for j in range(N):                                
-            fid.write('%.16e ' %v1[i,j])  
-        
-        for j in range(2):                                
-            fid.write('%.16e ' %X2[i,j])   #x, y
-        for j in range(N):                                            
-            fid.write('%.16e ' %v2[i,j]) 
-            
-        fid.write('\n')
-    fid.close()
-
-
-
-#Function for storing out to e.g. visualisation
-#FIXME: Do we want this?
-#FIXME: Not done yet for this version
-def dat_constant_writer(filename, X0, X1, X2, v0, v1, v2):
-    """Writes x,y,z coordinates of triangles constituting the bed elevation.
-    """
-
-    M, N = v0.shape
-	
-    FN = create_filename(filename, 'dat', M)
-    #print 'Writing to %s' %FN
-    
-    fid = open(FN, 'w')
-    for i in range(M):
-        for j in range(2):        
-            fid.write('%f ' %X0[i,j])   #x, y
-        fid.write('%f ' %v0[i,0])       #z
-            
-        for j in range(2):                    
-            fid.write('%f ' %X1[i,j])   #x, y
-        fid.write('%f ' %v1[i,0])       #z
-        
-        for j in range(2):                                
-            fid.write('%f ' %X2[i,j])   #x, y
-        fid.write('%f ' %v2[i,0])       #z
-            
-        fid.write('\n')
-    fid.close()
-
-
-
-def dat_variable_writer(filename, t, v0, v1, v2):
-    """Store water height to file
-    """
-
-    M, N = v0.shape
-	
-    FN = create_filename(filename, 'dat', M, t)
-    #print 'Writing to %s' %FN
-    
-    fid = open(FN, 'w')
-    for i in range(M):
-        fid.write('%.4f ' %v0[i,0])
-        fid.write('%.4f ' %v1[i,0])
-        fid.write('%.4f ' %v2[i,0])        
-
-        fid.write('\n')
-    fid.close()
 
 
@@ -901,2 +771,134 @@
 
 
+#OBSOLETE STUFF
+#Native checkpoint format.
+#Information needed to recreate a state is preserved
+#FIXME: Rethink and maybe use netcdf format
+def cpt_variable_writer(filename, t, v0, v1, v2):
+    """Store all conserved quantities to file
+    """
+
+    M, N = v0.shape
+	
+    FN = create_filename(filename, 'cpt', M, t)
+    #print 'Writing to %s' %FN
+    
+    fid = open(FN, 'w')
+    for i in range(M):
+        for j in range(N):        
+            fid.write('%.16e ' %v0[i,j])            
+        for j in range(N):
+            fid.write('%.16e ' %v1[i,j])                        
+        for j in range(N):
+            fid.write('%.16e ' %v2[i,j])                        
+            
+        fid.write('\n')
+    fid.close()
+
+
+def cpt_variable_reader(filename, t, v0, v1, v2):
+    """Store all conserved quantities to file
+    """
+
+    M, N = v0.shape
+	
+    FN = create_filename(filename, 'cpt', M, t)
+    #print 'Reading from %s' %FN
+    
+    fid = open(FN)
+
+
+    for i in range(M):
+        values = fid.readline().split() #Get one line
+
+        for j in range(N):
+            v0[i,j] = float(values[j])
+            v1[i,j] = float(values[3+j])
+            v2[i,j] = float(values[6+j])
+    
+    fid.close()
+
+def cpt_constant_writer(filename, X0, X1, X2, v0, v1, v2):
+    """Writes x,y,z,z,z coordinates of triangles constituting the bed
+    elevation.
+    Not in use pt
+    """
+
+    M, N = v0.shape
+
+    print X0
+    import sys; sys.exit() 
+    FN = create_filename(filename, 'cpt', M)
+    print 'Writing to %s' %FN
+    
+    fid = open(FN, 'w')
+    for i in range(M):
+        for j in range(2):        
+            fid.write('%.16e ' %X0[i,j])   #x, y
+        for j in range(N):                    
+            fid.write('%.16e ' %v0[i,j])       #z,z,z,
+            
+        for j in range(2):                    
+            fid.write('%.16e ' %X1[i,j])   #x, y
+        for j in range(N):                                
+            fid.write('%.16e ' %v1[i,j])  
+        
+        for j in range(2):                                
+            fid.write('%.16e ' %X2[i,j])   #x, y
+        for j in range(N):                                            
+            fid.write('%.16e ' %v2[i,j]) 
+            
+        fid.write('\n')
+    fid.close()
+
+
+
+#Function for storing out to e.g. visualisation
+#FIXME: Do we want this?
+#FIXME: Not done yet for this version
+def dat_constant_writer(filename, X0, X1, X2, v0, v1, v2):
+    """Writes x,y,z coordinates of triangles constituting the bed elevation.
+    """
+
+    M, N = v0.shape
+	
+    FN = create_filename(filename, 'dat', M)
+    #print 'Writing to %s' %FN
+    
+    fid = open(FN, 'w')
+    for i in range(M):
+        for j in range(2):        
+            fid.write('%f ' %X0[i,j])   #x, y
+        fid.write('%f ' %v0[i,0])       #z
+            
+        for j in range(2):                    
+            fid.write('%f ' %X1[i,j])   #x, y
+        fid.write('%f ' %v1[i,0])       #z
+        
+        for j in range(2):                                
+            fid.write('%f ' %X2[i,j])   #x, y
+        fid.write('%f ' %v2[i,0])       #z
+            
+        fid.write('\n')
+    fid.close()
+
+
+
+def dat_variable_writer(filename, t, v0, v1, v2):
+    """Store water height to file
+    """
+
+    M, N = v0.shape
+	
+    FN = create_filename(filename, 'dat', M, t)
+    #print 'Writing to %s' %FN
+    
+    fid = open(FN, 'w')
+    for i in range(M):
+        fid.write('%.4f ' %v0[i,0])
+        fid.write('%.4f ' %v1[i,0])
+        fid.write('%.4f ' %v2[i,0])        
+
+        fid.write('\n')
+    fid.close()
+
