Index: /anuga_core/source/anuga/shallow_water/data_manager.py
===================================================================
--- /anuga_core/source/anuga/shallow_water/data_manager.py	(revision 7616)
+++ /anuga_core/source/anuga/shallow_water/data_manager.py	(revision 7617)
@@ -2016,5 +2016,4 @@
 def export_grid(basename_in, extra_name_out=None,
                 quantities=None, # defaults to elevation
-                timestep=None,
                 reduction=None,
                 cellsize=10,
@@ -2067,5 +2066,4 @@
             file_out = sww2dem(dir+sep+sww_file, dir+sep+basename_out,
                                quantity,
-                               timestep,
                                reduction,
                                cellsize,
@@ -2197,5 +2195,4 @@
 def sww2dem(basename_in, basename_out=None,
             quantity=None, # defaults to elevation
-            timestep=None,
             reduction=None,
             cellsize=10,
@@ -2248,5 +2245,6 @@
     if timestep (an index) is given, output quantity at that timestep
 
-    if reduction is given use that to reduce quantity over all timesteps.
+    if reduction is given and its an index, output quantity at that timestep. If reduction is given
+    and is a built in function, use that to reduce quantity over all timesteps.
 
     datum
@@ -2258,4 +2256,5 @@
 
     import sys
+    import types
 
     from anuga.utilities.polygon import inside_polygon, outside_polygon, \
@@ -2272,12 +2271,4 @@
     if quantity is None:
         quantity = 'elevation'
-
-    # FIXME (Ole): I reckon we need a check so that
-    # reduction and timestep cannot both be set.    
-    # if reduction is not None and timestep is not None:
-    #     msg = 'Either reduction or timestep must be set'
-    #     msg += ' but not both.'
-    #     raise Exception(msg)
-    
     
     if reduction is None:
@@ -2312,6 +2303,6 @@
     y = fid.variables['y'][:]
     volumes = fid.variables['volumes'][:]
-    if timestep is not None:
-        times = fid.variables['time'][timestep]
+    if type(reduction) is not types.BuiltinFunctionType:
+        times = fid.variables['time'][reduction]
     else:
         times = fid.variables['time'][:]
@@ -2345,5 +2336,5 @@
         log.critical('  Reference:')
         log.critical('    Lower left corner: [%f, %f]' % (xllcorner, yllcorner))
-        if timestep is not None:
+        if type(reduction) is not types.BuiltinFunctionType:
             log.critical('    Time: %f' % times)
         else:
@@ -2354,5 +2345,5 @@
         log.critical('    y [m] in [%f, %f], len(y) == %d'
                      % (num.min(y), num.max(y), len(y.flat)))
-        if timestep is not None:
+        if type(reduction) is not types.BuiltinFunctionType:
             log.critical('    t [s] = %f, len(t) == %d' % (times, 1))
         else:
@@ -2364,6 +2355,6 @@
         for name in ['stage', 'xmomentum', 'ymomentum']:
             q = fid.variables[name][:].flatten()
-            if timestep is not None:
-                q = q[timestep*len(x):(timestep+1)*len(x)]
+            if type(reduction) is not types.BuiltinFunctionType:
+                q = q[reduction*len(x):(reduction+1)*len(x)]
             if verbose: log.critical('    %s in [%f, %f]'
                                      % (name, min(q), max(q)))
@@ -2411,6 +2402,6 @@
             new_res = num.zeros(res.shape[1], num.float)
             for k in xrange(res.shape[1]):
-                if reduction is None:
-                    new_res[k] = res[timestep,k]
+                if type(reduction) is not types.BuiltinFunctionType:
+                    new_res[k] = res[reduction,k]
                 else:
                     new_res[k] = reduction(res[:,k])
@@ -2612,5 +2603,4 @@
 def sww2asc(basename_in, basename_out = None,
             quantity = None,
-            timestep = None,
             reduction = None,
             cellsize = 10,
@@ -2622,5 +2612,4 @@
             basename_out = basename_out,
             quantity = quantity,
-            timestep = timestep,
             reduction = reduction,
             cellsize = cellsize,
@@ -2646,5 +2635,4 @@
 def sww2ers(basename_in, basename_out=None,
             quantity=None,
-            timestep=None,
             reduction=None,
             cellsize=10,
@@ -2656,5 +2644,4 @@
             basename_out=basename_out,
             quantity=quantity,
-            timestep=timestep,
             reduction=reduction,
             cellsize=cellsize,
