Changeset 3136
- Timestamp:
- Jun 13, 2006, 10:52:04 AM (18 years ago)
- Files:
-
- 5 added
- 1 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/user_manual/examples/project.py
r2481 r3136 13 13 home = '.' 14 14 15 16 15 if sys.platform == 'win32': 17 16 home = environ['INUNDATIONHOME'] #Sandpit's parent dir … … 19 18 home = expanduser('~') 20 19 21 22 20 basename = 'Sydney' 23 21 … … 28 26 # revised 25m data 29 27 finename = 'bathy_dem25' # get from Neil/Ingo (DEM or topo data) Wed 25 Jan 30 31 28 32 29 #Derive subdirectories and filenames … … 83 80 qp11 = [343487.0, 6269928.0] 84 81 qp12 = [343991.0, 6270269.0] 82 83 # demo poly which isn't rectangular 84 j0 = [385000, 6280000] 85 j1 = [350000, 6270000] 86 j2 = [325000, 6263000] 87 j3 = [325000, 6260000] 88 j4 = [316000, 6260000] 89 j5 = [316000, 6247000] 90 j6 = [350000, 6247000] 91 j7 = [385000, 6238000] 92 93 demopoly = [j0, j2, j3, j4, j5, j6, j7] 94 95 polygonptsfile1 = polygondir + 'poly3' 96 polygonptsfile2 = polygondir + 'poly4' 97 polygonptsfile3 = polygondir + 'poly5' 98 northern_polygon = read_polygon(polygonptsfile1 + '.csv') 99 harbour_polygon = read_polygon(polygonptsfile2 + '.csv') 100 southern_polygon = read_polygon(polygonptsfile3 + '.csv') 85 101 86 102 #Interior regions - the Harbour … … 171 187 botanybay_polygon_2, zone = convert_points_from_latlon_to_utm([j92, j12, j22, j62, j82, j72, j42]) 172 188 173 174 175 189 slump_origin = [385000.0, 6255000.0] #Absolute UTM -
documentation/user_manual/examples/runsydney.py
r3092 r3136 20 20 21 21 # Related major packages 22 from pyvolution.shallow_water import Domain, Reflective_boundary22 from pyvolution.shallow_water import Domain, Dirichlet_boundary 23 23 from pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts 24 24 from pyvolution.combine_pts import combine_rectangular_points_files … … 55 55 # Interior regions and mesh resolutions 56 56 interior_res = 5000 57 interior_regions = [[project.harbour_polygon_2, interior_res], 58 [project.botanybay_polygon_2, interior_res]] 57 interior_regions = [[project.northern_polygon, interior_res], 58 [project.harbour_polygon, interior_res], 59 [project.southern_polygon, interior_res]] 59 60 60 61 61 create_mesh_from_regions(project.diffpolygonall, 62 boundary_tags= {'bottom': [0], 63 'right1': [1], 64 'right0': [2], 65 'right2': [3], 66 'top': [4], 67 'left1': [5], 68 'left2': [6], 69 'left3': [7]}, 62 create_mesh_from_regions(project.demopoly, 63 boundary_tags= {'oceannorth': [0], 64 'onshorewest': [1], 65 'harbournorth': [2], 66 'harbourwest': [3], 67 'harboursouth': [4], 68 'oceansouth': [5], 69 'oceaneast': [6]}, 70 70 maximum_triangle_area=100000, 71 71 filename=meshname, … … 117 117 118 118 #------------------------------------------------------------------------------ 119 # Setup boundary conditions (all reflective)119 # Setup boundary conditions (all Dirichlet) 120 120 #------------------------------------------------------------------------------ 121 121 122 122 print 'Available boundary tags', domain.get_boundary_tags() 123 123 124 Br = Reflective_boundary(domain) 125 domain.set_boundary( {'bottom': Br, 'right1': Br, 'right0': Br, 126 'right2': Br, 'top': Br, 'left1': Br, 127 'left2': Br, 'left3': Br} ) 124 Bd = Dirichlet_boundary([0.0,0.0,0.0]) 125 domain.set_boundary( {'oceannorth': Bd, 'onshorewest': Bd, 126 'harbournorth': Bd, 'harbourwest': Bd, 127 'harboursouth': Bd, 'oceansouth': Bd, 128 'oceaneast': Bd}) 128 129 129 130 … … 137 138 for t in domain.evolve(yieldstep = 120, duration = 18000): 138 139 print domain.timestepping_statistics() 139 print domain.boundary_statistics(tags = ' bottom')140 print domain.boundary_statistics(tags = 'oceaneast') 140 141 141 142 print 'That took %.2f seconds' %(time.time()-t0) -
inundation/pyvolution/smf.py
r2965 r3136 346 346 kappa = self.kappa 347 347 kappad = self.kappad 348 amin = self.find_min(x0,wa,kappad,kappa,dx,am) 348 #amin = self.find_min(x0,wa,kappad,kappa,dx,am) 349 amin = 1.0 349 350 350 351 #double Gaussian calculation assumes water displacement is oriented … … 361 362 maxz = 0.0 362 363 minz = 0.0 363 print 'here i am about to calculate z with dx = ', dx364 364 for i in range(N): 365 365 try: … … 372 372 pass 373 373 374 print 'maximum of Double Gaussian function', maxz375 print 'minimum of Double Gaussian function', minz376 374 return z 377 375 -
production/onslow_2006/make_report.py
r3094 r3136 76 76 '0 AHD': 'MSL_map'} 77 77 78 damage_maps = {'1.5 AHD': 'HAT_damage',79 '-1.5 AHD': 'LAT_damage',80 '0 AHD': 'MSL_damage'}78 #damage_maps = {'1.5 AHD': 'HAT_damage', 79 # '-1.5 AHD': 'LAT_damage', 80 # '0 AHD': 'MSL_damage'} 81 81 82 82 gauge_map = 'onslow_gauge_map.jpg' … … 170 170 \input{tsunami_scenario} 171 171 172 \section{Inundation Model}172 \section{Inundation model} 173 173 \label{sec:anuga} 174 174 \input{anuga} … … 234 234 235 235 s = """ 236 \section{ Damagemodelling}237 \label{sec: damage}236 \section{Impact modelling} 237 \label{sec:impact} 238 238 \input{damage} 239 239 """ 240 240 fid.write(s) 241 241 242 for i, name in enumerate(production_dirs.keys()):243 244 s = '\input{%s} \n \clearpage \n \n' %damage_maps[production_dirs[name]]245 fid.write(s)242 #for i, name in enumerate(production_dirs.keys()): 243 244 # s = '\input{%s} \n \clearpage \n \n' %damage_maps[production_dirs[name]] 245 # fid.write(s) 246 246 247 247 s = """ -
production/onslow_2006/plot_data_extent.py
r3024 r3136 125 125 figure(5) 126 126 figname = 'onslow_new_boundary_test' 127 gaugex, gaugey = read_file(project.gauges50) 127 128 x50, y50 = poly_xy(project.bounding_poly50) 129 x_onslow, y_onslow = poly_xy(project.poly_onslow) 130 x_coast, y_coast = poly_xy(project.poly_coast) 128 131 #x25, y25 = poly_xy(project.bounding_poly25) 129 132 #plot(x50,y50,'r-',x25,y25,'r-',x1,y1,'g-') 130 plot(x50,y50,'r-',x1,y1,'g-' )133 plot(x50,y50,'r-',x1,y1,'g-', gaugex, gaugey, 'b+', x_onslow, y_onslow,'r-', x_coast, y_coast,'r-') 131 134 savefig(figname) 132 135 close('all') -
production/onslow_2006/project.py
r2958 r3136 3 3 """ 4 4 5 from os import sep, environ , getenv, getcwd5 from os import sep, environ 6 6 from os.path import expanduser 7 7 from utilities.polygon import read_polygon … … 14 14 from time import localtime, strftime 15 15 16 from os import getcwd 16 17 17 18 #Making assumptions about the location of scenario data … … 35 36 if sys.platform == 'win32': 36 37 home = environ['INUNDATIONHOME'] #Sandpit's parent dir 37 # home = environ['INUNDATIONHOME'] #Sandpit's parent dir 38 comparehome = environ['ANUGAHOME'] 38 39 else: 39 home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'1'+sep+'cit'+sep+'risk_assessment_methods_project'+sep+'inundation') 40 home = environ['INUNDATIONHOME'] #Sandpit's parent dir 41 # home = expanduser('~') 40 42 41 43 #Derive subdirectories and filenames … … 50 52 outputdir = home+sep+scenario_dir_name+sep+'output'+sep 51 53 tidedir = home+sep+scenario_dir_name+sep+'tide_data'+sep 52 54 comparereportdir = comparehome+sep+'documentation'+sep+'experimentation'+'boundary_ANUGA_MOST' 53 55 print'bound', boundarydir 54 56 55 57 #gauge_filename = gaugedir + 'onslow_gauges.xya' 56 58 #for MOST 57 #gauge_filename = gaugedir + 'onslow_gauges1.xya'58 59 gauge_filename = gaugedir + 'gauge_location_onslow.csv' 60 gauges50 = gaugedir + '50_gauges.xya' 61 community_filename = gaugedir + 'CHINS_v2.csv' 62 community_scenario = gaugedir + 'community_onslow.csv' 59 63 buildings_filename = gaugedir + 'onslow_res.csv' 60 64 community_filename = gaugedir + 'CHINS_v2.csv' 61 65 community_scenario = gaugedir + 'community_onslow.csv' 66 67 62 68 gaugetimeseries = gaugedir + 'onslow' 63 69 … … 180 186 181 187 poly_region = [m0, m1, m2, m3, m4, m5] 188 189 from coordinate_transforms.redfearn import redfearn 190 # boundary up to 50 m contour 191 lat1_50 = degminsec2decimal_degrees(-21,30,0) 192 lat2_50 = degminsec2decimal_degrees(-21,25,0) 193 lat3_50 = degminsec2decimal_degrees(-21,12,0) 194 lat4_50 = degminsec2decimal_degrees(-21,0,0) 195 lon1_50 = degminsec2decimal_degrees(114,40,0) 196 lon2_50 = degminsec2decimal_degrees(114,49,0) 197 lon3_50 = degminsec2decimal_degrees(115,1,0) 198 lon4_50 = degminsec2decimal_degrees(115,9,0) 199 z, easting, northing = redfearn(lat1_50, lon1_50) 200 p0_50 = [easting, northing] 201 z, easting, northing = redfearn(lat2_50, lon2_50) 202 p1_50 = [easting, northing] 203 z, easting, northing= redfearn(lat3_50, lon3_50) 204 p2_50 = [easting, northing] 205 z, easting, northing = redfearn(lat4_50, lon4_50) 206 p3_50 = [easting, northing] 207 208 d4_50 = [285000, 7585000] 209 d6_50 = [330000, 7605000] 210 bounding_poly50 = [p0_50, p1_50, p2_50, p3_50, d6_50, d5, d4_50] 211 212 # boundary up to 25 m contour 213 lat1_25 = degminsec2decimal_degrees(-21,30,0) 214 lat2_25 = degminsec2decimal_degrees(-21,24,0) 215 lat3_25 = degminsec2decimal_degrees(-21,3,0) 216 lon1_25 = degminsec2decimal_degrees(114,46,0) 217 lon2_25 = degminsec2decimal_degrees(114,53,0) 218 lon3_25 = degminsec2decimal_degrees(115,9,0) 219 z, easting, northing = redfearn(lat1_25, lon1_25) 220 p0_25 = [easting, northing] 221 z, easting, northing = redfearn(lat2_25, lon2_25) 222 p1_25 = [easting, northing] 223 z, easting, northing = redfearn(lat3_25, lon3_25) 224 p2_25 = [easting, northing] 225 bounding_poly25 = [p0_25, p1_25, p2_25, d6, d5, d4] -
production/onslow_2006/report/anuga.tex
r3098 r3136 30 30 event. Throughout the modelling process, a number of issues became 31 31 evident. A standard assumption is that zero AHD is approximately 32 the same as Mean Sea Level (MSL). Implementing valuesfor32 the same as Mean Sea Level (MSL). Implementing the values provided for 33 33 Highest Astronomical Tide (HAT) and Lowest Astronomical Tide (LAT) 34 34 would inundate some regions of Onslow before the simulation is even begun. … … 37 37 is enough evidence suggesting different high tide marks (with respect 38 38 to a set datum) within 39 a localised region. As an aside, a current GA contract underwayis39 a localised region. As an aside, a current GA contract is 40 40 extracting information from LANDSAT imagery to reconstruct the 41 41 tidal variations for various WA locations. Future modelling of -
production/onslow_2006/report/onslow_2006_report.tex
r3094 r3136 55 55 \input{tsunami_scenario} 56 56 57 \section{Inundation Model}57 \section{Inundation model} 58 58 \label{sec:anuga} 59 59 \input{anuga} … … 106 106 107 107 108 \section{ Damagemodelling}109 \label{sec: damage}108 \section{Impact modelling} 109 \label{sec:impact} 110 110 \input{damage} 111 \input{MSL_damage}112 \clearpage113 114 \input{LAT_damage}115 \clearpage116 117 \input{HAT_damage}118 \clearpage119 120 111 121 112 \section{Summary} -
production/onslow_2006/report/summary.tex
r3064 r3136 4 4 bathymetry and tsunami source uncertainties. 5 5 Further investigation of the point at which 6 ANUGA can use the deep water model output is also required. 6 ANUGA can use the deep water model output is also required as well 7 as incorporating appropriate friction coefficients.s
Note: See TracChangeset
for help on using the changeset viewer.