Changeset 6682
- Timestamp:
- Apr 1, 2009, 2:50:33 PM (15 years ago)
- Location:
- anuga_work/production/geraldton/geraldton_rerun
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/geraldton/geraldton_rerun/Arc_asc2raster_GDA94z50.py
r6671 r6682 56 56 57 57 generate_filename = [] 58 input_ascii = glob.glob(folder + '* depth_max.asc')58 input_ascii = glob.glob(folder + '*speed_max.asc') 59 59 60 60 for infile in input_ascii: … … 77 77 ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',117.0],PARAMETER['Scale_Factor',0.9996]" 78 78 ",PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]") 79 output_extract = output_DEM + 'E' 80 print 'Output Extract ',output_extract 81 print 'Process: Extract by Mask' 82 gp.ExtractByMask_sa(output_DEM, land, output_extract) 79 ## output_extract = output_DEM + 'E' 80 ## print 'Output Extract ',output_extract 81 ## print 'Process: Extract by Mask' 82 ## gp.ExtractByMask_sa(output_DEM, land, output_extract) 83 ## 83 84 84 -
anuga_work/production/geraldton/geraldton_rerun/Arc_txt2feature_class.py
r6671 r6682 26 26 time_dir6 = '20090327_160043_run_final_0_27255_Bt_kvanputt' 27 27 28 time_dirs = [time_dir 1, time_dir2, time_dir3]28 time_dirs = [time_dir4, time_dir5, time_dir6] 29 29 30 30 for time_dir in time_dirs: … … 36 36 layer = 'layer' 37 37 38 print 'Process: Create File GDB'39 gp.CreateFileGDB_management(folder, "raster")38 ## print 'Process: Create File GDB' 39 ## gp.CreateFileGDB_management(folder, "raster") 40 40 41 41 print 'Process: Make XY Event Layer' -
anuga_work/production/geraldton/geraldton_rerun/Arc_txt2feature_class_res.py
r6671 r6682 7 7 # Import system modules 8 8 import sys, string, os, arcgisscripting 9 from os.path import join 9 10 10 11 # Create the Geoprocessor object … … 19 20 output_dir = "anuga\\outputs\\" 20 21 21 time_dir1 = '200 81117_141353_run_final_0_27283_alpha0.1_kvanputt'22 time_dir2 = '200 81117_141443_run_final_0.6_27283_alpha0.1_kvanputt'23 time_dir3 = '200 81117_141520_run_final_0_27255_alpha0.1_kvanputt'24 time_dir4 = '200 81117_141558_run_final_0.6_27255_alpha0.1_kvanputt'25 time_dir5 = '200 81117_141634_run_final_0_68693_alpha0.1_kvanputt'26 time_dir6 = '200 81117_141717_run_final_0.6_68693_alpha0.1_kvanputt'22 time_dir1 = '20090324_134504_run_final_0.6_27255_Bt_kvanputt' 23 time_dir2 = '20090324_140411_run_final_0.6_27283_Bt_kvanputt' 24 time_dir3 = '20090324_140741_run_final_0.6_68693_Bt_kvanputt' 25 time_dir4 = '20090327_155230_run_final_0_68693_Bt_kvanputt' 26 time_dir5 = '20090327_160022_run_final_0_27283_Bt_kvanputt' 27 time_dir6 = '20090327_160043_run_final_0_27255_Bt_kvanputt' 27 28 29 time_dirs = [time_dir6] #1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6] 28 30 29 time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6] 31 def replace_in_file(filename, instr, repstr): 32 '''Replace one string with another in a file.''' 33 34 # get the file contents 35 fd = open(filename, 'r') 36 lines = fd.readlines() 37 fd.close() 38 39 # convert list to one string 40 newlines = ''.join(lines) 41 42 # replace 'instr' with 'repstr' 43 newlines = newlines.replace(instr, repstr) 44 45 # write changed lines back to file 46 fd = open(filename, 'w') 47 fd.write(newlines) 48 fd.close() 30 49 31 50 for time_dir in time_dirs: 32 51 print 'time_dir = ', time_dir 33 52 # Local variables... 34 53 folder = scenario_dir + output_dir + time_dir + '\\' … … 36 55 raster_gdb = folder + "raster.gdb" 37 56 layer = 'layer' 57 58 print 'replace _$ with nothing' 59 replace_in_file(input_dir_name, '_$', '') 38 60 39 40 61 print 'Process: Make XY Event Layer' 41 62 gp.MakeXYEventLayer_management(input_dir_name, "longitude", "latitude", layer, "GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];IsHighPrecision") 42 63 43 64 print 'Process: Feature Class to Feature Class' 44 gp.FeatureClassToFeatureClass_conversion(layer, raster_gdb, "geraldton_res", "", "OBJECTID OBJECTID true true false 4 Long 0 10 ,First,#, geraldton_res.csv_Features,OBJECTID,-1,-1;LONGITUDE LONGITUDE true true false 8 Double 0 0 ,First,#,geraldton_res.csv_Features,LONGITUDE,-1,-1;LATITUDE LATITUDE true true false 8 Double 0 0 ,First,#,geraldton_res.csv_Features,LATITUDE,-1,-1;STRUCT_INUNDATED STRUCT_INUNDATED true true false 4 Long 0 10 ,First,#,geraldton_res.csv_Features,STRUCT_INUNDATED,-1,-1;STRUCT_DAMAGE_fraction STRUCT_DAMAGE_fraction true true false 8 Double 0 0 ,First,#,geraldton_res.csv_Features,STRUCT_DAMAGE_fraction,-1,-1;COLLAPSE_CSV_INFO COLLAPSE_CSV_INFO true true false 255 Text 0 0 ,First,#,geraldton_res.csv_Features,COLLAPSE_CSV_INFO,-1,-1;MAX_DEPTH_m MAX_DEPTH_m true true false 8 Double 0 0 ,First,#,geraldton_res.csv_Features,MAX_DEPTH_m,-1,-1;STRUCT_COLLAPSED STRUCT_COLLAPSED true true false 255 Text 0 0 ,First,#,geraldton_res.csv_Features,STRUCT_COLLAPSED,-1,-1;STRUCT_LOSS STRUCT_LOSS true true false 8 Double 0 0 ,First,#,geraldton_res.csv_Features,STRUCT_LOSS,-1,-1;CONTENTS_DAMAGE_fraction CONTENTS_DAMAGE_fraction true true false 8 Double 0 0 ,First,#,geraldton_res.csv_Features,CONTENTS_DAMAGE_fraction,-1,-1;CONTENTS_LOSS CONTENTS_LOSS true true false 8 Double 0 0 ,First,#,geraldton_res.csv_Features,CONTENTS_LOSS,-1,-1", "")65 gp.FeatureClassToFeatureClass_conversion(layer, raster_gdb, "geraldton_res", "", "OBJECTID OBJECTID true true false 4 Long 0 10 ,First,#,carnarvon_res.csv_Features,OBJECTID,-1,-1;LONGITUDE LONGITUDE true true false 8 Double 0 0 ,First,#,carnarvon_res.csv_Features,LONGITUDE,-1,-1;LATITUDE LATITUDE true true false 8 Double 0 0 ,First,#,carnarvon_res.csv_Features,LATITUDE,-1,-1;STRUCT_INUNDATED STRUCT_INUNDATED true true false 4 Long 0 10 ,First,#,carnarvon_res.csv_Features,STRUCT_INUNDATED,-1,-1;STRUCT_DAMAGE_fraction STRUCT_DAMAGE_fraction true true false 8 Double 0 0 ,First,#,carnarvon_res.csv_Features,STRUCT_DAMAGE_fraction,-1,-1;COLLAPSE_CSV_INFO COLLAPSE_CSV_INFO true true false 255 Text 0 0 ,First,#,carnarvon_res.csv_Features,COLLAPSE_CSV_INFO,-1,-1;MAX_DEPTH_m MAX_DEPTH_m true true false 8 Double 0 0 ,First,#,carnarvon_res.csv_Features,MAX_DEPTH_m,-1,-1;STRUCT_COLLAPSED STRUCT_COLLAPSED true true false 255 Text 0 0 ,First,#,carnarvon_res.csv_Features,STRUCT_COLLAPSED,-1,-1;STRUCT_LOSS STRUCT_LOSS true true false 8 Double 0 0 ,First,#,carnarvon_res.csv_Features,STRUCT_LOSS,-1,-1;CONTENTS_DAMAGE_fraction CONTENTS_DAMAGE_fraction true true false 8 Double 0 0 ,First,#,carnarvon_res.csv_Features,CONTENTS_DAMAGE_fraction,-1,-1;CONTENTS_LOSS CONTENTS_LOSS true true false 8 Double 0 0 ,First,#,carnarvon_res.csv_Features,CONTENTS_LOSS,-1,-1", "") 45 66 -
anuga_work/production/geraldton/geraldton_rerun/build_urs_boundary.py
r6608 r6682 157 157 ordering_filename=order_filename, 158 158 weights=mux_weights, 159 zone=project.zone, 159 160 verbose=True) 160 161 -
anuga_work/production/geraldton/geraldton_rerun/export_results_max.py
r6670 r6682 30 30 time_dir6 = '20090327_160043_run_final_0_27255_Bt_kvanputt' 31 31 32 time_dirs = [time_dir 1, time_dir2, time_dir3]32 time_dirs = [time_dir4, time_dir5, time_dir6] 33 33 34 34 -
anuga_work/production/geraldton/geraldton_rerun/get_runup.py
r6671 r6682 24 24 time_dir6 = '20090327_160043_run_final_0_27255_Bt_kvanputt' 25 25 26 time_dirs = [time_dir 4, time_dir5] #, time_dir3]26 time_dirs = [time_dir6] #, time_dir3] 27 27 28 28 interior_region = [] -
anuga_work/production/geraldton/geraldton_rerun/project.py
r6669 r6682 26 26 # Model specific parameters. 27 27 # One or all can be changed each time the run_model script is executed 28 tide = 0# difference between MSL and HAT in metres28 tide = -0.4 # difference between MSL and HAT in metres 29 29 zone = 50 # specify zone of model 30 event_number = 27255 # the event number or the mux file name 30 #event_number = 27255 # the event number or the mux file name 31 event_number = 'wa04_val' # the event number or the mux file name 31 32 alpha = 0.1 # smoothing parameter for mesh 32 33 friction=0.01 # manning's friction coefficient … … 87 88 # Used in run_model.py 88 89 # Format for points easting,northing (no header) 89 interior_regions_data = [['CBD_500m.csv', 500], 90 interior_regions_data = [['harbour.csv', 20], 91 ['CBD_500m.csv', 500], 90 92 ['CBD_1km.csv', 800], 91 ['island_wallabi_poly .csv', 5000],93 ['island_wallabi_poly2.csv', 5000], 92 94 ['island_dingiville_poly.csv', 5000], 93 95 ['island_pelsaert_poly.csv', 5000]] … … 101 103 # Used in get_timeseries.py. 102 104 # Format easting,northing,name,elevation (with header) 103 gauges_filename = 'MH_gauges.csv' 105 #gauges_filename = 'MH_gauges.csv' 106 gauges_filename = 'nick_geraldton_gauges.csv' 104 107 105 108 # BUILDINGS EXPOSURE - for identifying inundated houses … … 119 122 # Thinned ordering file from Hazard Map (geographic) 120 123 # Format is index,latitude,longitude (with header) 121 urs_order_filename = 'thinned_boundary_ordering.csv' 124 #urs_order_filename = 'thinned_boundary_ordering.csv' 125 urs_order_filename = 'urs_order.csv' 122 126 123 127 # Landward bounding points 124 128 # Format easting,northing (no header) 125 landward_boundary_filename = 'landward_bounding_polygon.csv' 129 #landward_boundary_filename = 'landward_bounding_polygon.csv' 130 landward_boundary_filename = 'landward_boundary.csv' 126 131 127 132 # MUX input filename. 128 133 # If a meta-file from EventSelection is used, set 'multi-mux' to True. 129 134 # If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False. 130 ##mux_input_filename = event_number # to be found in event_folder135 mux_input_filename = event_number # to be found in event_folder 131 136 # (ie boundaries/event_number/) 132 ##multi_mux = False133 mux_input_filename = 'event.list'134 multi_mux = True137 multi_mux = False 138 ##mux_input_filename = 'event.list' 139 ##multi_mux = True 135 140 136 141 #------------------------------------------------------------------------------- -
anuga_work/production/geraldton/geraldton_rerun/run_building_inundation.py
r6671 r6682 33 33 time_dir6 = '20090327_160043_run_final_0_27255_Bt_kvanputt' 34 34 35 time_dirs = [time_dir 1, time_dir2, time_dir3, time_dir4, time_dir5]35 time_dirs = [time_dir6] #1, time_dir2, time_dir3, time_dir4, time_dir5] 36 36 37 37 buildings = project.building_exposure … … 39 39 for time_dir in time_dirs: 40 40 41 time_dir_name = time_dir[-25:][:-1 8]41 time_dir_name = time_dir[-25:][:-11] 42 42 43 43 building_marker = '_m_'+ time_dir_name
Note: See TracChangeset
for help on using the changeset viewer.