Index: anuga_work/production/australia_ph2/broome/project.py
===================================================================
--- anuga_work/production/australia_ph2/broome/project.py	(revision 6730)
+++ anuga_work/production/australia_ph2/broome/project.py	(revision 6731)
@@ -35,5 +35,7 @@
 
 # index is only used when wave = Tb
-index = 1693            # index from the PTHA - Y2000 5.4259m
+##index = 1693            # index from the PTHA - Y2000 5.4259m
+index = 1661            # index from the PTHA - TO DO
+
 wave = 'Tb'             # Bf (sts wave) Tb (index wave)
 
Index: anuga_work/production/australia_ph2/darwin/project.py
===================================================================
--- anuga_work/production/australia_ph2/darwin/project.py	(revision 6730)
+++ anuga_work/production/australia_ph2/darwin/project.py	(revision 6731)
@@ -37,6 +37,6 @@
 
 # index is only used when wave = Tb
-index = 1833            # index from the PTHA - 1 in 2000 wave height = 0.64m
-##index = 1860            # index from the PTHA - 1 in 2000 wave height = 1.32m - large wave from Timor
+index = 1830            # index from the PTHA - Y2000 for pt1833 wave height = 0.64m
+##index = 1860            # index from the PTHA - Y2000 for pt 1860 = 1.32m - large wave from Timor
 wave = 'Bf'             # Bf (sts wave) Tb (index wave)
 
@@ -90,6 +90,6 @@
 # Used in build_elevation.py
 # Format for points easting,northing (no header)
-bounding_polygon_filename = 'bounding_polygon_darwin2.csv'
-bounding_polygon_maxarea = 125000 # 100000
+bounding_polygon_filename = 'bounding_polygon.csv'
+bounding_polygon_maxarea = 100000
 
 # INTERIOR REGIONS -  for designing the mesh
@@ -97,5 +97,5 @@
 # Format for points easting,northing (no header)                    
 #interior_regions_data = []
-interior_regions_data = [['poly_island.csv',200000000]]  # large triangles on island
+interior_regions_data = [] #[['poly_island.csv',200000000]]  # large triangles on island
 
 # add an internal polygon to force different mesh generation
@@ -132,5 +132,5 @@
 # Landward bounding points
 # Format easting,northing (no header)
-landward_boundary_filename = 'landward_boundary_darwin.csv'
+landward_boundary_filename = 'landward_boundary.csv'
 
 # MUX input filename.
Index: anuga_work/production/australia_ph2/sydney/export_results.py
===================================================================
--- anuga_work/production/australia_ph2/sydney/export_results.py	(revision 6731)
+++ anuga_work/production/australia_ph2/sydney/export_results.py	(revision 6731)
@@ -0,0 +1,125 @@
+"""
+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 os.path import join
+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_folder
+
+time_dir1 = '20090331_150428_run_final_0_58152_2956_Tb_lfountai'
+##time_dir2 = '20090311_152929_run_final_0_70385_1203_Tb_jgriffin'
+##time_dir3 = '20090311_153009_run_final_0_70454_1203_Bf_jgriffin'
+##time_dir4 = '20090311_153054_run_final_0_70339_1203_Bf_jgriffin'
+time_dirs = [time_dir1]#,time_dir2,time_dir3,time_dir4]  
+
+cellsize = 250
+##cellsize = 5
+
+#timestep = None    # None means no timestep!
+timestep = 0
+
+######
+# Set the special areas of interest.  If none, do: area='All'
+######
+
+#area = ['Bunbury', 'Busselton']  # 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 = ['elevation', 'stage']
+
+######
+# Start running the various conversions we require.
+######
+
+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
+##            easting_min = 290000
+##            easting_max = 316000
+##            northing_min = 6117000
+##            northing_max = 6170000
+        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 = join(directory, time_dir, project.scenario_name)
+            name2 = join(directory, time_dir, project.scenario_name)+'_time_66360_0'
+##            name3 = join(directory, time_dir, project.scenario_name)+'_time_26640_0'
+##            name4 = join(directory, time_dir, project.scenario_name)+'_time_39960_0'
+##            name5 = join(directory, time_dir, project.scenario_name)+'_time_53280_0'
+##            name6 = join(directory, time_dir, project.scenario_name)+'_time_66600_0'
+##            name7 = join(directory, time_dir, project.scenario_name)+'_time_79920_0'
+            
+            names = [name1]#, name2]#, name3,name4,name5,name6,name7]
+      
+##            asc_name = []   
+               
+            for name in names:
+                         
+                outname = name + '_' + which_area + '_' + which_var
+                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 = 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/sydney/project.py
===================================================================
--- anuga_work/production/australia_ph2/sydney/project.py	(revision 6730)
+++ anuga_work/production/australia_ph2/sydney/project.py	(revision 6731)
@@ -93,5 +93,5 @@
 # Used in get_timeseries.py.  
 # Format easting,northing,name,elevation (with header)
-gauges_filename = 'MH_gauges_10m.csv' #'gauges.csv'
+gauges_filename = 'MH_gauges_10m2.csv' #'gauges.csv'
 
 # BUILDINGS EXPOSURE - for identifying inundated houses
Index: anuga_work/production/australia_ph2/wyndham/project.py
===================================================================
--- anuga_work/production/australia_ph2/wyndham/project.py	(revision 6730)
+++ anuga_work/production/australia_ph2/wyndham/project.py	(revision 6731)
@@ -37,5 +37,5 @@
 
 # index is only used when wave = Tb
-index = 1823            # index from the PTHA - 1 in 2000 wave height = 0.452m
+index = 1823            # index from the PTHA - Y2000 = 0.452m
 wave = 'Bf'             # Bf (sts wave) Tb (index wave)
 
