Index: /anuga_work/production/australia_ph2/albany/export_results_max.py
===================================================================
--- /anuga_work/production/australia_ph2/albany/export_results_max.py	(revision 6539)
+++ /anuga_work/production/australia_ph2/albany/export_results_max.py	(revision 6540)
@@ -22,12 +22,12 @@
 directory = project.output_folder
 
-time_dir1 = '20090225_153629_run_final_0_64469_mhingee'
-##time_dir2 = ''
-##time_dir3 = ''
+time_dir1 = '20090310_171457_run_final_0_64344_1330_Tb_mhingee'
+time_dir2 = '20090310_171537_run_final_0_46697_1330_Tb_mhingee'
+time_dir3 = '20090310_175417_run_final_0_27319_1330_Tb_mhingee'
 ##time_dir4 = ''
 ##time_dir5 = ''
 ##time_dir6 = ''
 ##
-time_dirs = [time_dir1] #time_dir2]# , time_dir4, time_dir5, time_dir6]
+time_dirs = [time_dir1, time_dir2, time_dir3] # time_dir4, time_dir5, time_dir6]
   
 
@@ -56,5 +56,5 @@
 
 # one or more key strings from var_equations above
-var = ['elevation','stage']
+var = ['elevation','stage','speed']
 
 ######
Index: /anuga_work/production/australia_ph2/ceduna/export_results_max.py
===================================================================
--- /anuga_work/production/australia_ph2/ceduna/export_results_max.py	(revision 6539)
+++ /anuga_work/production/australia_ph2/ceduna/export_results_max.py	(revision 6540)
@@ -22,12 +22,12 @@
 directory = project.output_folder
 
-time_dir1 = '20090225_153629_run_final_0_64469_mhingee'
-##time_dir2 = ''
-##time_dir3 = ''
+time_dir1 = '20090306_131720_run_final_0_64448_1889_Tb_mhingee'
+time_dir2 = '20090306_165354_run_final_0_58331_1889_Tb_mhingee'
+time_dir3 = '20090306_165528_run_final_0_27347_1889_Tb_mhingee'
 ##time_dir4 = ''
 ##time_dir5 = ''
 ##time_dir6 = ''
 ##
-time_dirs = [time_dir1] #time_dir2]# , time_dir4, time_dir5, time_dir6]
+time_dirs = [time_dir1, time_dir2, time_dir3] #time_dir2]# , time_dir4, time_dir5, time_dir6]
   
 
@@ -112,10 +112,10 @@
                             format = 'asc')
 
-##                asc_name.append(outname + '.asc')
-##    
-##            maxasc_outname = join(directory, time_dir, project.scenario_name)+'_'+which_area+'_'+which_var+'_max.asc'
-##
-##            print 'max asc outname ', maxasc_outname
-##            print 'asc_name ', str(asc_name)
-##            
-##            MaxAsc(maxasc_outname, asc_name)
+                asc_name.append(outname + '.asc')
+    
+            maxasc_outname = join(directory, time_dir, project.scenario_name)+'_'+which_area+'_'+which_var+'_max.asc'
+
+            print 'max asc outname ', maxasc_outname
+            print 'asc_name ', str(asc_name)
+            
+            MaxAsc(maxasc_outname, asc_name)
Index: /anuga_work/production/australia_ph2/darwin/project.py
===================================================================
--- /anuga_work/production/australia_ph2/darwin/project.py	(revision 6539)
+++ /anuga_work/production/australia_ph2/darwin/project.py	(revision 6540)
@@ -34,5 +34,5 @@
 friction=0.01           # manning's friction coefficient
 starttime=0             # start time for simulation
-finaltime=80000          # final time for simulation
+finaltime=1000          # final time for simulation
 
 # index is only used when wave = Tb
@@ -74,5 +74,5 @@
 
 # Format for point is x,y,elevation (with header)
-point_filenames = ['darwin_grid250m.txt']
+point_filenames = ['darwin_grid250m.txt',
                    'derby_grid250m.txt'] # 250m grid 2005
 
@@ -85,5 +85,5 @@
 # Used in build_elevation.py
 # Format for points easting,northing (no header)
-bounding_polygon_filename = 'bounding_polygon.csv'
+bounding_polygon_filename = 'bounding_polygon_darwin2.csv'
 bounding_polygon_maxarea = 100000
 
@@ -118,5 +118,5 @@
 # Landward bounding points
 # Format easting,northing (no header)
-landward_boundary_filename = 'landward_boundary.csv'
+landward_boundary_filename = 'landward_boundary_darwin.csv'
 
 # MUX input filename.
Index: /anuga_work/production/geraldton/export_results_max_multiple_timesteps.py
===================================================================
--- /anuga_work/production/geraldton/export_results_max_multiple_timesteps.py	(revision 6540)
+++ /anuga_work/production/geraldton/export_results_max_multiple_timesteps.py	(revision 6540)
@@ -0,0 +1,124 @@
+"""
+Generates ascii grids of nominated areas -
+Input: sww file from run_perth.py
+       boundaries for grids from project.py
+Outputs: ascii grids of specified variables
+Stored in the 'outputs_dir' folder for respective .sww file
+
+Note:
+If producing a grid for the enitre extent cellsize should be greater than 30m
+If producing grids for inundation area resolution should be greater than mesh (ie ~22m)
+"""
+
+import project, os
+import sys
+from anuga.lib.maxasc.maxasc import MaxAsc
+from anuga.shallow_water.data_manager import convert_dem_from_ascii2netcdf, dem2pts
+from anuga.shallow_water.data_manager import sww2dem
+from os import sep
+
+directory = project.output_dir
+
+##time_dir1 = '20081209_155330_run_final_0_27255_250m_none_lfountai'
+##time_dir2 = '20081209_161229_run_final_0_68693_250m_none_lfountai' 
+##time_dirs = [time_dir1, time_dir2]
+
+##time_dir1 = '20081117_141353_run_final_0_27283_alpha0.1_kvanputt'
+##time_dir2 = '20081117_141443_run_final_0.6_27283_alpha0.1_kvanputt' 
+time_dir3 = '20081117_141520_run_final_0_27255_alpha0.1_kvanputt'
+time_dir4 = '20081117_141558_run_final_0.6_27255_alpha0.1_kvanputt'
+##time_dir5 = '20081117_141634_run_final_0_68693_alpha0.1_kvanputt'
+##time_dir6 = '20081117_141717_run_final_0.6_68693_alpha0.1_kvanputt'
+##
+time_dirs = [time_dir3, time_dir4] #, time_dir3, time_dir4, time_dir5, time_dir6]
+ 
+
+#cellsize = 20
+cellsize = 250
+
+#timestep = None    # None means no timestep!
+timesteps = [300] #range(42000,55000,1000)
+
+######
+# Set the special areas of interest.  If none, do: area='All'
+######
+
+#area = ['CBD']  # strings must match keys in var_equations below
+area = ['All']      # 'All' means no special areas - the whole thing
+
+######
+# Define allowed variable names and associated equations to generate values.
+# This would not normally change.
+######
+var_equations = {'stage':     'stage',
+                 'momentum':  '(xmomentum**2 + ymomentum**2)**0.5',
+                 'depth':     'stage-elevation',
+                 'speed':     '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6)',
+                 'elevation': 'elevation' }
+
+# one or more key strings from var_equations above
+var = ['stage','depth','elevation']
+
+######
+# Start running the various conversions we require.
+######
+for timestep in timesteps:
+    for which_var in var:
+        if which_var not in var_equations:
+            print 'Unrecognized variable name: %s' % which_var
+            break
+
+        for which_area in area:
+            if which_area == 'All':
+                easting_min = None
+                easting_max = None
+                northing_min = None
+                northing_max = None
+            else:
+                try:
+                    easting_min = eval('project.xmin%s' % which_area)
+                    easting_max = eval('project.xmax%s' % which_area)
+                    northing_min = eval('project.ymin%s' % which_area)
+                    northing_max = eval('project.ymax%s' % which_area)
+                except AttributeError:
+                    print 'Unrecognized area name: %s' % which_area
+                    break
+
+            for time_dir in time_dirs:
+
+                name1 = directory+time_dir+sep+project.scenario_name
+                name2 = directory+time_dir+sep+project.scenario_name+'_time_41820_0'
+##                name3 = directory+time_dir+sep+project.scenario_name+'_time_78600_0'
+
+                names = [name2] #[name1, name2, name3]
+          
+##                asc_name = []   
+                   
+                for name in names:
+                             
+                    outname = name + '_' + which_area + '_' + which_var + '_' + str(timestep)
+                    quantityname = var_equations[which_var]
+
+                    print 'start sww2dem: time_dir=%s' % time_dir
+                    
+                    sww2dem(name, basename_out = outname,
+                                quantity = quantityname,
+                                timestep = timestep,
+                                cellsize = cellsize,      
+                                easting_min = easting_min,
+                                easting_max = easting_max,
+                                northing_min = northing_min,
+                                northing_max = northing_max,        
+                                reduction = max, 
+                                verbose = True,
+                                format = 'asc')
+
+##                    asc_name.append(outname + '.asc')
+##        
+##                maxasc_outname = directory+time_dir+sep+project.scenario_name+'_'+which_area+'_'+which_var+'_max.asc'
+##
+##                print 'max asc outname ', maxasc_outname
+##                print 'asc_name ', str(asc_name)
+##                
+##                MaxAsc(maxasc_outname, asc_name)
+
