Changeset 4045
- Timestamp:
- Nov 30, 2006, 7:03:43 PM (18 years ago)
- Location:
- anuga_work/production
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/dampier_2006/export_results.py
r4029 r4045 5 5 from os import sep 6 6 7 time_dir = '200611 16_055135_run' #7 time_dir = '20061127_055714_run' # 8 8 directory = project.output_dir 9 name = directory + time_dir + sep + project.scenario_name 9 #name = directory + time_dir + sep + project.scenario_name 10 name = directory+sep+project.scenario_name 10 11 11 12 is_parallel = True 12 if is_parallel == True: nodes = 813 if is_parallel == True: nodes = 4 13 14 print 'output dir:', name 14 15 … … 19 20 20 21 if which_var == 1: # Absolute Momentum 21 outname = name + '_momentum_i 0'22 outname = name + '_momentum_i50' 22 23 quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 23 24 24 25 if which_var == 2: # Depth 25 outname = name + '_depth _test100'26 outname = name + '_depth' 26 27 quantityname = 'stage-elevation' 27 28 … … 36 37 37 38 if is_parallel == True: 38 for i in range( 3,nodes):39 for i in range(2,nodes): 39 40 namei = name + '_P%d_%d' %(i,nodes) 40 41 outnamei = outname + '_P%d_%d' %(i,nodes) … … 42 43 sww2dem(namei, basename_out = outnamei, 43 44 quantity = quantityname, 44 timestep = 0,45 timestep = 50, 45 46 cellsize = 100, 46 47 #easting_min = project.e_min_area, -
anuga_work/production/dampier_2006/project.py
r4009 r4045 219 219 clip_poly_mid_e = read_polygon(polygons_dir+'gap_mid_e.cvs') 220 220 221 plot_polygons([bounding_polygon,poly_facility,poly_pipeline,poly_interior,poly_coast],'polys',verbose=True) 221 222 #Interior regions 222 223 karratha_south = degminsec2decimal_degrees(-20,44,0) -
anuga_work/production/pt_hedland_2006/project.py
r3788 r4045 7 7 #from anuga.utilities.polygon import read_polygon 8 8 import sys 9 from anuga.coordinate_transforms.redfearn import convert_points_from_latlon_to_utm10 9 from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees 11 10 from time import localtime, strftime … … 25 24 # offshore data from AHO fairsheets 26 25 offshore_name2 = 'pt_hedland_offshore_points_fairsheet_orig' 26 27 # reissued offshore data from PMD and NM&I Nov 2006 28 offshore_name0 = 'hydrographic_charts' 29 offshore_name1 = 'xy100003817' 30 offshore_name2 = 'xy100003819' 31 offshore_name3 = 'xy100003822' 32 offshore_name4 = 'xy100003824' 33 offshore_name5 = 'xy100003825' 34 offshore_name6 = 'xy100003826' 35 offshore_name7 = 'xy100003827' 36 offshore_name8 = 'xy100003828' 37 offshore_name9 = 'xy100003829' 38 offshore_name10 = 'xy100003830' 39 offshore_name11 = 'xy100003831' 40 offshore_name12 = 'xy100003832' 41 offshore_name13 = 'xy100003837' 42 offshore_name14 = 'xy100003838' 43 offshore_name15 = 'xy100003840' 44 offshore_name16 = 'xy100003841' 45 offshore_name17 = 'xy100003843' 46 offshore_name18 = 'xy100003845' 47 offshore_name19 = 'xy100003846' 48 offshore_name20 = 'xy100003847' 49 offshore_name21 = 'xy100003945' 50 offshore_name22 = 'xy100003946' 51 offshore_name23 = 'xy100003947' 52 offshore_name24 = 'xy100003948' 53 offshore_name25 = 'xy100004071' 54 offshore_name26 = 'xy100004072' 55 offshore_name27 = 'xy100004074' 56 offshore_name28 = 'xy100004078' 57 offshore_name29 = 'xy100004079' 58 offshore_name30 = 'xy100004080' 59 offshore_name31 = 'xy100004081' 60 offshore_name32 = 'xy100004082' 61 offshore_name33 = 'xy100004083' 62 offshore_name34 = 'xy100004084' 63 offshore_name35 = 'xy100004085' 64 offshore_name36 = 'xy100004086' 65 offshore_name37 = 'xy100004087' 66 offshore_name38 = 'xy100004088' 67 offshore_name39 = 'xy100004089' 68 offshore_name40 = 'xy100004090' 69 offshore_name41 = 'xy100011753' 70 offshore_name42 = 'xy100014967' 71 offshore_name43 = 'xy100014968' 72 offshore_name44 = 'xy100014969' 73 offshore_name45 = 'xy100021030' 74 offshore_name46 = 'xy100021031' 75 offshore_name47 = 'xy100021032' 76 offshore_name48 = 'xy100021033' 77 offshore_name49 = 'xy100021035' 78 offshore_name50 = 'xy100022767' 27 79 28 80 # coastline developed from aerial photography and 1.5m DLI contour … … 86 138 #onshore_dem_name = datadir + onshore_name_dted 87 139 onshore_dem_name = datadir + onshore_name_dli 140 offshore_dem_name0 = datadir + offshore_name0 88 141 offshore_dem_name1 = datadir + offshore_name1 89 142 offshore_dem_name2 = datadir + offshore_name2 143 offshore_dem_name3 = datadir + offshore_name3 144 offshore_dem_name4 = datadir + offshore_name4 145 offshore_dem_name5 = datadir + offshore_name5 146 offshore_dem_name6 = datadir + offshore_name6 147 offshore_dem_name7 = datadir + offshore_name7 148 offshore_dem_name8 = datadir + offshore_name8 149 offshore_dem_name9 = datadir + offshore_name9 150 offshore_dem_name10 = datadir + offshore_name10 151 offshore_dem_name11 = datadir + offshore_name11 152 offshore_dem_name12 = datadir + offshore_name12 153 offshore_dem_name13 = datadir + offshore_name13 154 offshore_dem_name14 = datadir + offshore_name14 155 offshore_dem_name15 = datadir + offshore_name15 156 offshore_dem_name16 = datadir + offshore_name16 157 offshore_dem_name17 = datadir + offshore_name17 158 offshore_dem_name18 = datadir + offshore_name18 159 offshore_dem_name19 = datadir + offshore_name19 160 offshore_dem_name20 = datadir + offshore_name20 161 offshore_dem_name21 = datadir + offshore_name21 162 offshore_dem_name22 = datadir + offshore_name22 163 offshore_dem_name23 = datadir + offshore_name23 164 offshore_dem_name24 = datadir + offshore_name24 165 offshore_dem_name25 = datadir + offshore_name25 166 offshore_dem_name26 = datadir + offshore_name26 167 offshore_dem_name27 = datadir + offshore_name27 168 offshore_dem_name28 = datadir + offshore_name28 169 offshore_dem_name29 = datadir + offshore_name29 170 offshore_dem_name30 = datadir + offshore_name30 171 offshore_dem_name31 = datadir + offshore_name31 172 offshore_dem_name32 = datadir + offshore_name32 173 offshore_dem_name33 = datadir + offshore_name33 174 offshore_dem_name34 = datadir + offshore_name34 175 offshore_dem_name35 = datadir + offshore_name35 176 offshore_dem_name36 = datadir + offshore_name36 177 offshore_dem_name37 = datadir + offshore_name37 178 offshore_dem_name38 = datadir + offshore_name38 179 offshore_dem_name39 = datadir + offshore_name39 180 offshore_dem_name40 = datadir + offshore_name40 181 offshore_dem_name41 = datadir + offshore_name41 182 offshore_dem_name42 = datadir + offshore_name42 183 offshore_dem_name43 = datadir + offshore_name43 184 offshore_dem_name44 = datadir + offshore_name44 185 offshore_dem_name45 = datadir + offshore_name45 186 offshore_dem_name46 = datadir + offshore_name46 187 offshore_dem_name47 = datadir + offshore_name47 188 offshore_dem_name48 = datadir + offshore_name48 189 offshore_dem_name49 = datadir + offshore_name49 190 offshore_dem_name50 = datadir + offshore_name50 191 90 192 coast_dem_name = datadir + coast_name 91 193 combined_dem_name = datadir + 'pt_hedland_combined_elevation' -
anuga_work/production/pt_hedland_2006/run_pt_hedland.py
r3788 r4045 6 6 7 7 The scenario is defined by a triangular mesh created from project.polygon, 8 the elevation data and a simulated submarine landslide.8 the elevation data and a tsunami generated by a subduction zone earthquake. 9 9 10 10 Ole Nielsen and Duncan Gray, GA - 2005 and Nick Bartzis, GA - 2006 … … 28 28 from anuga.geospatial_data.geospatial_data import * 29 29 import sys 30 from anuga.abstract_2d_finite_volumes.util import Screen_Catcher30 from anuga.abstract_2d_finite_volumes.util import start_screen_catcher, copy_code_files 31 31 32 32 # Application specific imports … … 38 38 #------------------------------------------------------------------------------- 39 39 40 # creates copy of code in output dir if dir doesn't exist 41 if access(project.outputtimedir,F_OK) == 0 : 42 mkdir (project.outputtimedir) 43 copy (dirname(project.__file__) +sep+ project.__name__+'.py', project.outputtimedir + project.__name__+'.py') 44 copy (__file__, project.outputtimedir + basename(__file__)) 45 print 'project.outputtimedir',project.outputtimedir 46 47 # normal screen output is stored in 48 screen_output_name = project.outputtimedir + "screen_output.txt" 49 screen_error_name = project.outputtimedir + "screen_error.txt" 50 51 # used to catch screen output to file 52 sys.stdout = Screen_Catcher(screen_output_name) 53 sys.stderr = Screen_Catcher(screen_error_name) 40 copy_code_files(project.outputtimedir,__file__,dirname(project.__file__)+sep+ project.__name__+'.py' ) 41 myid = 0 42 numprocs = 1 43 start_screen_catcher(project.outputtimedir, myid, numprocs) 44 54 45 print 'USER: ', project.user 55 46 … … 79 70 verbose=True) 80 71 81 print 'create G1' 82 G1 = Geospatial_data(file_name = project.offshore_dem_name1 + '.xya') 83 print 'create G2' 84 G2 = Geospatial_data(file_name = project.offshore_dem_name2 + '.xya') 85 print 'create G3' 86 G3 = Geospatial_data(file_name = project.onshore_dem_name + '.pts') 87 print 'create G4' 88 G4 = Geospatial_data(file_name = project.coast_dem_name + '.xya') 89 print 'add G1+G2+G3+G4' 90 G = G1 + G2 + G3 + G4 72 print 'create offshore' 73 G11= Geospatial_data(file_name = project.offshore_dem_name0 + '.xya')+\ 74 Geospatial_data(file_name = project.offshore_dem_name1 + '.xya')+\ 75 Geospatial_data(file_name = project.offshore_dem_name2 + '.xya')+\ 76 Geospatial_data(file_name = project.offshore_dem_name3 + '.xya')+\ 77 Geospatial_data(file_name = project.offshore_dem_name4 + '.xya')+\ 78 Geospatial_data(file_name = project.offshore_dem_name5 + '.xya')+\ 79 Geospatial_data(file_name = project.offshore_dem_name6 + '.xya')+\ 80 Geospatial_data(file_name = project.offshore_dem_name7 + '.xya')+\ 81 Geospatial_data(file_name = project.offshore_dem_name8 + '.xya')+\ 82 Geospatial_data(file_name = project.offshore_dem_name9 + '.xya')+\ 83 Geospatial_data(file_name = project.offshore_dem_name10 + '.xya') 84 G12= Geospatial_data(file_name = project.offshore_dem_name11 + '.xya')+\ 85 Geospatial_data(file_name = project.offshore_dem_name12 + '.xya')+\ 86 Geospatial_data(file_name = project.offshore_dem_name13 + '.xya')+\ 87 Geospatial_data(file_name = project.offshore_dem_name14 + '.xya')+\ 88 Geospatial_data(file_name = project.offshore_dem_name15 + '.xya')+\ 89 Geospatial_data(file_name = project.offshore_dem_name16 + '.xya')+\ 90 Geospatial_data(file_name = project.offshore_dem_name17 + '.xya')+\ 91 Geospatial_data(file_name = project.offshore_dem_name18 + '.xya')+\ 92 Geospatial_data(file_name = project.offshore_dem_name19 + '.xya')+\ 93 Geospatial_data(file_name = project.offshore_dem_name20 + '.xya') 94 G13= Geospatial_data(file_name = project.offshore_dem_name21 + '.xya')+\ 95 Geospatial_data(file_name = project.offshore_dem_name22 + '.xya')+\ 96 Geospatial_data(file_name = project.offshore_dem_name23 + '.xya')+\ 97 Geospatial_data(file_name = project.offshore_dem_name24 + '.xya')+\ 98 Geospatial_data(file_name = project.offshore_dem_name25 + '.xya')+\ 99 Geospatial_data(file_name = project.offshore_dem_name26 + '.xya')+\ 100 Geospatial_data(file_name = project.offshore_dem_name27 + '.xya')+\ 101 Geospatial_data(file_name = project.offshore_dem_name28 + '.xya')+\ 102 Geospatial_data(file_name = project.offshore_dem_name29 + '.xya') 103 G14= Geospatial_data(file_name = project.offshore_dem_name30 + '.xya')+\ 104 Geospatial_data(file_name = project.offshore_dem_name31 + '.xya')+\ 105 Geospatial_data(file_name = project.offshore_dem_name32 + '.xya')+\ 106 Geospatial_data(file_name = project.offshore_dem_name33 + '.xya')+\ 107 Geospatial_data(file_name = project.offshore_dem_name34 + '.xya')+\ 108 Geospatial_data(file_name = project.offshore_dem_name35 + '.xya')+\ 109 Geospatial_data(file_name = project.offshore_dem_name36 + '.xya')+\ 110 Geospatial_data(file_name = project.offshore_dem_name37 + '.xya')+\ 111 Geospatial_data(file_name = project.offshore_dem_name38 + '.xya')+\ 112 Geospatial_data(file_name = project.offshore_dem_name39 + '.xya') 113 G15= Geospatial_data(file_name = project.offshore_dem_name40 + '.xya')+\ 114 Geospatial_data(file_name = project.offshore_dem_name41 + '.xya')+\ 115 Geospatial_data(file_name = project.offshore_dem_name42 + '.xya')+\ 116 Geospatial_data(file_name = project.offshore_dem_name43 + '.xya')+\ 117 Geospatial_data(file_name = project.offshore_dem_name44 + '.xya')+\ 118 Geospatial_data(file_name = project.offshore_dem_name45 + '.xya')+\ 119 Geospatial_data(file_name = project.offshore_dem_name46 + '.xya')+\ 120 Geospatial_data(file_name = project.offshore_dem_name47 + '.xya')+\ 121 Geospatial_data(file_name = project.offshore_dem_name48 + '.xya')+\ 122 Geospatial_data(file_name = project.offshore_dem_name49 + '.xya')+\ 123 Geospatial_data(file_name = project.offshore_dem_name50 + '.xya') 124 125 print 'create onshore' 126 G2 = Geospatial_data(file_name = project.onshore_dem_name + '.pts') 127 print 'create coast' 128 G3 = Geospatial_data(file_name = project.coast_dem_name + '.xya') 129 print 'add' 130 G = G11 + G12 + G13 + G14 + G15 + G2 + G3 91 131 print 'export G' 92 132 G.export_points_file(project.combined_dem_name + '.pts') -
anuga_work/production/sydney_2006/project_slide.py
r4036 r4045 27 27 # onshore data provided by NSW LPI, Krishna merged with existing 28 28 # PMD data to make 100m DEM 29 on_offshore_name = '' 29 on_offshore_name25 = 'bathy_dem25' 30 on_offshore_name100 = 'bathyland100' 31 nsw100 = 'dem_utm' 30 32 31 33 # AHO … … 53 55 54 56 # Necessary if using point datasets, rather than grid 55 on_offshore_dem_name = datadir + on_offshore_name 57 on_offshore25_dem_name = datadir + on_offshore_name25 58 on_offshore100_dem_name = datadir + on_offshore_name100 59 nsw_dem_name = datadir + nsw100 56 60 offshore_dem_name1 = datadir + offshore_name1 57 61 combined_dem_name = datadir + 'sydney_combined_elevation' … … 72 76 ############################### 73 77 74 # broome digitized polygons 75 poly_syd1 = read_polygon(polygondir+'.csv') 76 poly_syd2 = read_polygon(polygondir+'.csv') 77 poly_syd3 = read_polygon(polygondir+'.csv') 78 # sydney digitized polygons 79 interior_regions = [] 80 area = 0. 81 coast_res = 500. 82 for i in range(1,10): 83 poly = read_polygon(polygondir+'poly'+str(i)+'.csv') 84 area += polygon_area(poly) 85 #interior_regions.append([poly,coast_res]) 86 87 poly_syd1 = read_polygon(polygondir+'local.csv') 88 local_res = 50000. 89 interior_regions.append([poly_syd1,local_res]) 78 90 79 91 print 'Area of local polygon', polygon_area(poly_syd1)/1000000.0 80 print 'Area of close polygon', polygon_area(poly_syd2)/1000000.0 81 print 'Area of coastal polygon', polygon_area(poly_syd3)/1000000.0 92 print 'Area of local polygon', area/1000000.0 82 93 83 94 ################################################################### … … 85 96 ################################################################### 86 97 98 # clipping for 25m grid for conversion 99 eastingmin25 = 324825 100 eastingmax25 = 347650 101 northingmin25 = 6231960 102 northingmax25 = 6272543 103 104 poly_25mclip = read_polygon(polygondir+'25mclip.csv') 105 106 # clipping for 100m grid for conversion 107 eastingmin100 = 315870 108 eastingmax100 = 361607 109 northingmin100 = 6227588 110 northingmax100 = 6285975 111 112 # clipping for nsw grid for conversion 113 eastingmin_nsw = 315870 114 eastingmax_nsw = 390480 115 northingmin_nsw = 6161100 116 northingmax_nsw = 6330000 117 118 poly_origsyd = [[eastingmin100,northingmin100],[eastingmax100,northingmin100],\ 119 [eastingmax100,northingmax100],[eastingmin100,northingmax100]] 120 87 121 # exporting asc grid 88 eastingmin =89 eastingmax =90 northingmin =91 northingmax =122 #eastingmin = 123 #eastingmax = 124 #northingmin = 125 #northingmax = 92 126 93 #slump_origin = [,] 127 ################################################################### 128 # Slide characteristics 129 ################################################################### 130 131 #slide_origin = [,] 132 bulli_depth = 2087.0 133 bulli_length = 16840.0 134 bulli_thickness = 424.0 135 bulli_width = 8860.0 136 bulli_density = 1.46 137 bulli_alpha = 126.0 + 90.0 138 139 shovel_depth = 968.0 140 shovel_length = 13500.0 141 shovel_thickness = 165.0 142 shovel_width = 4350.0 143 shovel_density = 1.49 144 shovel_alpha = 118.0 + 90.0 145 146 yacaaba_depth = 1119.0 147 yacaaba_length = 7050.0 148 yacaaba_thickness = 144.0 149 yacaaba_width = 3080.0 150 yacaaba_density = 1.48 151 yacaaba_alpha = 133.0 + 90.0 -
anuga_work/production/sydney_2006/run_sydney_slide.py
r4036 r4045 2 2 3 3 Source data such as elevation and boundary data is assumed to be available in 4 directories specified by project .py5 The output sww file is stored in project .outputtimedir6 7 The scenario is defined by a triangular mesh created from project .polygon,4 directories specified by project_slide.py 5 The output sww file is stored in project_slide.outputtimedir 6 7 The scenario is defined by a triangular mesh created from project_slide.polygon, 8 8 the elevation data and a tsunami wave generated by s submarine mass failure. 9 9 … … 38 38 39 39 # creates copy of code in output dir 40 copy_code_files(project .outputtimedir,__file__,dirname(project.__file__)+sep+ project.__name__+'.py' )40 copy_code_files(project_slide.outputtimedir,__file__,dirname(project_slide.__file__)+sep+ project_slide.__name__+'.py' ) 41 41 myid = 0 42 42 numprocs = 1 43 start_screen_catcher(project .outputtimedir, myid, numprocs)44 45 print 'USER: ', project .user43 start_screen_catcher(project_slide.outputtimedir, myid, numprocs) 44 45 print 'USER: ', project_slide.user 46 46 47 47 #------------------------------------------------------------------------------- … … 52 52 53 53 # filenames 54 on_offshore_dem_name = project.on_offshore_dem_name 55 meshname = project.meshname+'.msh' 54 on_offshore25_dem_name = project_slide.on_offshore25_dem_name 55 on_offshore100_dem_name = project_slide.on_offshore100_dem_name 56 nsw_dem_name = project_slide.nsw_dem_name 57 meshname = project_slide.meshname+'.msh' 56 58 57 59 # creates DEM from asc data 58 convert_dem_from_ascii2netcdf(on_offshore_dem_name, use_cache=True, verbose=True) 60 convert_dem_from_ascii2netcdf(on_offshore25_dem_name, use_cache=True, verbose=True) 61 convert_dem_from_ascii2netcdf(on_offshore100_dem_name, use_cache=True, verbose=True) 62 convert_dem_from_ascii2netcdf(nsw_dem_name, use_cache=True, verbose=True) 59 63 60 64 #creates pts file for onshore DEM 61 dem2pts(on_offshore_dem_name, use_cache=True, verbose=True) 62 65 dem2pts(on_offshore25_dem_name, 66 easting_min=project_slide.eastingmin25, 67 easting_max=project_slide.eastingmax25, 68 northing_min=project_slide.northingmin25, 69 northing_max= project_slide.northingmax25, 70 use_cache=True, verbose=True) 71 dem2pts(on_offshore100_dem_name, 72 easting_min=project_slide.eastingmin100, 73 easting_max=project_slide.eastingmax100, 74 northing_min=project_slide.northingmin100, 75 northing_max= project_slide.northingmax100, 76 use_cache=True, verbose=True) 77 dem2pts(nsw_dem_name, 78 easting_min=project_slide.eastingmin_nsw, 79 easting_max=project_slide.eastingmax_nsw, 80 northing_min=project_slide.northingmin_nsw, 81 northing_max= project_slide.northingmax_nsw, 82 use_cache=True, verbose=True) 83 84 ''' 63 85 print 'create offshore' 64 G1 = Geospatial_data(file_name = project.offshore_dem_name1 + '.xya')+\ 65 Geospatial_data(file_name = project.offshore_dem_name2 + '.xya')+\ 66 Geospatial_data(file_name = project.offshore_dem_name3 + '.xya')+\ 67 Geospatial_data(file_name = project.offshore_dem_name4 + '.xya')+\ 68 Geospatial_data(file_name = project.offshore_dem_name5 + '.xya')+\ 69 Geospatial_data(file_name = project.offshore_dem_name6 + '.xya')+\ 70 Geospatial_data(file_name = project.offshore_dem_name7 + '.xya')+\ 71 Geospatial_data(file_name = project.offshore_dem_name8 + '.xya')+\ 72 Geospatial_data(file_name = project.offshore_dem_name9 + '.xya')+\ 73 Geospatial_data(file_name = project.offshore_dem_name10 + '.xya')+\ 74 Geospatial_data(file_name = project.offshore_dem_name11 + '.xya')+\ 75 Geospatial_data(file_name = project.offshore_dem_name12 + '.xya')+\ 76 Geospatial_data(file_name = project.offshore_dem_name13 + '.xya')+\ 77 Geospatial_data(file_name = project.offshore_dem_name14 + '.xya')+\ 78 Geospatial_data(file_name = project.offshore_dem_name15 + '.xya')+\ 79 Geospatial_data(file_name = project.offshore_dem_name16 + '.xya')+\ 80 Geospatial_data(file_name = project.offshore_dem_name17 + '.xya')+\ 81 Geospatial_data(file_name = project.offshore_dem_name18 + '.xya')+\ 82 Geospatial_data(file_name = project.offshore_dem_name19 + '.xya')+\ 83 Geospatial_data(file_name = project.offshore_dem_name20 + '.xya')+\ 84 Geospatial_data(file_name = project.offshore_dem_name21 + '.xya')+\ 85 Geospatial_data(file_name = project.offshore_dem_name22 + '.xya')+\ 86 Geospatial_data(file_name = project.offshore_interp_dem_name + '.pts') 86 G1 = Geospatial_data(file_name = project_slide.offshore_dem_name1 + '.xya')+\ 87 Geospatial_data(file_name = project_slide.offshore_dem_name2 + '.xya')+\ 88 Geospatial_data(file_name = project_slide.offshore_dem_name3 + '.xya')+\ 89 Geospatial_data(file_name = project_slide.offshore_dem_name4 + '.xya')+\ 90 Geospatial_data(file_name = project_slide.offshore_dem_name5 + '.xya')+\ 91 Geospatial_data(file_name = project_slide.offshore_dem_name6 + '.xya')+\ 92 Geospatial_data(file_name = project_slide.offshore_dem_name7 + '.xya')+\ 93 Geospatial_data(file_name = project_slide.offshore_dem_name8 + '.xya')+\ 94 Geospatial_data(file_name = project_slide.offshore_dem_name9 + '.xya')+\ 95 Geospatial_data(file_name = project_slide.offshore_dem_name10 + '.xya')+\ 96 Geospatial_data(file_name = project_slide.offshore_dem_name11 + '.xya')+\ 97 Geospatial_data(file_name = project_slide.offshore_dem_name12 + '.xya')+\ 98 Geospatial_data(file_name = project_slide.offshore_dem_name13 + '.xya')+\ 99 Geospatial_data(file_name = project_slide.offshore_dem_name14 + '.xya')+\ 100 Geospatial_data(file_name = project_slide.offshore_dem_name15 + '.xya')+\ 101 Geospatial_data(file_name = project_slide.offshore_dem_name16 + '.xya')+\ 102 Geospatial_data(file_name = project_slide.offshore_dem_name17 + '.xya')+\ 103 Geospatial_data(file_name = project_slide.offshore_dem_name18 + '.xya')+\ 104 Geospatial_data(file_name = project_slide.offshore_dem_name19 + '.xya')+\ 105 Geospatial_data(file_name = project_slide.offshore_dem_name20 + '.xya')+\ 106 Geospatial_data(file_name = project_slide.offshore_dem_name21 + '.xya')+\ 107 Geospatial_data(file_name = project_slide.offshore_dem_name22 + '.xya')+\ 108 Geospatial_data(file_name = project_slide.offshore_interp_dem_name + '.pts') 109 ''' 87 110 print 'create onshore' 88 G2 = Geospatial_data(file_name = project.on_offshore_dem_name + '.pts') 111 G2 = Geospatial_data(file_name = project_slide.on_offshore25_dem_name + '.pts') 112 G3 = Geospatial_data(file_name = project_slide.on_offshore100_dem_name + '.pts') 113 G4 = Geospatial_data(file_name = project_slide.nsw_dem_name + '.pts') 89 114 print 'add' 90 G = G1 + G2 + G3 115 #G5 116 G = G2.clip(Geospatial_data(project_slide.poly_25mclip)) +\ 117 G3.clip(Geospatial_data(project_slide.poly_origsyd)) +\ 118 (G4.clip(Geospatial_data(project_slide.polyAll))).clip_outside(Geospatial_data(project_slide.poly_origsyd)) 91 119 print 'export points' 92 G.export_points_file(project .combined_dem_name + '.pts')93 G.export_points_file(project .combined_dem_name + '.xya')120 G.export_points_file(project_slide.combined_dem_name + '.pts') 121 G.export_points_file(project_slide.combined_dem_name + '.xya') 94 122 95 123 #---------------------------------------------------------------------------- 96 124 # Create the triangular mesh based on overall clipping polygon with a tagged 97 # boundary and interior regions defined in project .py along with125 # boundary and interior regions defined in project_slide.py along with 98 126 # resolutions (maximal area of per triangle) for each polygon 99 127 #------------------------------------------------------------------------------- … … 102 130 remainder_res = 500000 103 131 local_res = 25000 104 syd_res = 5000 105 coast_res = 500 106 interior_regions = [[project.poly_syd1, local_res], 107 [project.poly_syd2, syd_res], 108 [project.poly_syd3, coast_res]] 132 #interior_regions = [[project_slide.poly_syd1, local_res]] 133 #interior_regions.append(project_slide.poly_sydcoast) 109 134 110 135 from caching import cache 111 136 _ = cache(create_mesh_from_regions, 112 project .polyAll,137 project_slide.polyAll, 113 138 {'boundary_tags': {'e0': [0], 'e1': [1], 'e2': [2], 114 'e3': [3], 'e4':[4], 'e5': [5], 115 'e6': [6]}, 139 'e3': [3], 'e4':[4]}, 116 140 'maximum_triangle_area': remainder_res, 117 141 'filename': meshname, 118 'interior_regions': interior_regions},142 'interior_regions': project_slide.interior_regions}, 119 143 verbose = True, evaluate=False) 120 144 print 'created mesh' … … 129 153 print domain.statistics() 130 154 131 domain.set_name(project .basename)132 domain.set_datadir(project .outputtimedir)155 domain.set_name(project_slide.basename) 156 domain.set_datadir(project_slide.outputtimedir) 133 157 domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum']) 134 158 domain.set_minimum_storable_height(0.01) … … 142 166 domain.set_quantity('friction', 0.0) 143 167 domain.set_quantity('elevation', 144 filename = project .combined_dem_name + '.pts',168 filename = project_slide.combined_dem_name + '.pts', 145 169 use_cache = True, 146 170 verbose = True, … … 153 177 from smf import slide_tsunami 154 178 155 tsunami_source = slide_tsunami(length=30000.0, 156 depth=400.0, 157 slope=6.0, 158 thickness=176.0, 159 radius=3330, 160 dphi=0.23, 161 x0=project.slump_origin[0], 162 y0=project.slump_origin[1], 163 alpha=0.0, 179 tsunami_source = slide_tsunami(length=project_slide.bulli_length, 180 width=project_slide.bulli_width, 181 depth=project_slide.bulli_depth, 182 slope=project_slide.bulli_slope, 183 thickness=project_slide.bulli_thickness, 184 x0=project_slide.slide_origin[0], 185 y0=project_slide.slide_origin[1], 186 alpha=project_slide.bulli_alpha, 164 187 domain=domain) 165 188 … … 172 195 Bd = Dirichlet_boundary([tide,0,0]) 173 196 174 domain.set_boundary( {'e0': Bd, 'e1': Bd, 'e2': Bd, 'e3': Bd, 'e4': Bd, 175 'e5': Bd, 'e6': Bd} ) 197 domain.set_boundary( {'e0': Bd, 'e1': Bd, 'e2': Bd, 'e3': Bd, 'e4': Bd} ) 176 198 177 199 … … 184 206 for t in domain.evolve(yieldstep = 30, finaltime = 480): 185 207 domain.write_time() 186 domain.write_boundary_statistics(tags = 'e 14')208 domain.write_boundary_statistics(tags = 'e2') 187 209 stagestep = domain.get_quantity('stage') 188 210
Note: See TracChangeset
for help on using the changeset viewer.