Index: /anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py
===================================================================
--- /anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py	(revision 4701)
+++ /anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py	(revision 4702)
@@ -573,4 +573,7 @@
         # FIXME (Ole): This is under construction. See ticket:192
 
+        from anuga.abstract_2d_finite_volumes.util import\
+             apply_expression_to_dictionary        
+
         if q is None:
             self.quantities_to_be_monitored = None
@@ -582,10 +585,18 @@
             q = [q] # Turn argument into a list
 
-        # Check correcness
+        # Check correcness and initialise
+        self.quantities_to_be_monitored = {}
         for quantity_name in q:
             msg = 'Quantity %s is not a valid conserved quantity'\
                   %quantity_name
             
-            assert quantity_name in self.conserved_quantities, msg
+
+            if not quantity_name in self.quantities:
+                # See if this expression is valid
+                apply_expression_to_dictionary(quantity_name, self.quantities)
+
+            # Initialise extrema
+            self.quantities_to_be_monitored[quantity_name] = [None, None]
+            
 
         if polygon is not None:
@@ -598,5 +609,5 @@
 
 
-        self.quantities_to_be_monitored = q
+        
         self.monitor_polygon = polygon
         self.monitor_time_interval = time_interval        
@@ -694,15 +705,15 @@
 
             x, y = self.get_centroid_coordinates()[k]
-	    radius = self.get_radii()[k]
-	    area = self.get_areas()[k]	    
-            max_speed = self.max_speed[k]	    
+            radius = self.get_radii()[k]
+            area = self.get_areas()[k]      
+            max_speed = self.max_speed[k]           
 
             msg += '  Triangle #%d with centroid (%.4f, %.4f), ' %(k, x, y)
-	    msg += 'area = %.4f and radius = %.4f ' %(area, radius)
+            msg += 'area = %.4f and radius = %.4f ' %(area, radius)
             msg += 'had the largest computed speed: %.6f m/s ' %(max_speed)
-	    if max_speed > 0.0:
+            if max_speed > 0.0:
                 msg += '(timestep=%.6f)\n' %(radius/max_speed)
             else:
-                msg += '(timestep=%.6f)\n' %(0)	    
+                msg += '(timestep=%.6f)\n' %(0)     
             
             # Report all quantity values at vertices
@@ -1015,8 +1026,8 @@
         """Go through list of boundary objects and update boundary values
         for all conserved quantities on boundary.
-	It is assumed that the ordering of conserved quantities is 
-	consistent between the domain and the boundary object, i.e. 
-	the jth element of vector q must correspond to the jth conserved
-	quantity in domain.
+        It is assumed that the ordering of conserved quantities is 
+        consistent between the domain and the boundary object, i.e. 
+        the jth element of vector q must correspond to the jth conserved
+        quantity in domain.
         """
 
@@ -1024,7 +1035,7 @@
         #FIXME: Boundary objects should not include ghost nodes.
         for i, ((vol_id, edge_id), B) in enumerate(self.boundary_objects):
-	    if B is None:
-	        print 'WARNING: Ignored boundary segment %d (None)'
-	    else:
+            if B is None:
+                print 'WARNING: Ignored boundary segment %d (None)'
+            else:
                 q = B.evaluate(vol_id, edge_id)
 
Index: /anuga_core/source/anuga/abstract_2d_finite_volumes/test_domain.py
===================================================================
--- /anuga_core/source/anuga/abstract_2d_finite_volumes/test_domain.py	(revision 4701)
+++ /anuga_core/source/anuga/abstract_2d_finite_volumes/test_domain.py	(revision 4702)
@@ -192,5 +192,51 @@
 
 
-
+    def test_set_quanitities_to_be_monitored(self):
+        """test_set_quanitities_to_be_monitored
+        """
+
+        a = [0.0, 0.0]
+        b = [0.0, 2.0]
+        c = [2.0,0.0]
+        d = [0.0, 4.0]
+        e = [2.0, 2.0]
+        f = [4.0,0.0]
+
+        points = [a, b, c, d, e, f]
+        #bac, bce, ecf, dbe, daf, dae
+        vertices = [ [1,0,2], [1,2,4], [4,2,5], [3,1,4]]
+
+
+        domain = Domain(points, vertices, boundary=None,
+                        conserved_quantities =\
+                        ['stage', 'xmomentum', 'ymomentum'],
+                        other_quantities = ['elevation', 'friction', 'depth'])
+
+
+        assert domain.quantities_to_be_monitored is None
+        domain.set_quantities_to_be_monitored(['stage', 'stage-elevation'])
+        assert len(domain.quantities_to_be_monitored) == 2
+        assert domain.quantities_to_be_monitored.has_key('stage')
+        assert domain.quantities_to_be_monitored.has_key('stage-elevation')
+        assert domain.quantities_to_be_monitored['stage'][0] == None
+        assert domain.quantities_to_be_monitored['stage'][1] == None                
+        
+
+        # Check that invalid request are dealt with
+        try:
+            domain.set_quantities_to_be_monitored(['yyyyy'])        
+        except:
+            pass
+        else:
+            msg = 'Should have caught illegal quantity'
+            raise Exception, msg
+
+        try:
+            domain.set_quantities_to_be_monitored(['stage-xx'])        
+        except NameError:
+            pass
+        else:
+            msg = 'Should have caught illegal quantity'
+            raise Exception, msg        
 
     def test_set_quantity_from_expression(self):
