Index: trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/generic_domain.py
===================================================================
--- trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/generic_domain.py	(revision 8065)
+++ trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/generic_domain.py	(revision 8068)
@@ -62,4 +62,5 @@
                        full_send_dict=None,
                        ghost_recv_dict=None,
+                       starttime=0.0,
                        processor=0,
                        numproc=1,
@@ -253,9 +254,8 @@
 
         # Model time
-        self.time = 0.0
         self.finaltime = None
         self.recorded_min_timestep = self.recorded_max_timestep = 0.0
-        self.starttime = 0 # Physical starttime if any
-                           # (0 is 1 Jan 1970 00:00:00)
+        self.starttime = starttime # Physical starttime if any
+        self.time = self.starttime 
         self.timestep = 0.0
         self.flux_timestep = 0.0
@@ -499,6 +499,5 @@
         """Get the absolute model time (seconds)."""
 
-        return self.time + self.starttime
-
+        return self.time
 
     ##
@@ -1016,4 +1015,5 @@
 
         model_time = self.get_time()
+ 
         if self.recorded_min_timestep == self.recorded_max_timestep:
             msg += 'Time = %.4f, delta t = %.8f, steps=%d' \
@@ -1225,6 +1225,6 @@
         # Observe time interval restriction if any
         if self.monitor_time_interval is not None and\
-               (self.time < self.monitor_time_interval[0] or\
-               self.time > self.monitor_time_interval[1]):
+               (self.get_time() < self.monitor_time_interval[0] or\
+               self.get_time() > self.monitor_time_interval[1]):
             return
 
@@ -1249,5 +1249,5 @@
                 maxloc = Q.get_maximum_location()
                 info_block['max_location'] = maxloc
-                info_block['max_time'] = self.time
+                info_block['max_time'] = self.get_time()
 
             # Update minimum
@@ -1258,5 +1258,5 @@
                 minloc = Q.get_minimum_location()
                 info_block['min_location'] = minloc
-                info_block['min_time'] = self.time
+                info_block['min_time'] = self.get_time()
 
     ##
@@ -1376,4 +1376,6 @@
     def set_starttime(self, time):
         self.starttime = float(time)
+        self.set_time(self.starttime)
+        
 
 ################################################################################
@@ -1427,5 +1429,8 @@
                    % self.get_boundary_tags())
         assert hasattr(self, 'boundary_objects'), msg
-
+        
+        if self.get_time() != self.get_starttime():
+            self.set_time(self.get_starttime())
+        
         if yieldstep is None:
             yieldstep = self.evolve_max_timestep
@@ -1435,4 +1440,6 @@
         self._order_ = self.default_order
 
+        assert finaltime > self.get_starttime(), 'finaltime is less than starttime!'
+        
         if finaltime is not None and duration is not None:
             msg = 'Only one of finaltime and duration may be specified'
@@ -1445,5 +1452,5 @@
 
         N = len(self)                             # Number of triangles
-        self.yieldtime = self.time + yieldstep    # set next yield time
+        self.yieldtime = self.get_time() + yieldstep    # set next yield time
 
         # Initialise interval of timestep sizes (for reporting only)
@@ -1467,6 +1474,4 @@
         self.update_extrema()
 
-
-
         # Or maybe restore from latest checkpoint
         if self.checkpoint is True:
@@ -1474,9 +1479,9 @@
 
         if skip_initial_step is False:
-            yield(self.time)      # Yield initial values
+            yield(self.get_time())      # Yield initial values
 
         while True:
 
-            initial_time = self.time
+            initial_time = self.get_time()
 
             #==========================================
@@ -1484,11 +1489,11 @@
             #==========================================
             if self.get_timestepping_method() == 'euler':
-                self.evolve_one_euler_step(yieldstep, finaltime)
+                self.evolve_one_euler_step(yieldstep, self.finaltime)
 
             elif self.get_timestepping_method() == 'rk2':
-                self.evolve_one_rk2_step(yieldstep, finaltime)
+                self.evolve_one_rk2_step(yieldstep, self.finaltime)
 
             elif self.get_timestepping_method() == 'rk3':
-                self.evolve_one_rk3_step(yieldstep, finaltime)
+                self.evolve_one_rk3_step(yieldstep, self.finaltime)
 
             #==========================================
@@ -1503,5 +1508,5 @@
 
             # Update time
-            self.time = initial_time + self.timestep
+            self.set_time(initial_time + self.timestep)
 
             # Update vertex and edge values
@@ -1519,21 +1524,21 @@
 
             # Yield results
-            if finaltime is not None and self.time >= finaltime-epsilon:
-                if self.time > finaltime:
+            if self.finaltime is not None and self.get_time() >= self.finaltime-epsilon:
+                
+                if self.get_time() > self.finaltime:
                     # FIXME (Ole, 30 April 2006): Do we need this check?
                     # Probably not (Ole, 18 September 2008).
                     # Now changed to Exception.
-                    msg = ('WARNING (domain.py): time overshot finaltime. '
-                           'Contact Ole.Nielsen@ga.gov.au')
+                    msg = ('WARNING (domain.py): time overshot finaltime. ')
                     raise Exception, msg
 
                 # Log and then Yield final time and stop
-                self.time = finaltime
+                self.set_time(self.finaltime)
                 self.log_operator_timestepping_statistics()
-                yield(self.time)
+                yield(self.get_time())
                 break
 
             # if we are at the next yield point
-            if self.time >= self.yieldtime:
+            if self.get_time() >= self.yieldtime:
                 # Yield (intermediate) time and allow inspection of domain
                 if self.checkpoint is True:
@@ -1543,5 +1548,5 @@
                 # Log and then Pass control on to outer loop for more specific actions
                 self.log_operator_timestepping_statistics()
-                yield(self.time)
+                yield(self.get_time())
 
                 # Reinitialise
@@ -1614,5 +1619,5 @@
 
         # Update time
-        self.time += self.timestep
+        self.set_time(self.get_time() + self.timestep)
 
         # Update vertex and edge values
@@ -1663,5 +1668,5 @@
         self.backup_conserved_quantities()
 
-        initial_time = self.time
+        initial_time = self.get_time()
 
         ######
@@ -1685,5 +1690,5 @@
 
         # Update time
-        self.time += self.timestep
+        self.set_time(self.time + self.timestep)
 
         # Update vertex and edge values
@@ -1721,5 +1726,5 @@
 
         # Set substep time
-        self.time = initial_time + self.timestep*0.5
+        self.set_time(initial_time + self.timestep*0.5)
 
         # Update vertex and edge values
@@ -1754,5 +1759,5 @@
 
         # Set new time
-        self.time = initial_time + self.timestep
+        self.set_time(initial_time + self.timestep)
 
 
@@ -1941,10 +1946,10 @@
 
         # Ensure that final time is not exceeded
-        if finaltime is not None and self.time + timestep > finaltime :
-            timestep = finaltime-self.time
+        if finaltime is not None and self.get_time() + timestep > finaltime :
+            timestep = finaltime - self.get_time()
 
         # Ensure that model time is aligned with yieldsteps
-        if self.time + timestep > self.yieldtime:
-            timestep = self.yieldtime - self.time
+        if self.get_time() + timestep > self.yieldtime:
+            timestep = self.yieldtime - self.get_time()
 
         self.timestep = timestep
@@ -2075,5 +2080,5 @@
             for i in range(self.number_of_full_triangles):
                 if self.max_speed[i] > bins[-1]:
-                    msg = 'Time=%f: Ignoring isolated high ' % self.time
+                    msg = 'Time=%f: Ignoring isolated high ' % self.get_time()
                     msg += 'speed triangle '
                     msg += '#%d of %d with max speed=%f' \
Index: trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_gauge.py
===================================================================
--- trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_gauge.py	(revision 8065)
+++ trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_gauge.py	(revision 8068)
@@ -245,6 +245,7 @@
         
         domain = self.domain
-        domain.set_starttime(5)
-        self._create_sww()
+        domain.set_starttime(1)
+        
+        self._create_sww(timestep=2)
         
         # test the function
@@ -258,5 +259,5 @@
 point2, 0.5, 2.0, 9.0\n")
         file_id.close()
-
+        
         sww2csv_gauges(self.sww.filename, 
                             points_file,
@@ -265,5 +266,5 @@
 
 #        point1_answers_array = [[0.0,1.0,-5.0,3.0,4.0], [2.0,10.0,-5.0,3.0,4.0]]
-        point1_answers_array = [[5.0,5.0/3600.,1.0,6.0,-5.0,3.0,4.0], [7.0,7.0/3600.,10.0,15.0,-5.0,3.0,4.0]]
+        point1_answers_array = [[2.0,2.0/3600.,1.0,6.0,-5.0,3.0,4.0], [3.0,3.0/3600.,10.0,15.0,-5.0,3.0,4.0]]
         point1_filename = 'gauge_point1.csv'
         point1_handle = file(point1_filename)
@@ -279,5 +280,5 @@
             assert num.allclose(line[i], point1_answers_array[i])
 
-        point2_answers_array = [[5.0,5.0/3600.,1.0,1.5,-0.5,3.0,4.0], [7.0,7.0/3600.,10.0,10.5,-0.5,3.0,4.0]]
+        point2_answers_array = [[2.0,2.0/3600.,1.0,1.5,-0.5,3.0,4.0], [3.0,3.0/3600.,10.0,10.5,-0.5,3.0,4.0]]
         point2_filename = 'gauge_point2.csv' 
         point2_handle = file(point2_filename)
Index: trunk/anuga_core/source/anuga/file/sww.py
===================================================================
--- trunk/anuga_core/source/anuga/file/sww.py	(revision 8065)
+++ trunk/anuga_core/source/anuga/file/sww.py	(revision 8068)
@@ -941,5 +941,5 @@
     
     try:
-        domain = Domain(coordinates, volumes, boundary)
+        domain = Domain(coordinates, volumes, boundary, starttime=(float(starttime) + float(t)))
     except AssertionError, e:
         fid.close()
@@ -952,7 +952,4 @@
 
     domain.geo_reference = geo_reference
-
-    domain.starttime = float(starttime) + float(t)
-    domain.time = 0.0
 
     for quantity in other_quantities:
Index: trunk/anuga_core/source/anuga/file/test_read_sww.py
===================================================================
--- trunk/anuga_core/source/anuga/file/test_read_sww.py	(revision 8065)
+++ trunk/anuga_core/source/anuga/file/test_read_sww.py	(revision 8068)
@@ -151,6 +151,4 @@
             new_domain.set_quantity(qname, q)    
 
-
-        new_domain.set_starttime(sww_file.get_time())
         #------------------------------------------------------------------
         # Setup boundary conditions
Index: trunk/anuga_core/source/anuga/file/test_sww.py
===================================================================
--- trunk/anuga_core/source/anuga/file/test_sww.py	(revision 8065)
+++ trunk/anuga_core/source/anuga/file/test_sww.py	(revision 8068)
@@ -103,5 +103,4 @@
         #Now evolve them both, just to be sure
         ######################################x
-        domain.time = 0.
         from time import sleep
 
@@ -116,7 +115,7 @@
             pass
 
-        final = final - (domain2.starttime-domain.starttime)
         #BUT since domain1 gets time hacked back to 0:
-        final = final + (domain2.starttime-domain.starttime)
+        
+        final = final + (domain2.get_starttime() - domain.get_starttime())
 
         domain2.smooth = False
Index: trunk/anuga_core/source/anuga/file_conversion/test_urs2sts.py
===================================================================
--- trunk/anuga_core/source/anuga/file_conversion/test_urs2sts.py	(revision 8065)
+++ trunk/anuga_core/source/anuga/file_conversion/test_urs2sts.py	(revision 8068)
@@ -1411,4 +1411,5 @@
         
         domain_drchlt = Domain(meshname)
+        domain_drchlt.set_starttime(2.0)
         domain_drchlt.set_quantity('stage', tide)
         Br = Reflective_boundary(domain_drchlt)
@@ -1554,4 +1555,5 @@
 
         domain_drchlt = Domain(meshname)
+        domain_drchlt.set_starttime(2.0)
         domain_drchlt.set_quantity('stage', tide)
         Br = Reflective_boundary(domain_drchlt)
@@ -1919,4 +1921,5 @@
         
         domain_drchlt = Domain(meshname)
+        domain_drchlt.set_starttime(2.0)
         domain_drchlt.set_quantity('stage', tide)
         Br = Reflective_boundary(domain_drchlt)
Index: trunk/anuga_core/source/anuga/shallow_water/shallow_water_domain.py
===================================================================
--- trunk/anuga_core/source/anuga/shallow_water/shallow_water_domain.py	(revision 8065)
+++ trunk/anuga_core/source/anuga/shallow_water/shallow_water_domain.py	(revision 8068)
@@ -106,4 +106,5 @@
                  full_send_dict=None,
                  ghost_recv_dict=None,
+                 starttime=0,
                  processor=0,
                  numproc=1,
@@ -140,4 +141,5 @@
             other_quantities = ['elevation', 'friction']
         
+        
         Generic_Domain.__init__(self,
                             coordinates,
@@ -155,4 +157,5 @@
                             full_send_dict,
                             ghost_recv_dict,
+                            starttime,
                             processor,
                             numproc,
@@ -563,5 +566,5 @@
         self.distribute_to_vertices_and_edges()
 
-        if self.store is True and self.time == 0.0:
+        if self.store is True and self.get_time() == self.get_starttime():
             self.initialise_storage()
 
Index: trunk/anuga_core/source/anuga/shallow_water/test_data_manager.py
===================================================================
--- trunk/anuga_core/source/anuga/shallow_water/test_data_manager.py	(revision 8065)
+++ trunk/anuga_core/source/anuga/shallow_water/test_data_manager.py	(revision 8068)
@@ -783,4 +783,7 @@
         
         temp_time=num.zeros(int(finaltime/yieldstep)+1,num.float)
+        
+        domain_time.set_starttime(domain_fbound.get_starttime())
+        
         for i, t in enumerate(domain_time.evolve(yieldstep=yieldstep,
                                                    finaltime=finaltime, 
@@ -831,5 +834,5 @@
 if __name__ == "__main__":
     #suite = unittest.makeSuite(Test_Data_Manager, 'test_sww2domain2')
-    suite = unittest.makeSuite(Test_Data_Manager, 'test_sww')
+    suite = unittest.makeSuite(Test_Data_Manager, 'test')
     
     
Index: trunk/anuga_core/source/anuga/shallow_water/test_forcing.py
===================================================================
--- trunk/anuga_core/source/anuga/shallow_water/test_forcing.py	(revision 8065)
+++ trunk/anuga_core/source/anuga/shallow_water/test_forcing.py	(revision 8068)
@@ -591,9 +591,6 @@
         domain.forcing_terms.append(R)
 
-        # This will test that time used in the forcing function takes
-        # startime into account.
-        domain.starttime = 5.0
-
-        domain.time = 7.
+        # This will test that time is set to starttime in set_starttime
+        domain.set_starttime(5.0)
 
         domain.compute_forcing_terms()
@@ -602,9 +599,5 @@
                             (3*domain.get_time() + 7)/1000)
         assert num.allclose(domain.quantities['stage'].explicit_update[1],
-                            (3*(domain.time + domain.starttime) + 7)/1000)
-
-        # Using internal time her should fail
-        assert not num.allclose(domain.quantities['stage'].explicit_update[1],
-                                (3*domain.time + 7)/1000)
+                            (3*domain.get_starttime() + 7)/1000)
 
         assert num.allclose(domain.quantities['stage'].explicit_update[0], 0)
@@ -657,9 +650,6 @@
         domain.forcing_terms.append(R)
 
-        # This will test that time used in the forcing function takes
-        # startime into account.
-        domain.starttime = 5.0
-
-        domain.time = 7.
+        # This will test that time is set to starttime in set_starttime
+        domain.set_starttime(5.0)
 
         domain.compute_forcing_terms()
@@ -668,9 +658,5 @@
                             (3*domain.get_time() + 7)/1000)
         assert num.allclose(domain.quantities['stage'].explicit_update[1],
-                            (3*(domain.time + domain.starttime) + 7)/1000)
-
-        # Using internal time her should fail
-        assert not num.allclose(domain.quantities['stage'].explicit_update[1],
-                                (3*domain.time + 7)/1000)
+                            (3*domain.get_starttime() + 7)/1000)
 
         assert num.allclose(domain.quantities['stage'].explicit_update[0], 0)
Index: trunk/anuga_core/source/anuga/shallow_water/test_forcing_terms.py
===================================================================
--- trunk/anuga_core/source/anuga/shallow_water/test_forcing_terms.py	(revision 8065)
+++ trunk/anuga_core/source/anuga/shallow_water/test_forcing_terms.py	(revision 8068)
@@ -887,9 +887,6 @@
         domain.forcing_terms.append(R)
 
-        # This will test that time used in the forcing function takes
-        # startime into account.
-        domain.starttime = 5.0
-
-        domain.time = 7.
+        # This will test that time is set to starttime in set_starttime
+        domain.set_starttime(5.0)
 
         domain.compute_forcing_terms()
@@ -898,9 +895,5 @@
                             (3*domain.get_time() + 7)/1000)
         assert num.allclose(domain.quantities['stage'].explicit_update[1],
-                            (3*(domain.time + domain.starttime) + 7)/1000)
-
-        # Using internal time her should fail
-        assert not num.allclose(domain.quantities['stage'].explicit_update[1],
-                                (3*domain.time + 7)/1000)
+                            (3*domain.get_starttime() + 7)/1000)
 
         assert num.allclose(domain.quantities['stage'].explicit_update[0], 0)
@@ -953,9 +946,6 @@
         domain.forcing_terms.append(R)
 
-        # This will test that time used in the forcing function takes
-        # startime into account.
-        domain.starttime = 5.0
-
-        domain.time = 7.
+        # This will test that time is set to starttime in set_starttime
+        domain.set_starttime(5.0)
 
         domain.compute_forcing_terms()
@@ -964,9 +954,6 @@
                             (3*domain.get_time() + 7)/1000)
         assert num.allclose(domain.quantities['stage'].explicit_update[1],
-                            (3*(domain.time + domain.starttime) + 7)/1000)
-
-        # Using internal time her should fail
-        assert not num.allclose(domain.quantities['stage'].explicit_update[1],
-                                (3*domain.time + 7)/1000)
+                            (3*domain.get_starttime() + 7)/1000)
+
 
         assert num.allclose(domain.quantities['stage'].explicit_update[0], 0)
Index: trunk/anuga_core/source/anuga/shallow_water/test_system.py
===================================================================
--- trunk/anuga_core/source/anuga/shallow_water/test_system.py	(revision 8065)
+++ trunk/anuga_core/source/anuga/shallow_water/test_system.py	(revision 8068)
@@ -83,5 +83,5 @@
         """
      
-        boundary_starttime = 500
+        boundary_starttime = 0
         boundary_filename = self.create_sww_boundary(boundary_starttime)
         filename = tempfile.mktemp(".sww")
@@ -131,5 +131,5 @@
         """
         
-        boundary_starttime = 500
+        boundary_starttime = 0
         boundary_filename = self.create_sww_boundary(boundary_starttime)
         #print "boundary_filename",boundary_filename 
@@ -147,5 +147,5 @@
         domain.set_name(senario_name)                 
         domain.set_datadir(dir)
-        new_starttime = 510.
+        new_starttime = 0.
         domain.set_starttime(new_starttime)
 
@@ -178,5 +178,5 @@
         msg += "Not logic. "
         msg += "It's testing that starttime is working"
-        assert num.allclose(stage[2,0], 11.9867153168),msg
+        assert num.allclose(stage[2,0], 4.7981238),msg
         
         
