Index: anuga_work/production/new_south_wales/batemans_bay/Arc_extract_by_mask.py
===================================================================
--- anuga_work/production/new_south_wales/batemans_bay/Arc_extract_by_mask.py	(revision 7203)
+++ anuga_work/production/new_south_wales/batemans_bay/Arc_extract_by_mask.py	(revision 7203)
@@ -0,0 +1,90 @@
+# ---------------------------------------------------------------------------
+# Arc_extract_by_mask.py
+# Created on: Fri Jun 05 2009 12:09:58 
+#   (generated by ArcGIS/ModelBuilder)
+# ---------------------------------------------------------------------------
+
+# 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.overwriteoutput = 1
+
+scenario_dir="\\\\nas2\\gemd\\georisk_models\\inundation\\data\\new_south_wales\\batemans_bay_tsunami_scenario_2009\\"
+output_dir = "anuga\\outputs\\"
+
+
+variable = 'depth'
+time_dir5 = '20090529_143332_run_final_0.0_51378_jgriffin'
+time_dir1 = '20090529_143419_run_final_0.0_51077_jgriffin'
+time_dir2 = '20090529_143442_run_final_0.0_51347_jgriffin'
+time_dir3 = '20090529_143458_run_final_0.0_51292_jgriffin'
+time_dir4 = '20090529_143527_run_final_0.0_51424_jgriffin'
+
+time_dir6 = '20090520_145453_run_final_0.0_58115_jgriffin'
+time_dir7 = '20090520_145510_run_final_0.0_58129_jgriffin'
+time_dir8 = '20090520_145608_run_final_0.0_58226_jgriffin'
+time_dir9 = '20090520_145616_run_final_0.0_58284_jgriffin'
+time_dir10 = '20090520_145700_run_final_0.0_58286_jgriffin'
+time_dir11 = '20090528_143200_run_final_1.0_51204_jgriffin'
+time_dir12 = '20090528_143323_run_final_1.0_58346_jgriffin'
+time_dir13 = '20090528_153025_run_final_0.0_58346_jgriffin'
+time_dir14 = '20090528_153109_run_final_0.0_51204_jgriffin'
+
+time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6, time_dir7, time_dir8, time_dir9, time_dir10, time_dir11, time_dir12, time_dir13, time_dir14]
+
+
+
+for time_dir in time_dirs:
+
+    print time_dir
+
+    #get event number
+    time_dir_split = time_dir.split('_')
+    event_number = time_dir_split[5]
+    print 'event_number', event_number
+
+    # Local variables...
+    folder =  scenario_dir + output_dir + time_dir + '\\'
+    raster_gdb = folder + 'raster.gdb'
+
+    gp.Workspace = raster_gdb
+
+    print gp.Workspace
+    
+    #replication dictionary
+    replicate = (('batemans_bay', ''),
+                 ('_', ''),('Geordie', 'Geo'),('Sorrento', 'Sor'), ('max','M_'),
+                 ('Fremantle', 'Fre'),('Rockingham', 'Roc'),('depth','_dep_'),
+                 ('speed', '_spe_'), ('elevation', '_ele_'), ('stage','_stage'))
+
+    generate_filename = []
+    input_raster = raster_gdb + '\\All_spe_M_'
+    #input_raster = glob.glob(raster_gbd + 'All_dep*')
+    print 'input raster', input_raster
+
+    output_raster = raster_gdb + '\speed_'+event_number+'_clip'
+    print 'output_raster', output_raster
+    
+# Local variables...
+#depth_58346_msl = "N:\\georisk_models\\inundation\\data\\new_south_wales\\batemans_bay_tsunami_scenario_2009\\anuga\\outputs\\20090528_153025_run_final_0.0_58346_jgriffin\\raster.gdb\\depth_58346_msl"
+#speed_58346_msl = "N:\\georisk_models\\inundation\\data\\new_south_wales\\batemans_bay_tsunami_scenario_2009\\anuga\\outputs\\20090528_153025_run_final_0.0_58346_jgriffin\\raster.gdb\\speed_58346_msl"
+#All_dep_M_ = "N:\\georisk_models\\inundation\\data\\new_south_wales\\batemans_bay_tsunami_scenario_2009\\anuga\\outputs\\20090528_153025_run_final_0.0_58346_jgriffin\\raster.gdb\\All_dep_M_"
+#All_spe_M_ = "N:\\georisk_models\\inundation\\data\\new_south_wales\\batemans_bay_tsunami_scenario_2009\\anuga\\outputs\\20090528_153025_run_final_0.0_58346_jgriffin\\raster.gdb\\All_spe_M_"
+    aoi_land = "N:\\georisk_models\\inundation\\data\\new_south_wales\\batemans_bay_tsunami_scenario_2009\\anuga\\polygons\\polygons.gdb\\area_of_interest_split"
+#aoi_terrigal_umina_allarea_Union = "N:\\georisk_models\\inundation\\data\\new_south_wales\\batemans_bay_tsunami_scenario_2009\\anuga\\polygons\\polygons.gdb\\aoi_terrigal_umina_allarea_Union"
+
+# Process: Extract by Mask...
+    print 'extracting by mask'
+    gp.ExtractByMask_sa(input_raster, aoi_land, output_raster)
+
+# Process: Extract by Mask (2)...
+#gp.ExtractByMask_sa(All_spe_M_, aoi_all, speed_58346_msl)
+
