Index: /anuga_work/production/australia_ph2/albany/Arc_asc2raster_GDA94z50.py
===================================================================
--- /anuga_work/production/australia_ph2/albany/Arc_asc2raster_GDA94z50.py	(revision 6841)
+++ /anuga_work/production/australia_ph2/albany/Arc_asc2raster_GDA94z50.py	(revision 6842)
@@ -20,22 +20,27 @@
 gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx")
 gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
-gp.overwriteoutput = 0
+gp.overwriteoutput = 1
 
-scenario_dir = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\australia_ph2\\ceduna\\"
+scenario_dir = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\australia_ph2\\albany\\"
 output_dir="anuga\\outputs\\"
 
-time_dir1 = '20090225_153629_run_final_0_64469_mhingee'
+time_dir1 = '20090408_152157_run_final_0_27319_1330_Tb__mhingee'
+time_dir2 = '20090408_201701_run_final_0_64344_1330_Tb__mhingee'
+time_dir3 = '20090409_010309_run_final_0_46697_1330_Tb__mhingee'
 
-time_dirs = [time_dir1] #, time_dir2] #4, time_dir5] #, time_dir3, time_dir4, time_dir5, time_dir6]
- 
-for time_dir in time_dirs:
+events = [[time_dir1,0.395764],[time_dir2,0.390969],[time_dir3,0.392536]]
 
+for event in events:
+##for time_dir in time_dirs:
+    time_dir = event[0]
+    max_wave = event[1]
+    print time_dir
+    print max_wave
     # Local variables...
-    folder = scenario_dir + output_dir + time_dir +'\\'
+    folder = scenario_dir + output_dir +  time_dir +'\\'
     raster_gbd = folder + 'raster.gdb'
-    land = scenario_dir + "map_work\\Busselton.gdb\\Internal_polygons\\initial_conditions_extend_Di"
-    ocean = scenario_dir + "map_work\\Busselton.gdb\\input_boundaries\\Ocean"
+##    land = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_condition"
+##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
 
-    
     print 'Process: Create File GDB'
     gp.CreateFileGDB_management(folder, "raster")
@@ -43,13 +48,14 @@
     gp.Workspace = raster_gbd
 
-    print time_dir
+    print gp.Workspace
     
     #replication dictionary
-    replicate = (('ceduna', ''),('_', ''),
+    replicate = (('albany', ''),('_', ''),('max','_M'),
+                 ('CBD', 'CDB'),('All',''),
                  ('depth','_depth'),('speed', '_speed'),
                  ('elevation', '_ele_'), ('stage','_stage'))
 
     generate_filename = []
-    input_ascii = glob.glob(folder + '*.asc')
+    input_ascii = glob.glob(folder + '*stage.asc')
 
     for infile in input_ascii:
@@ -57,5 +63,5 @@
         for (key, rep) in replicate:
             output_DEM = output_DEM.replace(key,rep)
-        output_DEM = output_DEM[:12]
+        output_DEM = output_DEM[:10]
         if output_DEM in generate_filename:
             print 'Output_DEM filename (%s) already in use' % output_DEM
@@ -68,12 +74,17 @@
         gp.ASCIIToRaster_conversion(infile, output_DEM, "FLOAT")
 
-        print 'Process: Define Projection' 
-        gp.DefineProjection_management(output_DEM, "PROJCS['GDA_1994_MGA_Zone_53',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
-                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',135.0],PARAMETER['Scale_Factor',0.9996]"
+        print 'Process: Define Projection'
+        # GDA_1994_MGA_Zone_54
+        gp.DefineProjection_management(output_DEM, "PROJCS['GDA_1994_MGA_Zone_50',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
+                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',117.0],PARAMETER['Scale_Factor',0.9996]"
                                                    ",PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
-##        output_extract = output_DEM + '_E'
+##        output_extract = output_DEM + 'E'
 ##        print 'Output Extract ',output_extract
 ##        print 'Process: Extract by Mask'
 ##        gp.ExtractByMask_sa(output_DEM, land, output_extract)
+        
+        div_file = output_DEM.replace('stage','div_stage')
+        if not div_file == output_DEM:
+            print 'divide', output_DEM,' by', max_wave,' and call',div_file
+            gp.Divide_sa(output_DEM,max_wave,div_file)
 
-
Index: /anuga_work/production/australia_ph2/ceduna/Arc_asc2raster_GDA94z50.py
===================================================================
--- /anuga_work/production/australia_ph2/ceduna/Arc_asc2raster_GDA94z50.py	(revision 6841)
+++ /anuga_work/production/australia_ph2/ceduna/Arc_asc2raster_GDA94z50.py	(revision 6842)
@@ -20,22 +20,27 @@
 gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx")
 gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
-gp.overwriteoutput = 0
+gp.overwriteoutput = 1
 
 scenario_dir = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\australia_ph2\\ceduna\\"
 output_dir="anuga\\outputs\\"
 
-time_dir1 = '20090225_153629_run_final_0_64469_mhingee'
+time_dir1 = '20090408_182701_run_final_0_27347_1884_Tb__kvanputt'
+time_dir2 = '20090409_095708_run_final_0_64448_1884_Tb__kvanputt'
+time_dir3 = '20090410_000802_run_final_0_58331_1884_Tb__kvanputt'
 
-time_dirs = [time_dir1] #, time_dir2] #4, time_dir5] #, time_dir3, time_dir4, time_dir5, time_dir6]
- 
-for time_dir in time_dirs:
+events = [[time_dir1,0.314774],[time_dir2,0.27307],[time_dir3,0.315495]]
 
+for event in events:
+##for time_dir in time_dirs:
+    time_dir = event[0]
+    max_wave = event[1]
+    print time_dir
+    print max_wave
     # Local variables...
-    folder = scenario_dir + output_dir + time_dir +'\\'
+    folder = scenario_dir + output_dir +  time_dir +'\\'
     raster_gbd = folder + 'raster.gdb'
-    land = scenario_dir + "map_work\\Busselton.gdb\\Internal_polygons\\initial_conditions_extend_Di"
-    ocean = scenario_dir + "map_work\\Busselton.gdb\\input_boundaries\\Ocean"
+##    land = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_condition"
+##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
 
-    
     print 'Process: Create File GDB'
     gp.CreateFileGDB_management(folder, "raster")
@@ -43,13 +48,14 @@
     gp.Workspace = raster_gbd
 
-    print time_dir
+    print gp.Workspace
     
     #replication dictionary
-    replicate = (('ceduna', ''),('_', ''),
+    replicate = (('ceduna', ''),('_', ''),('max','_M'),
+                 ('CBD', 'CDB'),('All',''),
                  ('depth','_depth'),('speed', '_speed'),
                  ('elevation', '_ele_'), ('stage','_stage'))
 
     generate_filename = []
-    input_ascii = glob.glob(folder + '*.asc')
+    input_ascii = glob.glob(folder + '*max.asc')
 
     for infile in input_ascii:
@@ -57,5 +63,5 @@
         for (key, rep) in replicate:
             output_DEM = output_DEM.replace(key,rep)
-        output_DEM = output_DEM[:12]
+        output_DEM = output_DEM[:10]
         if output_DEM in generate_filename:
             print 'Output_DEM filename (%s) already in use' % output_DEM
@@ -68,12 +74,17 @@
         gp.ASCIIToRaster_conversion(infile, output_DEM, "FLOAT")
 
-        print 'Process: Define Projection' 
-        gp.DefineProjection_management(output_DEM, "PROJCS['GDA_1994_MGA_Zone_53',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
-                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',135.0],PARAMETER['Scale_Factor',0.9996]"
+        print 'Process: Define Projection'
+        # GDA_1994_MGA_Zone_54
+        gp.DefineProjection_management(output_DEM, "PROJCS['CM_133',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
+                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',133.0],PARAMETER['Scale_Factor',0.9996]"
                                                    ",PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
-##        output_extract = output_DEM + '_E'
+##        output_extract = output_DEM + 'E'
 ##        print 'Output Extract ',output_extract
 ##        print 'Process: Extract by Mask'
 ##        gp.ExtractByMask_sa(output_DEM, land, output_extract)
+        # do this bit only if there are only stage asc files
+        div_file = output_DEM.replace('stage','div_stage')
+        if not div_file == output_DEM:
+            print 'divide', output_DEM,' by', max_wave,' and call',div_file
+            gp.Divide_sa(output_DEM,max_wave,div_file)
 
-
Index: /anuga_work/production/australia_ph2/esperance/Arc_asc2raster_GDA94z50.py
===================================================================
--- /anuga_work/production/australia_ph2/esperance/Arc_asc2raster_GDA94z50.py	(revision 6841)
+++ /anuga_work/production/australia_ph2/esperance/Arc_asc2raster_GDA94z50.py	(revision 6842)
@@ -20,22 +20,27 @@
 gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx")
 gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
-gp.overwriteoutput = 0
+gp.overwriteoutput = 1
 
 scenario_dir = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\australia_ph2\\esperance\\"
 output_dir="anuga\\outputs\\"
 
-time_dir1 = '20090302_104336_run_final_0_27255_mhingee'
+time_dir1 = '20090408_152320_run_final_0_27329_1699_Tb__mhingee'
+time_dir2 = '20090408_205317_run_final_0_58367_1699_Tb__mhingee'
+time_dir3 = '20090409_024308_run_final_0_64449_1699_Tb__mhingee'
 
-time_dirs = [time_dir1] #, time_dir2] #4, time_dir5] #, time_dir3, time_dir4, time_dir5, time_dir6]
- 
-for time_dir in time_dirs:
+events = [[time_dir1,0.352214],[time_dir2,0.356316],[time_dir3,0.357256]]
 
+for event in events:
+##for time_dir in time_dirs:
+    time_dir = event[0]
+    max_wave = event[1]
+    print time_dir
+    print max_wave
     # Local variables...
-    folder = scenario_dir + output_dir + time_dir +'\\'
+    folder = scenario_dir + output_dir +  time_dir +'\\'
     raster_gbd = folder + 'raster.gdb'
-    land = scenario_dir + "map_work\\Busselton.gdb\\Internal_polygons\\initial_conditions_extend_Di"
-    ocean = scenario_dir + "map_work\\Busselton.gdb\\input_boundaries\\Ocean"
+##    land = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_condition"
+##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
 
-    
     print 'Process: Create File GDB'
     gp.CreateFileGDB_management(folder, "raster")
@@ -43,13 +48,14 @@
     gp.Workspace = raster_gbd
 
-    print time_dir
+    print gp.Workspace
     
     #replication dictionary
-    replicate = (('esperance', ''),('_', ''),
+    replicate = (('esperance', ''),('_', ''),('max','_M'),
+                 ('CBD', 'CDB'),('All',''),
                  ('depth','_depth'),('speed', '_speed'),
                  ('elevation', '_ele_'), ('stage','_stage'))
 
     generate_filename = []
-    input_ascii = glob.glob(folder + '*.asc')
+    input_ascii = glob.glob(folder + '*stage.asc')
 
     for infile in input_ascii:
@@ -57,5 +63,5 @@
         for (key, rep) in replicate:
             output_DEM = output_DEM.replace(key,rep)
-        output_DEM = output_DEM[:12]
+        output_DEM = output_DEM[:10]
         if output_DEM in generate_filename:
             print 'Output_DEM filename (%s) already in use' % output_DEM
@@ -68,12 +74,17 @@
         gp.ASCIIToRaster_conversion(infile, output_DEM, "FLOAT")
 
-        print 'Process: Define Projection' 
+        print 'Process: Define Projection'
+        # GDA_1994_MGA_Zone_54
         gp.DefineProjection_management(output_DEM, "PROJCS['GDA_1994_MGA_Zone_51',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
                                                    ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',123.0],PARAMETER['Scale_Factor',0.9996]"
                                                    ",PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
-##        output_extract = output_DEM + '_E'
+##        output_extract = output_DEM + 'E'
 ##        print 'Output Extract ',output_extract
 ##        print 'Process: Extract by Mask'
 ##        gp.ExtractByMask_sa(output_DEM, land, output_extract)
+        # do this bit only if there are only stage asc files
+        div_file = output_DEM.replace('stage','div_stage')
+        if not div_file == output_DEM:
+            print 'divide', output_DEM,' by', max_wave,' and call',div_file
+            gp.Divide_sa(output_DEM,max_wave,div_file)
 
-
Index: /anuga_work/production/australia_ph2/eucla_motel/Arc_asc2raster_GDA94z50.py
===================================================================
--- /anuga_work/production/australia_ph2/eucla_motel/Arc_asc2raster_GDA94z50.py	(revision 6841)
+++ /anuga_work/production/australia_ph2/eucla_motel/Arc_asc2raster_GDA94z50.py	(revision 6842)
@@ -20,22 +20,27 @@
 gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx")
 gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
-gp.overwriteoutput = 0
+gp.overwriteoutput = 1
 
 scenario_dir = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\australia_ph2\\eucla_motel\\"
 output_dir="anuga\\outputs\\"
 
-time_dir1 = '20090225_153734_run_final_0_65371_mhingee'
+time_dir1 = '20090408_152411_run_final_0_58332_1837_Tb__mhingee'
+time_dir2 = '20090409_073114_run_final_0_64449_1837_Tb__mhingee'
+time_dir3 = '20090409_222301_run_final_0_68755_1837_Tb__mhingee'
 
-time_dirs = [time_dir1] #, time_dir2] #4, time_dir5] #, time_dir3, time_dir4, time_dir5, time_dir6]
- 
-for time_dir in time_dirs:
+events = [[time_dir1,0.265183],[time_dir2,0.27574],[time_dir3,0.267985]]
 
+for event in events:
+##for time_dir in time_dirs:
+    time_dir = event[0]
+    max_wave = event[1]
+    print time_dir
+    print max_wave
     # Local variables...
-    folder = scenario_dir + output_dir + time_dir +'\\'
+    folder = scenario_dir + output_dir +  time_dir +'\\'
     raster_gbd = folder + 'raster.gdb'
-    land = scenario_dir + "map_work\\Busselton.gdb\\Internal_polygons\\initial_conditions_extend_Di"
-    ocean = scenario_dir + "map_work\\Busselton.gdb\\input_boundaries\\Ocean"
+##    land = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_condition"
+##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
 
-    
     print 'Process: Create File GDB'
     gp.CreateFileGDB_management(folder, "raster")
@@ -43,13 +48,14 @@
     gp.Workspace = raster_gbd
 
-    print time_dir
+    print gp.Workspace
     
     #replication dictionary
-    replicate = (('eucla_motel', ''),('_', ''),
+    replicate = (('eucla_motel', ''),('_', ''),('max','_M'),
+                 ('CBD', 'CDB'),('All',''),
                  ('depth','_depth'),('speed', '_speed'),
                  ('elevation', '_ele_'), ('stage','_stage'))
 
     generate_filename = []
-    input_ascii = glob.glob(folder + '*.asc')
+    input_ascii = glob.glob(folder + '*max.asc')
 
     for infile in input_ascii:
@@ -57,5 +63,5 @@
         for (key, rep) in replicate:
             output_DEM = output_DEM.replace(key,rep)
-        output_DEM = output_DEM[:12]
+        output_DEM = output_DEM[:10]
         if output_DEM in generate_filename:
             print 'Output_DEM filename (%s) already in use' % output_DEM
@@ -68,12 +74,17 @@
         gp.ASCIIToRaster_conversion(infile, output_DEM, "FLOAT")
 
-        print 'Process: Define Projection' 
+        print 'Process: Define Projection'
+        # GDA_1994_MGA_Zone_54
         gp.DefineProjection_management(output_DEM, "PROJCS['GDA_1994_MGA_Zone_52',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
                                                    ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',129.0],PARAMETER['Scale_Factor',0.9996]"
                                                    ",PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
-##        output_extract = output_DEM + '_E'
+##        output_extract = output_DEM + 'E'
 ##        print 'Output Extract ',output_extract
 ##        print 'Process: Extract by Mask'
 ##        gp.ExtractByMask_sa(output_DEM, land, output_extract)
+        # do this bit only if there are only stage asc files
+        div_file = output_DEM.replace('stage','div_stage')
+        if not div_file == output_DEM:
+            print 'divide', output_DEM,' by', max_wave,' and call',div_file
+            gp.Divide_sa(output_DEM,max_wave,div_file)
 
-
Index: /anuga_work/production/australia_ph2/gold_coast/Arc_asc2raster_GDA94z50.py
===================================================================
--- /anuga_work/production/australia_ph2/gold_coast/Arc_asc2raster_GDA94z50.py	(revision 6842)
+++ /anuga_work/production/australia_ph2/gold_coast/Arc_asc2raster_GDA94z50.py	(revision 6842)
@@ -0,0 +1,81 @@
+# ---------------------------------------------------------------------------
+# This python script is an ArcGIS script that can only be run on a computer
+# with and ArcGIS licence and version 2.4.1 python.
+# This script is designed to read in .asc files and deliever rasters with
+# projection (GDA94z50) held in a file geodatabase (called raster)
+# written by Kristy Van Putten and Ross Wilson
+# ---------------------------------------------------------------------------
+
+# Import system modules
+import sys, string, os, arcgisscripting, glob, os.path
+
+# Create the Geoprocessor object
+gp = arcgisscripting.create()
+
+# Check out any necessary licenses
+gp.CheckOutExtension("spatial")
+
+# Load required toolboxes...
+gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Spatial Analyst Tools.tbx")
+gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx")
+gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
+gp.overwriteoutput = 1
+
+scenario_dir = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\australia_ph2\\gold_coast\\"
+output_dir="anuga\\outputs\\"
+
+time_dir1 = '20090408_171713_run_final_0_50883_3727_Tb__kvanputt'
+time_dir2 = '20090409_054747_run_final_0_51318_3727_Tb__kvanputt'
+time_dir3 = '20090409_175154_run_final_0_51453_3727_Tb__kvanputt'
+
+time_dirs = [time_dir1, time_dir2, time_dir3]
+
+for time_dir in time_dirs:
+
+    # Local variables...
+    folder = scenario_dir + output_dir +  time_dir +'\\'
+    raster_gbd = folder + 'raster.gdb'
+##    land = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_condition"
+##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
+
+    print 'Process: Create File GDB'
+    gp.CreateFileGDB_management(folder, "raster")
+
+    gp.Workspace = raster_gbd
+
+    print gp.Workspace
+    
+    #replication dictionary
+    replicate = (('gold_coast', ''),('_', ''),('max','_M'),
+                 ('CBD', 'CDB'),('All',''),
+                 ('depth','_depth'),('speed', '_speed'),
+                 ('elevation', '_ele_'), ('stage','_stage'))
+
+    generate_filename = []
+    input_ascii = glob.glob(folder + '*max.asc')
+
+    for infile in input_ascii:
+        output_DEM = os.path.basename(infile)[:-4]
+        for (key, rep) in replicate:
+            output_DEM = output_DEM.replace(key,rep)
+        output_DEM = output_DEM[:10]
+        if output_DEM in generate_filename:
+            print 'Output_DEM filename (%s) already in use' % output_DEM
+            sys.exit(10)
+        generate_filename.append(output_DEM)
+
+        print 'Output DEM ',output_DEM
+        
+        print 'Process: ASCII to Raster'
+        gp.ASCIIToRaster_conversion(infile, output_DEM, "FLOAT")
+
+        print 'Process: Define Projection' 
+        gp.DefineProjection_management(output_DEM, "PROJCS['GDA_1994_MGA_Zone_56',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
+                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',153.0],PARAMETER['Scale_Factor',0.9996]"
+                                                   ",PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
+##        output_extract = output_DEM + 'E'
+##        print 'Output Extract ',output_extract
+##        print 'Process: Extract by Mask'
+##        gp.ExtractByMask_sa(output_DEM, land, output_extract)
+
+
Index: /anuga_work/production/australia_ph2/hobart/Arc_asc2raster_GDA94z50.py
===================================================================
--- /anuga_work/production/australia_ph2/hobart/Arc_asc2raster_GDA94z50.py	(revision 6842)
+++ /anuga_work/production/australia_ph2/hobart/Arc_asc2raster_GDA94z50.py	(revision 6842)
@@ -0,0 +1,90 @@
+# ---------------------------------------------------------------------------
+# This python script is an ArcGIS script that can only be run on a computer
+# with and ArcGIS licence and version 2.4.1 python.
+# This script is designed to read in .asc files and deliever rasters with
+# projection (GDA94z50) held in a file geodatabase (called raster)
+# written by Kristy Van Putten and Ross Wilson
+# ---------------------------------------------------------------------------
+
+# Import system modules
+import sys, string, os, arcgisscripting, glob, os.path
+
+# Create the Geoprocessor object
+gp = arcgisscripting.create()
+
+# Check out any necessary licenses
+gp.CheckOutExtension("spatial")
+
+# Load required toolboxes...
+gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Spatial Analyst Tools.tbx")
+gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx")
+gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
+gp.overwriteoutput = 1
+
+scenario_dir = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\australia_ph2\\hobart\\"
+output_dir="anuga\\outputs\\"
+
+time_dir1 = '20090408_152504_run_final_0_51268_2528_Tb__mhingee'
+time_dir2 = '20090408_191713_run_final_0_58082_2528_Tb__mhingee'
+time_dir3 = '20090408_225208_run_final_0_64309_2528_Tb__mhingee'
+
+time_dirs = [time_dir1, time_dir2, time_dir3]
+events = [[time_dir1,],[time_dir2,],[time_dir3,]]
+
+for event in events:
+##for time_dir in time_dirs:
+    time_dir = event[0]
+    max_wave = event[1]
+    print time_dir
+    print max_wave
+    # Local variables...
+    folder = scenario_dir + output_dir +  time_dir +'\\'
+    raster_gbd = folder + 'raster.gdb'
+##    land = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_condition"
+##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
+
+##    print 'Process: Create File GDB'
+##    gp.CreateFileGDB_management(folder, "raster")
+
+    gp.Workspace = raster_gbd
+
+    print gp.Workspace
+    
+    #replication dictionary
+    replicate = (('hobart', ''),('_', ''),('max','_M'),
+                 ('CBD', 'CDB'),('All',''),
+                 ('depth','_depth'),('speed', '_speed'),
+                 ('elevation', '_ele_'), ('stage','_stage'))
+
+    generate_filename = []
+    input_ascii = glob.glob(folder + '*.asc')
+
+    for infile in input_ascii:
+        output_DEM = os.path.basename(infile)[:-4]
+        for (key, rep) in replicate:
+            output_DEM = output_DEM.replace(key,rep)
+        output_DEM = output_DEM[:10]
+        if output_DEM in generate_filename:
+            print 'Output_DEM filename (%s) already in use' % output_DEM
+            sys.exit(10)
+        generate_filename.append(output_DEM)
+
+        print 'Output DEM ',output_DEM
+        
+        print 'Process: ASCII to Raster'
+        gp.ASCIIToRaster_conversion(infile, output_DEM, "FLOAT")
+
+        print 'Process: Define Projection' 
+        gp.DefineProjection_management(output_DEM, "PROJCS['GDA_1994_MGA_Zone_55',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
+                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',147.0],PARAMETER['Scale_Factor',0.9996]"
+                                                   ",PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
+##        output_extract = output_DEM + 'E'
+##        print 'Output Extract ',output_extract
+##        print 'Process: Extract by Mask'
+##        gp.ExtractByMask_sa(output_DEM, land, output_extract)
+        # do this bit only if there are only stage asc files
+        div_file = output_DEM.replace('stage','div_stage')
+        print 'divide', output_DEM,' by', max_wave,' and call',div_file
+        gp.Divide_sa(output_DEM,max_wave,div_file)
+
+
Index: /anuga_work/production/australia_ph2/melbourne/Arc_asc2raster_GDA94z50.py
===================================================================
--- /anuga_work/production/australia_ph2/melbourne/Arc_asc2raster_GDA94z50.py	(revision 6842)
+++ /anuga_work/production/australia_ph2/melbourne/Arc_asc2raster_GDA94z50.py	(revision 6842)
@@ -0,0 +1,88 @@
+# ---------------------------------------------------------------------------
+# This python script is an ArcGIS script that can only be run on a computer
+# with and ArcGIS licence and version 2.4.1 python.
+# This script is designed to read in .asc files and deliever rasters with
+# projection (GDA94z50) held in a file geodatabase (called raster)
+# written by Kristy Van Putten and Ross Wilson
+# ---------------------------------------------------------------------------
+
+# Import system modules
+import sys, string, os, arcgisscripting, glob, os.path
+
+# Create the Geoprocessor object
+gp = arcgisscripting.create()
+
+# Check out any necessary licenses
+gp.CheckOutExtension("spatial")
+
+# Load required toolboxes...
+gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Spatial Analyst Tools.tbx")
+gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx")
+gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
+gp.overwriteoutput = 1
+
+scenario_dir = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\australia_ph2\\melbourne\\"
+output_dir="anuga\\outputs\\"
+
+time_dir1 = ''
+time_dir2 = ''
+time_dir3 = ''
+
+events = [[time_dir1,],[time_dir2,],[time_dir3,]]
+
+for event in events:
+##for time_dir in time_dirs:
+    time_dir = event[0]
+    max_wave = event[1]
+    print time_dir
+    print max_wave
+    # Local variables...
+    folder = scenario_dir + output_dir +  time_dir +'\\'
+    raster_gbd = folder + 'raster.gdb'
+##    land = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_condition"
+##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
+
+    print 'Process: Create File GDB'
+    gp.CreateFileGDB_management(folder, "raster")
+
+    gp.Workspace = raster_gbd
+
+    print gp.Workspace
+    
+    #replication dictionary
+    replicate = (('strahan', ''),('_', ''),('max','_M'),
+                 ('CBD', 'CDB'),('All',''),
+                 ('depth','_depth'),('speed', '_speed'),
+                 ('elevation', '_ele_'), ('stage','_stage'))
+
+    generate_filename = []
+    input_ascii = glob.glob(folder + '*.asc')
+
+    for infile in input_ascii:
+        output_DEM = os.path.basename(infile)[:-4]
+        for (key, rep) in replicate:
+            output_DEM = output_DEM.replace(key,rep)
+        output_DEM = output_DEM[:10]
+        if output_DEM in generate_filename:
+            print 'Output_DEM filename (%s) already in use' % output_DEM
+            sys.exit(10)
+        generate_filename.append(output_DEM)
+
+        print 'Output DEM ',output_DEM
+        
+        print 'Process: ASCII to Raster'
+        gp.ASCIIToRaster_conversion(infile, output_DEM, "FLOAT")
+
+        print 'Process: Define Projection' 
+        gp.DefineProjection_management(output_DEM, "PROJCS['CM_146',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
+                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',146.0],PARAMETER['Scale_Factor',0.9996]"
+                                                   ",PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
+##        output_extract = output_DEM + 'E'
+##        print 'Output Extract ',output_extract
+##        print 'Process: Extract by Mask'
+##        gp.ExtractByMask_sa(output_DEM, land, output_extract)
+        # do this bit only if there are only stage asc files
+        div_file = output_DEM.replace('stage','div_stage')
+        print 'divide', output_DEM,' by', max_wave,' and call',div_file
+        gp.Divide_sa(output_DEM,max_wave,div_file)
+
Index: /anuga_work/production/australia_ph2/perth/Arc_asc2raster_GDA94z50.py
===================================================================
--- /anuga_work/production/australia_ph2/perth/Arc_asc2raster_GDA94z50.py	(revision 6842)
+++ /anuga_work/production/australia_ph2/perth/Arc_asc2raster_GDA94z50.py	(revision 6842)
@@ -0,0 +1,90 @@
+# ---------------------------------------------------------------------------
+# This python script is an ArcGIS script that can only be run on a computer
+# with and ArcGIS licence and version 2.4.1 python.
+# This script is designed to read in .asc files and deliever rasters with
+# projection (GDA94z50) held in a file geodatabase (called raster)
+# written by Kristy Van Putten and Ross Wilson
+# ---------------------------------------------------------------------------
+
+# Import system modules
+import sys, string, os, arcgisscripting, glob, os.path
+
+# Create the Geoprocessor object
+gp = arcgisscripting.create()
+
+# Check out any necessary licenses
+gp.CheckOutExtension("spatial")
+
+# Load required toolboxes...
+gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Spatial Analyst Tools.tbx")
+gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx")
+gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
+gp.overwriteoutput = 1
+
+scenario_dir = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\australia_ph2\\perth\\"
+output_dir="anuga\\outputs\\"
+
+time_dir1 = '20090414_110305_run_final_0_26978_803_Tb__kvanputt'
+time_dir2 = '20090415_090717_run_final_0_64479_803_Tb__kvanputt'
+time_dir3 = '20090416_050507_run_final_0_70921_803_Tb__kvanputt'
+
+events = [[time_dir1,0.658849],[time_dir2,0.543065],[time_dir3,0.52893]]
+
+for event in events:
+##for time_dir in time_dirs:
+    time_dir = event[0]
+    max_wave = event[1]
+    print time_dir
+    print max_wave
+    # Local variables...
+    folder = scenario_dir + output_dir +  time_dir +'\\'
+    raster_gbd = folder + 'raster.gdb'
+##    land = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_condition"
+##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
+
+    print 'Process: Create File GDB'
+    gp.CreateFileGDB_management(folder, "raster")
+
+    gp.Workspace = raster_gbd
+
+    print gp.Workspace
+    
+    #replication dictionary
+    replicate = (('perth', ''),('_', ''),('max','_M'),
+                 ('CBD', 'CDB'),('All',''),
+                 ('depth','_depth'),('speed', '_speed'),
+                 ('elevation', '_ele_'), ('stage','_stage'))
+
+    generate_filename = []
+    input_ascii = glob.glob(folder + '*stage_max.asc')
+
+    for infile in input_ascii:
+        output_DEM = os.path.basename(infile)[:-4]
+        for (key, rep) in replicate:
+            output_DEM = output_DEM.replace(key,rep)
+        output_DEM = output_DEM[:10]
+        if output_DEM in generate_filename:
+            print 'Output_DEM filename (%s) already in use' % output_DEM
+            sys.exit(10)
+        generate_filename.append(output_DEM)
+
+        print 'Output DEM ',output_DEM
+        
+        print 'Process: ASCII to Raster'
+        gp.ASCIIToRaster_conversion(infile, output_DEM, "FLOAT")
+
+        print 'Process: Define Projection'
+        # GDA_1994_MGA_Zone_54
+        gp.DefineProjection_management(output_DEM, "PROJCS['GDA_1994_MGA_Zone_50',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
+                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',117.0],PARAMETER['Scale_Factor',0.9996]"
+                                                   ",PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
+##        output_extract = output_DEM + 'E'
+##        print 'Output Extract ',output_extract
+##        print 'Process: Extract by Mask'
+##        gp.ExtractByMask_sa(output_DEM, land, output_extract)
+        
+        div_file = output_DEM.replace('stage','div_stage')
+        if not div_file == output_DEM:
+            print 'divide', output_DEM,' by', max_wave,' and call',div_file
+            gp.Divide_sa(output_DEM,max_wave,div_file)
+
Index: /anuga_work/production/australia_ph2/portland/Arc_asc2raster_GDA94z50.py
===================================================================
--- /anuga_work/production/australia_ph2/portland/Arc_asc2raster_GDA94z50.py	(revision 6841)
+++ /anuga_work/production/australia_ph2/portland/Arc_asc2raster_GDA94z50.py	(revision 6842)
@@ -20,22 +20,27 @@
 gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx")
 gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
-gp.overwriteoutput = 0
+gp.overwriteoutput = 1
 
-scenario_dir = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\australia_ph2\\esperance\\"
+scenario_dir = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\australia_ph2\\portland\\"
 output_dir="anuga\\outputs\\"
 
-time_dir1 = '20090302_104336_run_final_0_27255_mhingee'
+time_dir1 = '20090408_152424_run_final_0_27289_1969_Tb__mhingee'
+time_dir2 = '20090408_194222_run_final_0_58358_1969_Tb__mhingee'
+time_dir3 = '20090409_001857_run_final_0_64322_1969_Tb__mhingee'
 
-time_dirs = [time_dir1] #, time_dir2] #4, time_dir5] #, time_dir3, time_dir4, time_dir5, time_dir6]
- 
-for time_dir in time_dirs:
+events = [[time_dir1,0.430643],[time_dir2,0.462943],[time_dir3,0.418183]]
 
+for event in events:
+##for time_dir in time_dirs:
+    time_dir = event[0]
+    max_wave = event[1]
+    print time_dir
+    print max_wave
     # Local variables...
-    folder = scenario_dir + output_dir + time_dir +'\\'
+    folder = scenario_dir + output_dir +  time_dir +'\\'
     raster_gbd = folder + 'raster.gdb'
-    land = scenario_dir + "map_work\\Busselton.gdb\\Internal_polygons\\initial_conditions_extend_Di"
-    ocean = scenario_dir + "map_work\\Busselton.gdb\\input_boundaries\\Ocean"
+##    land = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_condition"
+##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
 
-    
     print 'Process: Create File GDB'
     gp.CreateFileGDB_management(folder, "raster")
@@ -43,8 +48,9 @@
     gp.Workspace = raster_gbd
 
-    print time_dir
+    print gp.Workspace
     
     #replication dictionary
-    replicate = (('esperance', ''),('_', ''),
+    replicate = (('portland', ''),('_', ''),('max','_M'),
+                 ('CBD', 'CDB'),('All',''),
                  ('depth','_depth'),('speed', '_speed'),
                  ('elevation', '_ele_'), ('stage','_stage'))
@@ -57,5 +63,5 @@
         for (key, rep) in replicate:
             output_DEM = output_DEM.replace(key,rep)
-        output_DEM = output_DEM[:12]
+        output_DEM = output_DEM[:10]
         if output_DEM in generate_filename:
             print 'Output_DEM filename (%s) already in use' % output_DEM
@@ -69,11 +75,14 @@
 
         print 'Process: Define Projection' 
-        gp.DefineProjection_management(output_DEM, "PROJCS['GDA_1994_MGA_Zone_51',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
-                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',123.0],PARAMETER['Scale_Factor',0.9996]"
+        gp.DefineProjection_management(output_DEM, "PROJCS['GDA_1994_MGA_Zone_54',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
+                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',141.0],PARAMETER['Scale_Factor',0.9996]"
                                                    ",PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
-##        output_extract = output_DEM + '_E'
+##        output_extract = output_DEM + 'E'
 ##        print 'Output Extract ',output_extract
 ##        print 'Process: Extract by Mask'
 ##        gp.ExtractByMask_sa(output_DEM, land, output_extract)
+        # do this bit only if there are only stage asc files
+        div_file = output_DEM.replace('stage','div_stage')
+        print 'divide', output_DEM,' by', max_wave,' and call',div_file
+        gp.Divide_sa(output_DEM,max_wave,div_file)
 
-
Index: /anuga_work/production/australia_ph2/strahan/Arc_asc2raster_GDA94z50.py
===================================================================
--- /anuga_work/production/australia_ph2/strahan/Arc_asc2raster_GDA94z50.py	(revision 6841)
+++ /anuga_work/production/australia_ph2/strahan/Arc_asc2raster_GDA94z50.py	(revision 6842)
@@ -20,22 +20,28 @@
 gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx")
 gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
-gp.overwriteoutput = 0
+gp.overwriteoutput = 1
 
-scenario_dir = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\australia_ph2\\esperance\\"
+scenario_dir = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\australia_ph2\\strahan\\"
 output_dir="anuga\\outputs\\"
 
-time_dir1 = '20090302_104336_run_final_0_27255_mhingee'
+time_dir1 = '20090408_152513_run_final_0_58337_2044_Tb__mhingee'
+time_dir2 = '20090408_163848_run_final_0_64214_2044_Tb__mhingee'
+time_dir3 = '20090408_175114_run_final_0_68779_2044_Tb__mhingee'
 
-time_dirs = [time_dir1] #, time_dir2] #4, time_dir5] #, time_dir3, time_dir4, time_dir5, time_dir6]
- 
-for time_dir in time_dirs:
+time_dirs = [time_dir1, time_dir2, time_dir3]
+events = [[time_dir1,0.593696],[time_dir2,0.566183],[time_dir3,0.561357]]
 
+for event in events:
+##for time_dir in time_dirs:
+    time_dir = event[0]
+    max_wave = event[1]
+    print time_dir
+    print max_wave
     # Local variables...
-    folder = scenario_dir + output_dir + time_dir +'\\'
+    folder = scenario_dir + output_dir +  time_dir +'\\'
     raster_gbd = folder + 'raster.gdb'
-    land = scenario_dir + "map_work\\Busselton.gdb\\Internal_polygons\\initial_conditions_extend_Di"
-    ocean = scenario_dir + "map_work\\Busselton.gdb\\input_boundaries\\Ocean"
+##    land = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_condition"
+##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
 
-    
     print 'Process: Create File GDB'
     gp.CreateFileGDB_management(folder, "raster")
@@ -43,8 +49,9 @@
     gp.Workspace = raster_gbd
 
-    print time_dir
+    print gp.Workspace
     
     #replication dictionary
-    replicate = (('esperance', ''),('_', ''),
+    replicate = (('strahan', ''),('_', ''),('max','_M'),
+                 ('CBD', 'CDB'),('All',''),
                  ('depth','_depth'),('speed', '_speed'),
                  ('elevation', '_ele_'), ('stage','_stage'))
@@ -57,5 +64,5 @@
         for (key, rep) in replicate:
             output_DEM = output_DEM.replace(key,rep)
-        output_DEM = output_DEM[:12]
+        output_DEM = output_DEM[:10]
         if output_DEM in generate_filename:
             print 'Output_DEM filename (%s) already in use' % output_DEM
@@ -69,11 +76,14 @@
 
         print 'Process: Define Projection' 
-        gp.DefineProjection_management(output_DEM, "PROJCS['GDA_1994_MGA_Zone_51',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
-                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',123.0],PARAMETER['Scale_Factor',0.9996]"
+        gp.DefineProjection_management(output_DEM, "PROJCS['GDA_1994_MGA_Zone_55',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
+                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',147.0],PARAMETER['Scale_Factor',0.9996]"
                                                    ",PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
-##        output_extract = output_DEM + '_E'
+##        output_extract = output_DEM + 'E'
 ##        print 'Output Extract ',output_extract
 ##        print 'Process: Extract by Mask'
 ##        gp.ExtractByMask_sa(output_DEM, land, output_extract)
+        # do this bit only if there are only stage asc files
+        div_file = output_DEM.replace('stage','div_stage')
+        print 'divide', output_DEM,' by', max_wave,' and call',div_file
+        gp.Divide_sa(output_DEM,max_wave,div_file)
 
-
Index: /anuga_work/production/australia_ph2/sydney/Arc_asc2raster_GDA94z56.py
===================================================================
--- /anuga_work/production/australia_ph2/sydney/Arc_asc2raster_GDA94z56.py	(revision 6841)
+++ /anuga_work/production/australia_ph2/sydney/Arc_asc2raster_GDA94z56.py	(revision 6842)
@@ -25,7 +25,8 @@
 output_dir = "anuga\\outputs\\"
 
-time_dir1 = '20090331_150428_run_final_0_58152_2956_Tb_lfountai'
-##time_dir2 = '20081210_100528_run_final_0_68693_250m_none_kvanputt'
-##time_dirs = [time_dir1, time_dir2]
+time_dir1 = '20090408_171539_run_final_0_58152_2938_Tb__kvanputt'
+time_dir2 = '20090409_011331_run_final_0_58222_2938_Tb__kvanputt'
+time_dir3 = '20090409_085101_run_final_0_58326_2938_Tb__kvanputt'
+time_dirs = [time_dir1, time_dir2, time_dir3]
 
 ##time_dir1 = '20090311_145740_run_final_0_58152_2956_Tb_jgriffin'
@@ -37,5 +38,5 @@
 
 
-time_dirs = [time_dir1]#, time_dir4 , time_dir3, time_dir4, time_dir5]#, time_dir6]
+##time_dirs = [time_dir1]#, time_dir4 , time_dir3, time_dir4, time_dir5]#, time_dir6]
 
 for time_dir in time_dirs:
@@ -59,5 +60,5 @@
                  ('_', ''),('Geordie', 'Geo'),('Sorrento', 'Sor'), ('max','M_'),
                  ('Fremantle', 'Fre'),('Rockingham', 'Roc'),('depth','_dep_'),
-                 ('speed', '_spe_'), ('elevation', '_ele_'), ('stage','_stage'))
+                 ('speed', '_spe_'), ('elevation', '_ele_'), ('stage','_st'))
 
     generate_filename = []
@@ -80,6 +81,6 @@
 
         print 'Process: Define Projection' 
-        gp.DefineProjection_management(output_DEM, "PROJCS['GDA_1994_MGA_Zone_56',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
-                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',153.0],PARAMETER['Scale_Factor',0.9996]"
+        gp.DefineProjection_management(output_DEM, "PROJCS['CM_151',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
+                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',151.0],PARAMETER['Scale_Factor',0.9996]"
                                                    ",PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
 
