Index: /anuga_core/source/anuga/shallow_water/data_manager.py
===================================================================
--- /anuga_core/source/anuga/shallow_water/data_manager.py	(revision 5601)
+++ /anuga_core/source/anuga/shallow_water/data_manager.py	(revision 5602)
@@ -4926,21 +4926,27 @@
     assert nt>0,msg
     
-    OFFSET=5 #number of site parameters p passed back with data
-    #p=[geolat,geolon,depth,start_tstep,finish_tstep]
-
-    times=dt*arange(1,(data.shape[1]-OFFSET)+1)
-    latitudes=zeros(data.shape[0],Float)
-    longitudes=zeros(data.shape[0],Float)
-    elevation=zeros(data.shape[0],Float)
-    quantity=zeros((data.shape[0],data.shape[1]-OFFSET),Float)
+    OFFSET=5 # Number of site parameters p passed back with data
+             # p=[geolat,geolon,depth,start_tstep,finish_tstep]
+
+    parameters_index = data.shape[1]-OFFSET          
+             
+    times=dt*arange(parameters_index)    
+    latitudes=zeros(data.shape[0], Float)
+    longitudes=zeros(data.shape[0], Float)
+    elevation=zeros(data.shape[0], Float)
+    quantity=zeros((data.shape[0], parameters_index), Float)
+    
+    
     starttime=1e16
-    for i in range(0,data.shape[0]):
-        latitudes[i]=data[i][data.shape[1]-OFFSET]
-        longitudes[i]=data[i][data.shape[1]-OFFSET+1]
-        elevation[i]=-data[i][data.shape[1]-OFFSET+2]
-        quantity[i]=data[i][:-OFFSET]
-        starttime=min(dt*data[i][data.shape[1]-OFFSET+3],starttime)
+    for i in range(0, data.shape[0]):
+        latitudes[i]=data[i][parameters_index]
+        longitudes[i]=data[i][parameters_index+1]
+        elevation[i]=-data[i][parameters_index+2]
+        quantity[i][:]=data[i][:parameters_index] # Was data[i][:-OFFSET] 
+        
+        starttime=min(dt*data[i][parameters_index+3],starttime)
         
     return times, latitudes, longitudes, elevation, quantity, starttime
+    
 
 def mux2sww_time(mux_times, mint, maxt):
Index: /anuga_core/source/anuga/shallow_water/test_data_manager.py
===================================================================
--- /anuga_core/source/anuga/shallow_water/test_data_manager.py	(revision 5601)
+++ /anuga_core/source/anuga/shallow_water/test_data_manager.py	(revision 5602)
@@ -6147,6 +6147,9 @@
         msg='time array has incorrect length'
         assert times.shape[0]==time_step_count,msg
+        
         msg = 'time array is incorrect'
-        assert allclose(times,time_step*arange(1,time_step_count+1)),msg
+        #assert allclose(times,time_step*arange(1,time_step_count+1)),msg
+        assert allclose(times,time_step*arange(time_step_count)), msg
+        
         msg='Incorrect gauge positions returned'
         for i,point in enumerate(lat_long_points):
@@ -6612,6 +6615,9 @@
             msg = 'sts starttime for source %d was %f. Should have been %f'\
                 %(source_number, sts_starttime, starttime)
+                
             #assert allclose(sts_starttime-delta_t, starttime), msg
             ## FIXME - have done a dodgy to get it through here ###   
+            
+            #print source_filename, sts_starttime, starttime
             assert allclose(sts_starttime, starttime), msg             
             
Index: /anuga_core/source/anuga/shallow_water/urs_ext.c
===================================================================
--- /anuga_core/source/anuga/shallow_water/urs_ext.c	(revision 5601)
+++ /anuga_core/source/anuga/shallow_water/urs_ext.c	(revision 5602)
@@ -35,5 +35,5 @@
 void fillDataArray(int ista, int total_number_of_stations, int nt, int ig, int *nst, 
                    int *nft, float *data, int *istart_p, 
-           int *istop_p, float *muxData)
+		   int *istop_p, float *muxData)
 {
     int it, last_it, jsta;
@@ -42,8 +42,8 @@
 
     last_it = -1;
-    /* make arrays of starting and finishing time steps for the tide gauges */
+    /* Make arrays of starting and finishing time steps for the tide gauges */
     /* and fill them from the file */
 
-    /* update start and stop timesteps for this gauge */
+    /* Update start and stop timesteps for this gauge */
     if (nst[ista]!= -1)
     {
@@ -158,10 +158,10 @@
 //Internal Functions
 int _read_mux2_headers(int numSrc, 
-                        char **muxFileNameArray, 
-                        int* total_number_of_stations,
-						int* number_of_time_steps,
-						double* delta_t,
-                        //long* numDataMax,
-                        int verbose)
+		       char **muxFileNameArray, 
+		       int* total_number_of_stations,
+		       int* number_of_time_steps,
+		       double* delta_t,
+		       //long* numDataMax,
+		       int verbose)
 {
     FILE *fp;
@@ -415,5 +415,8 @@
         fseek(fp, offset, 0);
 
-        numData = getNumData(fros + isrc*total_number_of_stations, lros + isrc*total_number_of_stations, total_number_of_stations);
+        numData = getNumData(fros + isrc*total_number_of_stations, 
+			     lros + isrc*total_number_of_stations, 
+			     total_number_of_stations);
+			     
         fread(muxData, numData*sizeof(float), 1, fp); 
         fclose(fp);
