Changeset 3661
- Timestamp:
- Sep 25, 2006, 2:26:13 PM (18 years ago)
- Location:
- anuga_work/production/hobart_2006
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/hobart_2006/export_results.py
r3650 r3661 3 3 4 4 from anuga.shallow_water.data_manager import sww2dem 5 #from anuga.pyvolution.ermapper_grids import read_ermapper_grid 6 from anuga.abstract_2d_finite_volumes.util import Screen_Catcher 5 7 from os import sep 6 8 7 time_dir = '2006092 1_083846' #MSL9 time_dir = '20060922_024842' #MSL 8 10 directory = project.outputdir 9 name = directory + time_dir + 11 name = directory + time_dir +sep + 'source' 10 12 13 print 'output dir:', name 11 14 #print 'Which variable do you want to export?' 12 15 #which_var = int(raw_input('Stage = 0, Absolute Momentum = 1, Depth = 2, Speed = 3 ' )) 13 which_var = 4 # for Hamish/Alex to compare 14 #which_var = 2 # for Ingo/Neil to make maps 15 16 which_var = 4 17 #sys.stderr.write(sys.stdout.data) 16 18 if which_var == 0: # Stage 17 19 outname = name + '_stage' … … 33 35 34 36 if which_var == 4: # Elevation 35 outname = name + '_elevation '37 outname = name + '_elevation_node3' 36 38 quantityname = 'elevation' #Elevation 37 39 40 print 'start sww2dem' 41 #sys.stderr.write(sys.stdout.data) 38 42 sww2dem(name, basename_out = outname, 39 43 quantity = quantityname, 40 cellsize = 25, 44 cellsize = 25, # Trevor would like this at 25 41 45 # define region for viz purposes 42 46 easting_min = project.e_min_area, … … 47 51 verbose = True, 48 52 format = 'asc') 53 54 #sys.stderr.write(sys.stdout.data) 55 56 #Check 57 58 #data = read_ermapper_grid(name) 59 #print 'Values from %s are in [%f, %f]' %(name, min(data.flat), max(data.flat)) -
anuga_work/production/hobart_2006/project.py
r3660 r3661 15 15 #onshore_name = 'hob3_topo' # original 16 16 onshore_name = 'hob5_topo' # 12.5m grid and clipped to 100m elevation or 3000m from coast 17 onshore_name_25 = 'hob5_topo_25m' # 25m grid and clipped to 100m elevation or 3000m from coast 17 #onshore_name_25 = 'hob5_topo_25m' # 25m grid and clipped to 100m elevation or 3000m from coast 18 onshore_name_25 = 'hob6_topo_25m' # 25m grid NOT clipped 18 19 offshore_name_tas1 = 'derwent_2m' 19 20 offshore_name_tas2 = 'derwent_5m' … … 121 122 122 123 # region to export for inundation map 123 e_min_area = 500000124 e_min_area = 490000 124 125 e_max_area = 580000 125 n_min_area = 5 200000126 n_min_area = 5160000 126 127 n_max_area = 5275000 127 128 … … 142 143 polyAll, zone = convert_points_from_latlon_to_utm([d0, d1, d2, d3]) 143 144 refzone = zone 144 NWcorner = polyAll[0] 145 SEcorner = polyAll[2] 145 polyAll = [[500000, 5200000],[520000, 5200000],[520000, 5400000],[500000,5400000]] 146 146 147 147 # region to export for Alex to make bathymetry map 148 e_min_area = 480000#NWcorner[0]149 e_max_area = 600000#SEcorner[0]150 n_min_area = 5 156000#NWcorner[1]151 n_max_area = 52 85000#SEcorner[1]148 e_min_area = 500000 #490000 149 e_max_area = 560000 #580000 150 n_min_area = 5240000#5160000 151 n_max_area = 5260000#5270000 152 152 153 153 #Interior region - Hobart city area + Glenorchy, Kingston -
anuga_work/production/hobart_2006/run_hobart.py
r3660 r3661 88 88 project.onshore_dem_name_25 + '.pts', 89 89 project.all_onshore_dem_name + '.pts') 90 #print 'local offshore data sets' 91 #G1 = Geospatial_data(file_name = project.offshore_dem_name_local1 + '.xya') 92 #G2 = Geospatial_data(file_name = project.offshore_dem_name_local2 + '.xya') 93 #G3 = Geospatial_data(file_name = project.offshore_dem_name_local3 + '.xya') 94 #G4 = Geospatial_data(file_name = project.offshore_dem_name_local4 + '.xya') 95 #G11 = G1 + G2 + G3 + G4 96 #print 'aho offshore data sets' 97 #G5 = Geospatial_data(file_name = project.offshore_dem_name_aho1 + '.xya') 98 #G6 = Geospatial_data(file_name = project.offshore_dem_name_aho2 + '.xya') 99 #G7 = Geospatial_data(file_name = project.offshore_dem_name_aho3 + '.xya') 100 #G8 = Geospatial_data(file_name = project.offshore_dem_name_aho4 + '.xya') 101 #G9 = Geospatial_data(file_name = project.offshore_dem_name_aho5 + '.xya') 102 #G10 = Geospatial_data(file_name = project.offshore_dem_name_aho6 + '.xya') 103 #G11 = Geospatial_data(file_name = project.offshore_dem_name_aho7 + '.xya') 104 #G12 = Geospatial_data(file_name = project.offshore_dem_name_aho8 + '.xya') 105 #G13 = Geospatial_data(file_name = project.offshore_dem_name_aho9 + '.xya') 106 #G14 = Geospatial_data(file_name = project.offshore_dem_name_aho10 + '.xya') 107 #G15 = Geospatial_data(file_name = project.offshore_dem_name_aho11 + '.xya') 108 #G16 = Geospatial_data(file_name = project.offshore_dem_name_aho12 + '.xya') 109 #G17 = Geospatial_data(file_name = project.offshore_dem_name_aho13 + '.xya') 110 #G18 = Geospatial_data(file_name = project.offshore_dem_name_aho14 + '.xya') 111 #G19 = Geospatial_data(file_name = project.offshore_dem_name_aho15 + '.xya') 112 #G20 = Geospatial_data(file_name = project.offshore_dem_name_aho16 + '.xya') 113 #G12 = G5+G6+G7+G8+G9+G10+G11+G12+G13+G14+G15+G16+G17+G18+G19+G20 114 #print 'local onshore dem' 115 #G21 = Geospatial_data(file_name = project.onshore_dem_name + '.pts') 116 print 'coast' 117 #G22 = Geospatial_data(file_name = project.coast_dem_name + '.xya') 118 #print 'adding data sets' 119 #G = G11 + G12 + G21 + G22 120 #G = G1+G2+G3+G4+G5+G6+G7+G8+G9+G10+G11+G12+G13+G14+G15+G16+G17+G18+G19+G20+G21+G22 121 #G = G5+G6+G7+G8+G9+G10+G11+G12+G13+G14+G15+G16+G17+G18+G19+G20+G21+G22 122 #G = G21+G22+G5+G6+G7+G8+G9+G10+G11+G12+G13+G14+G15+G16+G17+G18+G19+G20 123 #G = G21+G22+G5 124 #G = Geospatial_data(file_name = project.onshore_dem_name + '.pts') #+ \ 125 # Geospatial_data(file_name = project.coast_dem_name + '.xya') #+ \ 126 # Geospatial_data(file_name = project.offshore_dem_name_aho1 + '.xya') 90 91 print 'adding data sets' 127 92 G = Geospatial_data(file_name = project.offshore_dem_name_local1 + '.xya')+\ 128 93 Geospatial_data(file_name = project.offshore_dem_name_local2 + '.xya')+\ … … 148 113 G.export_points_file(project.combined_dem_name + '.pts') 149 114 150 #---------------------------------------------------------------------------- ---115 #---------------------------------------------------------------------------- 151 116 # Create the triangular mesh based on overall clipping polygon with a tagged 152 117 # boundary and interior regions defined in project.py along with … … 171 136 {'boundary_tags': {'bottom': [0], 'right': [1], 172 137 'top': [2], 'left': [3]}, 173 'maximum_triangle_area': 250000,174 'filename': meshname ,175 'interior_regions': interior_regions},138 'maximum_triangle_area': 100000, 139 'filename': meshname}, 140 #'interior_regions': interior_regions}, 176 141 verbose = True, evaluate=True) 177 142 … … 211 176 212 177 #------------------------------------------------------------------------------- 213 # Setup boundary conditions (all reflective)178 # Setup boundary conditions 214 179 #------------------------------------------------------------------------------- 215 180 print 'start ferret2sww' … … 274 239 t0 = time.time() 275 240 276 for t in domain.evolve(yieldstep = 240, finaltime = 7200):241 for t in domain.evolve(yieldstep = 60, finaltime = 120): 277 242 domain.write_time() 278 243 domain.write_boundary_statistics(tags = 'bottom') 279 244 280 for t in domain.evolve(yieldstep = 120, finaltime = 12600281 ,skip_initial_step = True):282 domain.write_time()283 domain.write_boundary_statistics(tags = 'bottom')245 #for t in domain.evolve(yieldstep = 120, finaltime = 12600 246 # ,skip_initial_step = True): 247 # domain.write_time() 248 # domain.write_boundary_statistics(tags = 'bottom') 284 249 285 250 print 'That took %.2f seconds' %(time.time()-t0)
Note: See TracChangeset
for help on using the changeset viewer.