Changeset 3828
- Timestamp:
- Oct 19, 2006, 5:40:26 PM (18 years ago)
- Location:
- anuga_work/production/dampier_2006
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/dampier_2006/project.py
r3808 r3828 13 13 from anuga.geospatial_data.geospatial_data import * 14 14 15 # Location and naming of scenario data 16 state = 'western_australia' 17 scenario_dir_name = 'dampier_tsunami_scenario_2006' 18 #scenario_dir_name = 'karratha_tsunami_scenario_2005' # Tmp location 19 20 basename = 'elevation50m' 21 boundary_basename = 'dampier' 22 23 24 # Data output 15 # file and system info 16 #--------------------------------- 25 17 codename = 'project.py' 26 18 … … 34 26 # INUNDATIONHOME is the inundation directory, not the data directory. 35 27 home += sep +'data' 28 #---------------------------------- 29 # Location and naming of scenario data 30 #---------------------------------- 31 state = 'western_australia' 32 scenario_name = 'dampier_tsunami' 33 scenario_datas_name = 'dampier_tsunami_scenario_2006' #name of the directory where the data is stored 34 #scenario_datas_name = 'karratha_tsunami_scenario_2005' # Tmp location 35 36 #mesh_name = 'elevation50m' 37 boundary_name = 'dampier9' 38 boundary_source = 'mag_9' 39 40 # topography file names 41 onshore_name = 'dli_no_islands' 42 coast_name = 'DTED_05_Contour' 43 islands_name = 'dted_islands' 44 offshore_name = 'XY100003902' 45 offshore_name1 = 'XY100003903' 46 offshore_name2 = 'XY100003951' 47 offshore_name3 = 'XY100006321' 48 offshore_name4 = 'XY100011756' 49 offshore_name5 = 'XY100014243' 50 offshore_name6 = 'XY100014244' 51 offshore_name7 = 'XY100021081' 52 offshore_name8 = 'XY100021082' 53 offshore_name9 = 'XY100021083' 54 offshore_name10 = 'XY100021085' 55 offshore_name11 = 'XY100021086' 56 offshore_name12 = 'XY100026309' 57 offshore_name13 = 'XY100026338' 58 offshore_name14 = 'XYDM83' 59 60 combined_name ='dampier_combined_elevation' 61 62 36 63 37 64 #Derive subdirectories and filenames 65 66 meshes_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'meshes'+sep 67 topographies_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'topographies'+sep 68 gauges_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'gauges'+sep 69 polygons_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'polygons'+sep 70 boundaries_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'boundaries'+sep+'urs'+sep+boundary_source+sep 71 #outputdir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'output'+sep 72 tide_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'tide_data'+sep 73 38 74 time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir 39 outputtimedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'output'+sep+time+sep 40 41 meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep 42 datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep 43 gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep 44 polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep 45 boundarydir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep+'urs'+sep+'test'+sep 46 outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'output'+sep 47 tidedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'tide_data'+sep 75 76 output_time_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'outputs'+sep+time+sep 77 topographies_time_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'topographies'+sep+time+sep 78 boundaries_time_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'boundaries'+sep+time+sep 79 80 48 81 49 82 #gauge_filename = gaugedir + 'gauge_location_broome.csv' 50 83 51 meshname = meshdir + basename 52 outputname = outputtimedir + basename #Used by post processing 53 boundaryname = boundarydir + boundary_basename #Used by post processing 84 onshore_dir_name = topographies_dir + onshore_name 85 coast_dir_name = topographies_dir + coast_name 86 islands_dir_name = topographies_dir + islands_name 87 offshore_dir_name = topographies_dir + offshore_name 88 offshore_dir_name1 = topographies_dir + offshore_name1 89 offshore_dir_name2 = topographies_dir + offshore_name2 90 offshore_dir_name3 = topographies_dir + offshore_name3 91 offshore_dir_name4 = topographies_dir + offshore_name4 92 offshore_dir_name5 = topographies_dir + offshore_name5 93 offshore_dir_name6 = topographies_dir + offshore_name6 94 offshore_dir_name7 = topographies_dir + offshore_name7 95 offshore_dir_name8 = topographies_dir + offshore_name8 96 offshore_dir_name9 = topographies_dir + offshore_name9 97 offshore_dir_name10 = topographies_dir + offshore_name10 98 offshore_dir_name11 = topographies_dir + offshore_name11 99 offshore_dir_name12 = topographies_dir + offshore_name12 100 offshore_dir_name13 = topographies_dir + offshore_name13 101 offshore_dir_name14 = topographies_dir + offshore_name14 102 103 combined_dir_name = topographies_dir + combined_name 104 105 mesh_dir_name = meshes_dir + scenario_name 106 output_dir_name = output_time_dir + scenario_name #Used by post processing 107 boundary_dir_name = boundaries_dir + boundary_name #Used by post processing 54 108 55 109 … … 61 115 west = degminsec2decimal_degrees(116,17,0) 62 116 east = degminsec2decimal_degrees(118,10,0) 117 118 #only used to clip boundary condition 119 north_boundary = north + 0.5 120 south_boundary = south - 0.5 121 west_boundary = west - 0.5 122 east_boundary = east + 0.5 123 63 124 64 125 p0 = [south, degminsec2decimal_degrees(116,32,0)] … … 72 133 p8 = [south, east] 73 134 74 75 135 bounding_polygon, zone =\ 76 136 convert_from_latlon_to_utm([p0, p1, p2, p3, p4, … … 94 154 assert zone == refzone 95 155 96 156 e_min_area = 474000 157 e_max_area = 480000 158 n_min_area = 7719000 159 n_max_area = 7725000 97 160 98 161 #Interior regions -
anuga_work/production/dampier_2006/run_dampier.py
r3808 r3828 51 51 from anuga.shallow_water.data_manager import urs2sww 52 52 53 urs2sww(boundary_file, verbose='true',54 minlat=project.south,55 maxlat=project.north,56 minlon=project.west,57 maxlon=project.east)58 59 import sys; sys.exit()60 Bf = File_boundary(source_dir + project.boundary_basename + '.sww',61 domain, verbose = True)62 63 Br = Reflective_boundary(domain)64 Bd = Dirichlet_boundary([tide,0,0])65 domain.set_boundary({'back': Br,66 'side': Bd,67 'ocean': Bf})68 53 69 54 70 55 # creates copy of code in output dir if dir doesn't exist 71 56 if access(project.outputtimedir,F_OK) == 0: 72 mkdir (project.outputtimedir) 57 print 'project.outputtimedir',dirname(project.outputtimedir) 58 mkdir (project.outputtimedir,0777) 73 59 copy (dirname(project.__file__) +sep+ project.__name__+'.py', 74 60 project.outputtimedir + project.__name__+'.py') … … 91 77 #[project.point_polygon, 2000]] 92 78 #[project.cipma_polygon, 20000]] 93 [project.cipma_polygon, 4000]] # Caused memory error? 94 79 [project.cipma_polygon, 40000]] # Caused memory error? 95 80 96 81 #--------------------------- 97 82 # this is check that no interior polygon is outside the bounding poly 98 83 #------------------------------ 84 85 """ 99 86 count = 0 100 87 for i in range(len(interior_regions)): … … 112 99 print 'check %s in production directory' %figname 113 100 import sys; sys.exit() 114 101 """ 115 102 #------------------------------------- 116 103 … … 156 143 #------------------------------------------------------------------------- 157 144 145 158 146 print 'Available boundary tags', domain.get_boundary_tags() 159 147 148 from anuga.shallow_water.data_manager import urs2sww 160 149 161 162 urs2sww(boundary_file, 163 minlat=project.south, 164 maxlat=project.north, 165 minlon=project.west, 166 maxlon=project.east) 150 urs2sww(boundary_file, verbose='true') 167 151 168 152 Bf = File_boundary(source_dir + project.boundary_basename + '.sww', … … 174 158 'ocean': Bf}) 175 159 176 177 160 #---------------------------------------------------------------------------- 178 161 # Evolve system through time … … 181 164 t0 = time.time() 182 165 183 for t in domain.evolve(yieldstep = 60, finaltime = 28600):166 for t in domain.evolve(yieldstep = 120, finaltime = 28800): 184 167 domain.write_time() 185 168 domain.write_boundary_statistics(tags = 'ocean')
Note: See TracChangeset
for help on using the changeset viewer.