Changeset 6982 for anuga_work
- Timestamp:
- May 6, 2009, 12:06:04 PM (16 years ago)
- Location:
- anuga_work/production/australia_ph2
- Files:
-
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/australia_ph2/carnarvon/build_elevation.py
r6412 r6982 55 55 convert_dem_from_ascii2netcdf(absolute_filename, 56 56 basename_out=absolute_filename, 57 use_cache= True,57 use_cache=False, 58 58 verbose=True) 59 dem2pts(absolute_filename, use_cache= True, verbose=True)59 dem2pts(absolute_filename, use_cache=False, verbose=True) 60 60 61 61 geospatial_data[filename] = Geospatial_data(file_name=absolute_filename+'.pts', … … 86 86 ##G_all = G_clip + geospatial_data[project.point_filenames[4]] 87 87 #G_clipped = G_all.clip(project.poly_all) 88 G_clip = G.clip(project.bounding_polygon)88 #G_clip = G.clip(project.bounding_polygon) 89 89 90 90 91 91 print 'Export combined DEM file' 92 G _clip.export_points_file(project.combined_elevation + '.pts')92 G.export_points_file(project.combined_elevation + '.pts') 93 93 print 'Do txt version too' 94 94 # Use for comparision in ARC 95 G _clip.export_points_file(project.combined_elevation + '.txt')95 G.export_points_file(project.combined_elevation + '.txt') 96 96 -
anuga_work/production/australia_ph2/carnarvon/project.py
r6971 r6982 32 32 event_number = int(sys.argv[1]) 33 33 else: 34 event_number = 27285# the event number or the mux file name34 event_number = 68754 # the event number or the mux file name 35 35 36 36 event_number_list = [27285, 68754, 70881] # To piggy back multiple events … … 78 78 # Used in build_elevation.py 79 79 # Format for ascii grids, as produced in ArcGIS + a projection file 80 ascii_grid_filenames = ['grid 250m_simple'] # 250m grid 200580 ascii_grid_filenames = ['grid_250m_simple'] # 250m grid 2005 81 81 82 82 # Format for points is x,y,elevation (with header) … … 132 132 # Landward bounding points 133 133 # Format easting,northing (no header) 134 landward_boundary_filename = 'landward_boundary_simple .csv'134 landward_boundary_filename = 'landward_boundary_simple2.csv' 135 135 136 136 # MUX input filename. … … 145 145 # Whatever is specified here will be relative to INUNDATION_HOME/.cache 146 146 # If nothing is specified, local cache will be used. 147 cachedir = '.python_cache_phII'147 #cachedir = '.python_cache_phII' 148 148 149 149 … … 173 173 # Output filename for elevation 174 174 # this is a combination of all the data generated in build_elevation.py 175 combined_elevation_basename = scenario_name + '_combined_elevation '175 combined_elevation_basename = scenario_name + '_combined_elevation_simple' 176 176 177 177 #------------------------------------------------------------------------------- … … 191 191 # Create absolute pathname for cache directory 192 192 # and change caching to use it 193 if 'cachedir' in dir():194 cachedir = join(os.getenv(ENV_INUNDATIONHOME), '.cache', cachedir)195 from anuga.caching import caching196 caching.set_option('cachedir', cachedir)193 ##if 'cachedir' in dir(): 194 ## cachedir = join(os.getenv(ENV_INUNDATIONHOME), '.cache', cachedir) 195 ## from anuga.caching import caching 196 ## caching.set_option('cachedir', cachedir) 197 197 198 198 # check various directories/files that must exist … … 219 219 220 220 # The absolute pathname of the all elevation, generated in build_elevation.py 221 combined_elevation = join(topographies_folder, combined_elevation_basename) +'_simple'221 combined_elevation = join(topographies_folder, combined_elevation_basename) 222 222 223 223 # The absolute pathname of the mesh, generated in run_model.py -
anuga_work/production/australia_ph2/hobart/build_elevation.py
r6407 r6982 86 86 ##G_all = G_clip + geospatial_data[project.point_filenames[4]] 87 87 #G_clipped = G_all.clip(project.poly_all) 88 G_clip = G.clip(project.bounding_polygon)88 #G_clip = G.clip(project.bounding_polygon) 89 89 90 90 91 91 print 'Export combined DEM file' 92 G _clip.export_points_file(project.combined_elevation + '.pts')92 G.export_points_file(project.combined_elevation + '.pts') 93 93 print 'Do txt version too' 94 94 # Use for comparision in ARC 95 G _clip.export_points_file(project.combined_elevation + '.txt')95 G.export_points_file(project.combined_elevation + '.txt') 96 96 -
anuga_work/production/australia_ph2/hobart/export_results_max.py
r6407 r6982 22 22 directory = project.output_folder 23 23 24 time_dir1 = '20090130_165532_run_final_0.6_27255_extend_dt_kvanputt' 25 ##time_dir2 = '' 26 ##time_dir3 = '' 27 ##time_dir4 = '' 28 ##time_dir5 = '' 29 ##time_dir6 = '' 30 ## 31 time_dirs = [time_dir1] #5, time_dir4]# , time_dir4, time_dir5, time_dir6] 24 time_dir1 = '20090424_121952_run_final_0_51204_2462_Tb__kvanputt' 25 time_dir2 = '20090424_123250_run_final_0_51204_2462_Tb_internal_kvanputt' 26 time_dir3 = '20090424_122951_run_final_0_58212_2462_Tb__kvanputt' 27 time_dir4 = '20090424_123104_run_final_0_64425_2462_Tb__kvanputt' 28 29 time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4] 32 30 33 31 … … 35 33 ##cellsize = 5 36 34 37 #timestep = None # None means no timestep!38 timestep = 035 timestep = None # None means no timestep! 36 #timestep = 0 39 37 40 38 ###### … … 42 40 ###### 43 41 44 #area = ['Bunbury', 'Busselton'] # strings must match keys in var_equations below45 42 area = ['All'] # 'All' means no special areas - the whole thing 46 43 … … 56 53 57 54 # one or more key strings from var_equations above 58 var = [' elevation']55 var = ['stage'] 59 56 60 57 ###### … … 85 82 for time_dir in time_dirs: 86 83 87 name1 = join(directory, time_dir, project.scenario_name) 88 #name2 = join(directory, time_dir, project.scenario_name)+'_time_39600_0' 89 #name3 = join(directory, time_dir, project.scenario_name)+'_time_79200_0' 84 name = join(directory, time_dir, project.scenario_name) 85 86 outname = name + '_' + which_area + '_' + which_var 87 quantityname = var_equations[which_var] 90 88 91 names = [name1] #, name2]#, name3] 92 93 # asc_name = [] 94 95 for name in names: 96 97 outname = name + '_' + which_area + '_' + which_var 98 quantityname = var_equations[which_var] 89 print 'start sww2dem: time_dir=%s' % time_dir 90 91 sww2dem(name, basename_out = outname, 92 quantity = quantityname, 93 timestep = timestep, 94 cellsize = cellsize, 95 easting_min = easting_min, 96 easting_max = easting_max, 97 northing_min = northing_min, 98 northing_max = northing_max, 99 reduction = max, 100 verbose = True, 101 format = 'asc') 99 102 100 print 'start sww2dem: time_dir=%s' % time_dir101 102 sww2dem(name, basename_out = outname,103 quantity = quantityname,104 timestep = timestep,105 cellsize = cellsize,106 easting_min = easting_min,107 easting_max = easting_max,108 northing_min = northing_min,109 northing_max = northing_max,110 reduction = max,111 verbose = True,112 format = 'asc')113 114 ## asc_name.append(outname + '.asc')115 ##116 ## maxasc_outname = join(directory, time_dir, project.scenario_name)+'_'+which_area+'_'+which_var+'_max.asc'117 ##118 ## print 'max asc outname ', maxasc_outname119 ## print 'asc_name ', str(asc_name)120 ##121 ## MaxAsc(maxasc_outname, asc_name) -
anuga_work/production/australia_ph2/hobart/project.py
r6772 r6982 32 32 event_number = int(sys.argv[1]) 33 33 else: 34 event_number = 5 8082# the event number or the mux file name35 36 event_number_list = [512 68, 58082, 64309] # To piggy back multiple events34 event_number = 51204 # the event number or the mux file name 35 36 event_number_list = [51204, 58212, 64425] # To piggy back multiple events 37 37 38 38 tide = 0 # difference between MSL and HAT … … 40 40 friction=0.01 # manning's friction coefficient 41 41 starttime=0 # start time for simulation 42 finaltime=60000 # final time for simulation42 finaltime=60000 # final time for simulation 43 43 setup = 'final' # This can be one of three values 44 44 # trial - coarsest mesh, fast … … 47 47 48 48 # index is only used when wave = Tb 49 index = 2 528# index from the PTHA - Y2000 0.257m49 index = 2462 # index from the PTHA - Y2000 0.257m 50 50 wave = 'Tb' # Bf (sts wave) Tb (index wave) 51 51 52 52 53 internal_polygon = False53 internal_polygon = True 54 54 55 55 #------------------------------------------------------------------------------- … … 78 78 # Used in build_elevation.py 79 79 # Format for ascii grids, as produced in ArcGIS + a projection file 80 ascii_grid_filenames = [ ] # 250m grid 200580 ascii_grid_filenames = ['grid_250m_simple'] # 250m grid 2005 81 81 82 82 # Format for points is x,y,elevation (with header) 83 point_filenames = [ 'grid_250m.txt'] # 250m grid 200583 point_filenames = [] # 250m grid 2005 84 84 85 85 ### Add csv header list to all files in point_filenames … … 91 91 # Used in build_elevation.py 92 92 # Format for points: easting,northing (no header) 93 bounding_polygon_filename = 'bounding_polygon .csv'93 bounding_polygon_filename = 'bounding_polygon_simple.csv' 94 94 bounding_polygon_maxarea = 125000 95 95 … … 128 128 # Thinned ordering file from Hazard Map (geographic) 129 129 # Format is index,latitude,longitude (with header) 130 urs_order_filename = 'urs_order_simple .csv'130 urs_order_filename = 'urs_order_simple2.csv' 131 131 132 132 # Landward bounding points … … 173 173 # Output filename for elevation 174 174 # this is a combination of all the data generated in build_elevation.py 175 combined_elevation_basename = scenario_name + '_combined_elevation '175 combined_elevation_basename = scenario_name + '_combined_elevation_simple' 176 176 177 177 #------------------------------------------------------------------------------- -
anuga_work/production/australia_ph2/melbourne_east/project.py
r6856 r6982 29 29 event_number = int(sys.argv[1]) 30 30 else: 31 event_number = 58348# the event number or the mux file name31 event_number = 31853 # the event number or the mux file name 32 32 33 33 event_side = 'east' #'west' 34 35 if event_side == 'west': 36 index = 1979 # index from the PTHA - Y2000 0.257m 37 event_number_list = [58348, 64288, 68793] # To piggy back multiple events 38 39 elif event_side == 'east': 40 index = 2649 41 event_number_list = [31853, 51449, 58115] # To piggy back multiple events 34 index = 2649 35 event_number_list = [31853, 51449, 58115] # To piggy back multiple events 42 36 43 37 central_meridian = 146.0 # Central meridian for projection (optional) -
anuga_work/production/australia_ph2/sydney/export_results.py
r6926 r6982 29 29 ##cellsize = 5 30 30 31 #timestep = None # None means no timestep!32 timestep = 031 timestep = None # None means no timestep! 32 #timestep = 0 33 33 34 34 ###### … … 50 50 51 51 # one or more key strings from var_equations above 52 var = [' elevation']52 var = ['stage'] 53 53 54 54 ###### … … 79 79 for time_dir in time_dirs: 80 80 81 name1 = join(directory, time_dir, project.scenario_name) 82 ## name2 = join(directory, time_dir, project.scenario_name)+'_time_21060_0' 83 ## name3 = join(directory, time_dir, project.scenario_name)+'_time_42120_0' 84 ## name4 = join(directory, time_dir, project.scenario_name)+'_time_63180_0' 85 ## name5 = join(directory, time_dir, project.scenario_name)+'_time_53280_0' 86 ## name6 = join(directory, time_dir, project.scenario_name)+'_time_66600_0' 87 ## name7 = join(directory, time_dir, project.scenario_name)+'_time_79920_0' 81 name = join(directory, time_dir, project.scenario_name) 88 82 89 names = [name1]#, name2, name3,name4]#,name5,name6,name7] 90 91 asc_name = [] 92 93 for name in names: 94 95 outname = name + '_' + which_area + '_' + which_var 96 quantityname = var_equations[which_var] 83 outname = name + '_' + which_area + '_' + which_var 84 quantityname = var_equations[which_var] 85 86 print 'start sww2dem: time_dir=%s' % time_dir 87 88 sww2dem(name, basename_out = outname, 89 quantity = quantityname, 90 timestep = timestep, 91 cellsize = cellsize, 92 easting_min = easting_min, 93 easting_max = easting_max, 94 northing_min = northing_min, 95 northing_max = northing_max, 96 reduction = max, 97 verbose = True, 98 format = 'asc') 97 99 98 print 'start sww2dem: time_dir=%s' % time_dir99 100 sww2dem(name, basename_out = outname,101 quantity = quantityname,102 timestep = timestep,103 cellsize = cellsize,104 easting_min = easting_min,105 easting_max = easting_max,106 northing_min = northing_min,107 northing_max = northing_max,108 reduction = max,109 verbose = True,110 format = 'asc')111 112 ## asc_name.append(outname + '.asc')113 ##114 ## maxasc_outname = join(directory, time_dir, project.scenario_name)+'_'+which_area+'_'+which_var+'_max.asc'115 ##116 ## print 'max asc outname ', maxasc_outname117 ## print 'asc_name ', str(asc_name)118 ##119 ## MaxAsc(maxasc_outname, asc_name) -
anuga_work/production/australia_ph2/sydney/export_results_max.py
r6926 r6982 22 22 directory = project.output_folder 23 23 24 time_dir1 = '2009042 1_150708_run_final_0_58152_2938_Tb_internal_mhingee'25 ##time_dir2 = '20090311_152929_run_final_0_70385_1203_Tb_jgriffin'26 ##time_dir3 = '20090311_153009_run_final_0_70454_1203_Bf_jgriffin'27 ##time_dir4 = '20090311_153054_run_final_0_70339_1203_Bf_jgriffin'24 time_dir1 = '20090428_131539_run_final_30_0_58152_2938_Tb_internal_kvanputt' 25 time_dir2 = '20090311_152929_run_final_0_70385_1203_Tb_jgriffin' 26 time_dir3 = '20090311_153009_run_final_0_70454_1203_Bf_jgriffin' 27 time_dir4 = '20090311_153054_run_final_0_70339_1203_Bf_jgriffin' 28 28 time_dirs = [time_dir1]#,time_dir2,time_dir3,time_dir4] 29 29 … … 86 86 87 87 name1 = join(directory, time_dir, project.scenario_name) 88 ## name2 = join(directory, time_dir, project.scenario_name)+'_time_66360_0'89 ##name3 = join(directory, time_dir, project.scenario_name)+'_time_26640_0'90 ##name4 = join(directory, time_dir, project.scenario_name)+'_time_39960_0'91 ##name5 = join(directory, time_dir, project.scenario_name)+'_time_53280_0'92 ##name6 = join(directory, time_dir, project.scenario_name)+'_time_66600_0'93 ##name7 = join(directory, time_dir, project.scenario_name)+'_time_79920_0'88 name2 = join(directory, time_dir, project.scenario_name)+'_time_32460_0' 89 name3 = join(directory, time_dir, project.scenario_name)+'_time_26640_0' 90 name4 = join(directory, time_dir, project.scenario_name)+'_time_39960_0' 91 name5 = join(directory, time_dir, project.scenario_name)+'_time_53280_0' 92 name6 = join(directory, time_dir, project.scenario_name)+'_time_66600_0' 93 name7 = join(directory, time_dir, project.scenario_name)+'_time_79920_0' 94 94 95 names = [name1 ]#, name2]#, name3,name4,name5,name6,name7]95 names = [name1, name2]#, name3,name4,name5,name6,name7] 96 96 97 97 asc_name = [] … … 116 116 format = 'asc') 117 117 118 ##asc_name.append(outname + '.asc')119 ##120 ##maxasc_outname = join(directory, time_dir, project.scenario_name)+'_'+which_area+'_'+which_var+'_max.asc'121 ## 122 ##print 'max asc outname ', maxasc_outname123 ##print 'asc_name ', str(asc_name)124 ##125 ## MaxAsc(maxasc_outname, asc_name) 118 asc_name.append(outname + '.asc') 119 120 maxasc_outname = join(directory, time_dir, project.scenario_name)+'_'+which_area+'_'+which_var+'_max.asc' 121 122 print 'max asc outname ', maxasc_outname 123 print 'asc_name ', str(asc_name) 124 125 -
anuga_work/production/australia_ph2/sydney/project.py
r6959 r6982 45 45 starttime=0 # start time for simulation 46 46 finaltime=60000 #60000 # final time for simulation 47 setup = 'final ' # This can be one of three values47 setup = 'final_30' # This can be one of three values 48 48 # trial - coarsest mesh, fast 49 49 # basic - coarse mesh -
anuga_work/production/australia_ph2/sydney/setup_model.py
r6461 r6982 109 109 project.time_thinning = 12 110 110 project.yieldstep = 120 111 elif project.setup == 'final_120': 112 print 'final_120' 113 project.scale_factor = 1 114 project.time_thinning = 4 115 project.yieldstep = 120 116 elif project.setup == 'final_30': 117 print 'final_120' 118 project.scale_factor = 1 119 project.time_thinning = 4 120 project.yieldstep = 30 111 121 elif project.setup == 'final': 112 122 print 'final'
Note: See TracChangeset
for help on using the changeset viewer.