Index: /anuga_work/production/carnarvon/carnarvon_rerun/Carnarvon4distribution.py
===================================================================
--- /anuga_work/production/carnarvon/carnarvon_rerun/Carnarvon4distribution.py	(revision 7116)
+++ /anuga_work/production/carnarvon/carnarvon_rerun/Carnarvon4distribution.py	(revision 7116)
@@ -0,0 +1,126 @@
+# ---------------------------------------------------------------------------
+# Carnarvon4distribution.py
+# Created on: Thu Apr 30 2009 03:51:03 PM
+#   (generated by ArcGIS/ModelBuilder)
+# ---------------------------------------------------------------------------
+
+# Import system modules
+import sys, string, os, arcgisscripting
+
+# 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/Data Management Tools.tbx")
+
+output_loc = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\western_australia\\FESA_outputs_Dec_08\\ARCgrids\\April_2009\\"
+input_scenario = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\western_australia\\carnarvon_tsunami_scenario\\"
+input_output = input_scenario + "\\anuga\\outputs\\"
+community = 'Carnarvon'
+location = 'CBD'
+in_Tsunami_1_HAT = input_output + "20090324_154738_run_final_1_27283_Bt_kvanputt\\raster.gdb\\"
+in_Tsunami_1_MSL = input_output + "20090327_160753_run_final_0_27283_Bt_kvanputt\\raster.gdb\\"
+in_Tsunami_2_HAT = input_output + "20090324_134442_run_final_1_27255_Bt_kvanputt\\raster.gdb\\"
+in_Tsunami_2_MSL = input_output + "20090327_154824_run_final_0_27255_Bt_kvanputt\\raster.gdb\\"
+in_Tsunami_3_HAT = input_output + "20090324_154824_run_final_1_68693_Bt_kvanputt\\raster.gdb\\"
+in_Tsunami_3_MSL = input_output + "20090327_154730_run_final_0_68693_Bt_kvanputt\\raster.gdb\\"
+
+Tsunami_1_HAT = output_loc + "Tsunami1-Exmouth\\" + community + "_HAT.gdb\\"
+Tsunami_1_MSL = output_loc + "Tsunami1-Exmouth\\" + community + "_MSL.gdb\\"
+Tsunami_2_HAT = output_loc + "Tsunami2-Perth\\" + community + "_HAT.gdb\\"
+Tsunami_2_MSL = output_loc + "Tsunami2-Perth\\" + community + "_MSL.gdb\\"
+Tsunami_3_HAT = output_loc + "Tsunami3-1833\\" + community + "_HAT.gdb\\"
+Tsunami_3_MSL = output_loc + "Tsunami3-1833\\" + community + "_MSL.gdb\\"
+
+depth = 'CBD_dep__M_E'
+speed = 'CBD_speed_'
+hr = community + '_runup'
+
+# Local variables...
+# polygon clip
+if location == 'CBD':
+    extent = input_scenario + "map_work\\Carnarvon.gdb\\Polygon\\Carnarvon5m"
+
+# Output locations
+
+
+
+hr_1_HAT = Tsunami_1_HAT +"highest_runup"
+hr_1_MSL = Tsunami_1_MSL +"highest_runup"
+hr_2_HAT = Tsunami_2_HAT +"highest_runup"
+hr_2_MSL = Tsunami_2_MSL +"highest_runup"
+hr_3_HAT = Tsunami_3_HAT +"highest_runup"
+hr_3_MSL = Tsunami_3_MSL +"highest_runup"
+
+depth_1_HAT = Tsunami_1_HAT + location + "_depth"
+depth_1_MSL = Tsunami_1_MSL + location + "_depth"
+depth_2_HAT = Tsunami_2_HAT + location + "_depth"
+depth_2_MSL = Tsunami_2_MSL + location + "_depth"
+depth_3_HAT = Tsunami_3_HAT + location + "_depth"
+depth_3_MSL = Tsunami_3_MSL + location + "_depth"
+
+speed_1_HAT = Tsunami_1_HAT + location + "_speed"
+speed_1_MSL = Tsunami_1_MSL + location + "_speed"
+speed_2_HAT = Tsunami_2_HAT + location + "_speed"
+speed_2_MSL = Tsunami_2_MSL + location + "_speed"
+speed_3_HAT = Tsunami_3_HAT + location + "_speed"
+speed_3_MSL = Tsunami_3_MSL + location + "_speed"
+
+
+# Input locations
+
+in_depth_1_HAT = in_Tsunami_1_HAT + depth
+in_depth_1_MSL = in_Tsunami_1_MSL + depth
+in_depth_2_HAT = in_Tsunami_2_HAT + depth
+in_depth_2_MSL = in_Tsunami_2_MSL + depth
+in_depth_3_HAT = in_Tsunami_3_HAT + depth
+in_depth_3_MSL = in_Tsunami_3_MSL + depth
+
+in_speed_1_HAT = in_Tsunami_1_HAT + speed
+in_speed_1_MSL = in_Tsunami_1_MSL + speed
+in_speed_2_HAT = in_Tsunami_2_HAT + speed
+in_speed_2_MSL = in_Tsunami_2_MSL + speed
+in_speed_3_HAT = in_Tsunami_3_HAT + speed
+in_speed_3_MSL = in_Tsunami_3_MSL + speed
+
+in_hr_1_HAT = in_Tsunami_1_HAT + hr
+in_hr_1_MSL = in_Tsunami_1_MSL + hr
+in_hr_2_HAT = in_Tsunami_2_HAT + hr
+in_hr_2_MSL = in_Tsunami_2_MSL + hr
+in_hr_3_HAT = in_Tsunami_3_HAT + hr
+in_hr_3_MSL = in_Tsunami_3_MSL + hr
+
+
+# Process: Extract by Mask
+
+print 'Extract by mask for depth'
+gp.ExtractByMask_sa(in_depth_1_HAT, extent, depth_1_HAT)
+gp.ExtractByMask_sa(in_depth_1_MSL, extent, depth_1_MSL)
+gp.ExtractByMask_sa(in_depth_2_HAT, extent, depth_2_HAT)
+gp.ExtractByMask_sa(in_depth_2_MSL, extent, depth_2_MSL)
+gp.ExtractByMask_sa(in_depth_3_HAT, extent, depth_3_HAT)
+gp.ExtractByMask_sa(in_depth_3_MSL, extent, depth_3_MSL)
+
+print 'Extract by mask for speed'
+gp.ExtractByMask_sa(in_speed_1_HAT, extent, speed_1_HAT)
+gp.ExtractByMask_sa(in_speed_1_MSL, extent, speed_1_MSL)
+gp.ExtractByMask_sa(in_speed_2_HAT, extent, speed_2_HAT)
+gp.ExtractByMask_sa(in_speed_2_MSL, extent, speed_2_MSL)
+gp.ExtractByMask_sa(in_speed_3_HAT, extent, speed_3_HAT)
+gp.ExtractByMask_sa(in_speed_3_MSL, extent, speed_3_MSL)
+
+
+# Process: Copy Features...
+
+print 'Copy Highest Runup'
+gp.CopyFeatures_management(in_hr_1_HAT, hr_1_HAT, "", "0", "0", "0")
+gp.CopyFeatures_management(in_hr_1_MSL, hr_1_MSL, "", "0", "0", "0")
+gp.CopyFeatures_management(in_hr_2_HAT, hr_2_HAT, "", "0", "0", "0")
+gp.CopyFeatures_management(in_hr_2_MSL, hr_2_MSL, "", "0", "0", "0")
+gp.CopyFeatures_management(in_hr_3_HAT, hr_3_HAT, "", "0", "0", "0")
+gp.CopyFeatures_management(in_hr_3_MSL, hr_3_MSL, "", "0", "0", "0")
+
Index: /anuga_work/production/carnarvon/carnarvon_rerun/Inundation_polygon.py
===================================================================
--- /anuga_work/production/carnarvon/carnarvon_rerun/Inundation_polygon.py	(revision 7116)
+++ /anuga_work/production/carnarvon/carnarvon_rerun/Inundation_polygon.py	(revision 7116)
@@ -0,0 +1,69 @@
+# ---------------------------------------------------------------------------
+# Inundation_line.py
+# Created on: Tue May 12 2009 01:50:45 PM
+#   (generated by ArcGIS/ModelBuilder)
+# Usage: Inundation_line <Bun_depth_M_E> <Bus_depth_M_E> <bunbury_1km> <busselton_1km> 
+# ---------------------------------------------------------------------------
+
+# Import system modules
+import sys, string, os, arcgisscripting, glob
+
+# Create the Geoprocessor object
+gp = arcgisscripting.create()
+gp.overwriteoutput = 1
+
+# Set the necessary product code
+gp.SetProduct("ArcInfo")
+
+# 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.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Analysis Tools.tbx")
+
+# Script arguments...
+time_dir1 = '20090324_134442_run_final_1_27255_Bt_kvanputt'
+time_dir2 = '20090324_154738_run_final_1_27283_Bt_kvanputt'
+time_dir3 = '20090324_154824_run_final_1_68693_Bt_kvanputt'
+time_dir4 = '20090327_154730_run_final_0_68693_Bt_kvanputt'
+time_dir5 = '20090327_154824_run_final_0_27255_Bt_kvanputt'
+time_dir6 = '20090327_160753_run_final_0_27283_Bt_kvanputt'
+
+time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]   
+
+community = 'carnarvon'
+scenario = "\\\\nas2\\gemd\\georisk_models\\inundation\\data\\western_australia\\" + community +"_tsunami_scenario\\"
+output_folder = scenario + "anuga\\outputs\\"
+location = 'CBD'
+extent = scenario + "map_work\\Carnarvon.gdb\\Polygon\\Carnarvon5m_clip"
+depth = 'CBD_dep__M_E'
+
+for time_dir in time_dirs:
+
+    raster = output_folder + time_dir + "\\raster.gdb\\"
+    print 'location', location
+    print 'extent', extent
+
+    # Local variables...
+    Output_raster = raster +"Temp_raster_"+ location
+    Output_polygon_features = raster +"Temp_polygon_"+ location
+    Output_Feature_Class = raster +"Temp_line_"+ location
+    Reclassification = "0 0.05 NODATA;0.05 4.5840001106262207 1"
+    Inundation = raster + "Inundation_" + location + "_polygon"
+    depth_loc = raster + depth
+    
+    print 'Process: Reclassify'
+    gp.Reclassify_sa(depth_loc, "Value", Reclassification, Output_raster, "DATA")
+    
+    print 'Process: Raster to Polygon'
+    gp.RasterToPolygon_conversion(Output_raster, Output_polygon_features, "SIMPLIFY", "VALUE")
+
+    print 'Process: Clip'
+    gp.Clip_analysis(Output_polygon_features, extent, Inundation, "")
+
+    print 'Process: Delete'
+    gp.Delete_management(Output_raster, "RasterDataset")
+    gp.Delete_management(Output_polygon_features, "FeatureClass")
Index: /anuga_work/production/carnarvon/carnarvon_rerun/export_results_max.py
===================================================================
--- /anuga_work/production/carnarvon/carnarvon_rerun/export_results_max.py	(revision 7115)
+++ /anuga_work/production/carnarvon/carnarvon_rerun/export_results_max.py	(revision 7116)
@@ -29,11 +29,11 @@
 time_dir6 = '20090327_160753_run_final_0_27283_Bt_kvanputt'
 
-time_dirs = [time_dir5, time_dir6]   
+time_dirs = [time_dir1] #5, time_dir6]   
 
 #cellsize = 250
 cellsize = 20
 
-timestep = None    # None means no timestep!
-#timestep = 0
+#timestep = None    # None means no timestep!
+timestep = 0
 
 ######
@@ -55,5 +55,5 @@
 
 # one or more key strings from var_equations above
-var = ['depth', 'speed']
+var = ['elevation']
 
 ######
@@ -88,7 +88,7 @@
             name3 = join(directory, time_dir, project.scenario_name)+'_time_78600_0'
 
-            names = [name1, name2, name3]
+            names = [name1] #, name2, name3]
       
-            asc_name = []   
+            #asc_name = []   
                
             for name in names:
@@ -110,11 +110,11 @@
                             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)
+##
+##                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)
