Changeset 3626
- Timestamp:
- Sep 19, 2006, 6:13:05 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
r3615 r3626 7 7 from os import sep 8 8 9 time_dir = '20060 706_235246' #MSL9 time_dir = '20060919_050831' #MSL 10 10 directory = project.outputdir 11 11 name = directory + time_dir + sep + 'source' … … 13 13 #print 'Which variable do you want to export?' 14 14 #which_var = int(raw_input('Stage = 0, Absolute Momentum = 1, Depth = 2, Speed = 3 ' )) 15 which_var = 2 15 which_var = 4 # for Hamish/Alex to compare 16 #which_var = 2 # for Ingo/Neil to make maps 16 17 17 18 if which_var == 0: # Stage -
anuga_work/production/hobart_2006/project.py
r3615 r3626 13 13 14 14 # data provided by Tas SES and checked by NM&I 15 onshore_name = 'hobart_onshore' 16 offshore_name = 'hobart_offshore_points' 15 onshore_name = 'hob3_topo' 16 offshore_name_tas1 = 'derwent_2m' 17 offshore_name_tas2 = 'derwent_5m' 18 offshore_name_tas3 = 'south_east_tas' 19 offshore_name_tas4 = 'hobart_1m' 20 21 # AHO data and checked by NM&I 22 offshore_name1 = 'xy100003760' 23 offshore_name2 = 'xy100003761' 24 offshore_name3 = 'xy100003762' 25 offshore_name4 = 'xy100003907' 26 offshore_name5 = 'xy100003908' 27 offshore_name6 = 'xy100003909' 28 offshore_name7 = 'xy100003910' 29 offshore_name8 = 'xy100003932' 30 offshore_name9 = 'xy100003933' 31 offshore_name10 = 'xy100003934' 32 offshore_name11 = 'xy100003935' 33 offshore_name12 = 'xy100003936' 34 offshore_name13 = 'xy100003964' 35 offshore_name14 = 'xy100014250' 36 offshore_name15 = 'xy100014253' 37 offshore_name16 = 'xy100016142' 17 38 18 39 # developed by NM&I 19 coast_name = ' hobart_coast'40 coast_name = 'coastline_points' 20 41 21 42 boundary_basename = 'SU-AU_clip' … … 62 83 63 84 meshname = outputtimedir + 'mesh_' + basename 64 coarsedemname = datadir + coarsename65 85 66 86 onshore_dem_name = datadir + onshore_name 67 offshore_dem_name_local = datadir + offshore_name_local 68 offshore_dem_name_aho = datadir + offshore_name_fairsheets 87 offshore_dem_name_local1 = datadir + offshore_name_tas1 88 offshore_dem_name_local2 = datadir + offshore_name_tas2 89 offshore_dem_name_local3 = datadir + offshore_name_tas3 90 offshore_dem_name_local4 = datadir + offshore_name_tas4 91 offshore_dem_name_aho1 = datadir + offshore_name1 92 offshore_dem_name_aho2 = datadir + offshore_name2 93 offshore_dem_name_aho3 = datadir + offshore_name3 94 offshore_dem_name_aho4 = datadir + offshore_name4 95 offshore_dem_name_aho5 = datadir + offshore_name5 96 offshore_dem_name_aho6 = datadir + offshore_name6 97 offshore_dem_name_aho7 = datadir + offshore_name7 98 offshore_dem_name_aho8 = datadir + offshore_name8 99 offshore_dem_name_aho9 = datadir + offshore_name9 100 offshore_dem_name_aho10 = datadir + offshore_name10 101 offshore_dem_name_aho11 = datadir + offshore_name11 102 offshore_dem_name_aho12 = datadir + offshore_name12 103 offshore_dem_name_aho13 = datadir + offshore_name13 104 offshore_dem_name_aho14 = datadir + offshore_name14 105 offshore_dem_name_aho15 = datadir + offshore_name15 106 offshore_dem_name_aho16 = datadir + offshore_name16 69 107 coast_dem_name = datadir + coast_name 70 108 combined_dem_name = datadir + 'hobart_combined_elevation' … … 74 112 # region to export 75 113 e_min_area = 500000 76 e_max_area = 5 4000077 n_min_area = 52 20000114 e_max_area = 580000 115 n_min_area = 5200000 78 116 n_max_area = 5275000 79 117 80 from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees, 81 convert_points_from_latlon_to_utm 118 from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees, convert_points_from_latlon_to_utm 82 119 83 120 # bounding box … … 96 133 refzone = zone 97 134 98 #Interior region - Hobart city area + glenorchy, Kingston135 #Interior region - Hobart city area + Glenorchy, Kingston 99 136 i0 = [517000, 5267000] 100 137 i1 = [517000, 5255000] … … 105 142 i6 = [530000, 5244000] 106 143 i7 = [530000, 5250000] 107 i 7= [534000, 5254000]108 i 7= [520000, 5270000]144 i8 = [534000, 5254000] 145 i9 = [520000, 5270000] 109 146 110 poly_hobart = [i0, i1, i2, i3, i4, i5 ]147 poly_hobart = [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9] 111 148 112 149 # Tasman Peninsula -
anuga_work/production/hobart_2006/run_hobart.py
r3615 r3626 21 21 22 22 # Related major packages 23 from anuga. pyvolution.shallow_water import Domain, Reflective_boundary, \23 from anuga.shallow_water import Domain, Reflective_boundary, \ 24 24 Dirichlet_boundary, Time_boundary, File_boundary 25 from anuga.pyvolution.data_manager import convert_dem_from_ascii2netcdf, dem2pts 26 from anuga.pyvolution.combine_pts import combine_rectangular_points_files 27 from anuga.pyvolution.pmesh2domain import pmesh_to_domain_instance 25 from anuga.shallow_water.data_manager import convert_dem_from_ascii2netcdf, dem2pts 28 26 from anuga.geospatial_data.geospatial_data import * 29 from anuga. pyvolution.util import Screen_Catcher27 from anuga.abstract_2d_finite_volumes.util import Screen_Catcher 30 28 31 29 # Application specific imports … … 41 39 mkdir (project.outputtimedir) 42 40 copy (project.codedirname, project.outputtimedir + project.codename) 43 copy (project.codedir + 'run_ onslow.py', project.outputtimedir + 'run_onslow.py')41 copy (project.codedir + 'run_hobart.py', project.outputtimedir + 'run_hobart.py') 44 42 print'output dir', project.outputtimedir 45 43 … … 59 57 # 60 58 # Convert ASC 2 DEM 2 PTS using source data and store result in source data 61 # Do for coarse and fine data62 # Fine pts file to be clipped to area of interest63 59 #------------------------------------------------------------------------------- 64 60 … … 70 66 copied_files = False 71 67 72 # files to be used73 files_used = [onshore_dem_name, offshore_points, coast_points,]74 75 68 # creates DEM from asc data 76 69 convert_dem_from_ascii2netcdf(onshore_dem_name, use_cache=True, verbose=True) … … 79 72 dem2pts(onshore_dem_name, use_cache=True, verbose=True) 80 73 81 print'create G1' 82 G1 = Geospatial_data(file_name = project.offshore_dem_name_local + '.xya') 83 print'create G2' 84 G2 = Geospatial_data(file_name = project.offshore_dem_name_aho + '.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 91 print'export G' 74 print 'local offshore data sets' 75 G1 = Geospatial_data(file_name = project.offshore_dem_name_local1 + '.xya') 76 #G2 = Geospatial_data(file_name = project.offshore_dem_name_local2 + '.xya') 77 G3 = Geospatial_data(file_name = project.offshore_dem_name_local3 + '.xya') 78 G4 = Geospatial_data(file_name = project.offshore_dem_name_local4 + '.xya') 79 print 'aho offshore data sets' 80 G5 = Geospatial_data(file_name = project.offshore_dem_name_aho1 + '.xya') 81 G6 = Geospatial_data(file_name = project.offshore_dem_name_aho2 + '.xya') 82 G7 = Geospatial_data(file_name = project.offshore_dem_name_aho3 + '.xya') 83 G8 = Geospatial_data(file_name = project.offshore_dem_name_aho4 + '.xya') 84 G9 = Geospatial_data(file_name = project.offshore_dem_name_aho5 + '.xya') 85 G10 = Geospatial_data(file_name = project.offshore_dem_name_aho6 + '.xya') 86 G11 = Geospatial_data(file_name = project.offshore_dem_name_aho7 + '.xya') 87 G12 = Geospatial_data(file_name = project.offshore_dem_name_aho8 + '.xya') 88 G13 = Geospatial_data(file_name = project.offshore_dem_name_aho9 + '.xya') 89 G14 = Geospatial_data(file_name = project.offshore_dem_name_aho10 + '.xya') 90 G15 = Geospatial_data(file_name = project.offshore_dem_name_aho11 + '.xya') 91 G16 = Geospatial_data(file_name = project.offshore_dem_name_aho12 + '.xya') 92 G17 = Geospatial_data(file_name = project.offshore_dem_name_aho13 + '.xya') 93 G18 = Geospatial_data(file_name = project.offshore_dem_name_aho14 + '.xya') 94 G19 = Geospatial_data(file_name = project.offshore_dem_name_aho15 + '.xya') 95 G20 = Geospatial_data(file_name = project.offshore_dem_name_aho16 + '.xya') 96 print 'local onshore dem' 97 G21 = Geospatial_data(file_name = project.onshore_dem_name + '.pts') 98 print 'coast' 99 G22 = Geospatial_data(file_name = project.coast_dem_name + '.xya') 100 print 'adding data sets' 101 G = G3+G4+G5+G6+G7+G8+G9+G10+G11+G12+G13+G14+G15+G16+G17+G18+G19+G20+G21+G22 92 102 G.export_points_file(project.combined_dem_name + '.pts') 93 103 … … 101 111 102 112 # use 75 for onshore components (12.5m DEM) 103 island_res = 10000104 hobart_res = 10000105 peninsula r_res = 10000113 island_res = 35000 114 hobart_res = 35000 115 peninsula_res = 35000 106 116 interior_regions = [[project.poly_hobart, hobart_res], 107 117 [project.poly_tasman_peninsula, peninsula_res], … … 115 125 {'boundary_tags': {'bottom': [0], 'right': [1], 116 126 'top': [2], 'left': [3]}, 117 'maximum_triangle_area': 100000,127 'maximum_triangle_area': 250000, 118 128 'filename': meshname, 119 129 'interior_regions': interior_regions}, … … 124 134 # Setup computational domain 125 135 #------------------------------------------------------------------------------- 126 127 domain = pmesh_to_domain_instance(meshname, Domain, 128 use_cache = False, 129 verbose = True) 136 domain = Domain(meshname, use_cache = False, verbose = True) 130 137 131 138 print 'Number of triangles = ', len(domain) … … 161 168 #------------------------------------------------------------------------------- 162 169 print 'start ferret2sww' 163 from anuga. pyvolution.data_manager import ferret2sww170 from anuga.shallow_water.data_manager import ferret2sww 164 171 ''' 165 172 south = project.south … … 198 205 199 206 #Bf = File_boundary(source_dir + project.boundary_basename + '.sww', 200 domain, verbose = True)207 # domain, verbose = True) 201 208 Br = Reflective_boundary(domain) 202 209 Bd = Dirichlet_boundary([tide,0,0])
Note: See TracChangeset
for help on using the changeset viewer.