Changeset 4049
- Timestamp:
- Dec 4, 2006, 11:16:58 AM (18 years ago)
- Location:
- anuga_work/production/dampier_2006
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/dampier_2006/build_dampier.py
r3940 r4049 113 113 G_off13 = Geospatial_data(file_name = project.offshore_dir_name13 + '.xya') 114 114 G_off14 = Geospatial_data(file_name = project.offshore_dir_name14 + '.xya') 115 ''' 115 116 116 117 117 … … 125 125 G_offshore_old = Geospatial_data(file_name = project.offshore_dir_name_old + '.pts') 126 126 127 ''' 127 128 128 print 'G_offshore_data_old_nw', 129 129 G_nw_name = project.topographies_dir + 'nw_old_data' … … 145 145 print' max and min of array 0',max(G_e[:,0]),min(G_e[:,0]) 146 146 print' max and min of array 1',max(G_e[:,1]),min(G_e[:,1]) 147 ''' 147 148 148 149 149 print 'G_offshore_data_mid_e'#, G_offshore_old_nw.get_data_points() … … 188 188 G_clipped.export_points_file(project.combined_time_dir_final_name + '.pts') 189 189 G_clipped.export_points_file(project.combined_time_dir_final_name + '.xya') 190 191 190 192 ''' 191 193 #------------------------------------------------------------------------- … … 199 201 print 'minlat=project.north_boundary, maxlat=project.south_boundary',project.north_boundary, project.south_boundary 200 202 print 'minlon= project.west_boundary, maxlon=project.east_boundary',project.west_boundary, project.east_boundary 201 print ' maxlon=project.east',project.east202 203 203 204 #import sys; sys.exit() 204 205 205 if access(project.boundaries_time_dir,F_OK) == 0:206 mkdir (project.boundaries_time_dir)206 #if access(project.boundaries_dir,F_OK) == 0: 207 # mkdir (project.boundaries_dir) 207 208 208 209 from caching import cache 209 210 cache(urs2sww, 210 211 (boundaries_in_dir_name, 211 project.boundaries_ time_dir_name),212 project.boundaries_dir_name1), 212 213 {'verbose': True, 213 #'minlat': project.south_boundary,214 #'maxlat': project.north_boundary,215 #'minlon': project.west_boundary,216 #'maxlon': project.east_boundary,214 'minlat': project.south_boundary, 215 'maxlat': project.north_boundary, 216 'minlon': project.west_boundary, 217 'maxlon': project.east_boundary, 217 218 # 'minlat': project.south, 218 219 # 'maxlat': project.north, 219 220 # 'minlon': project.west, 220 221 # 'maxlon': project.east, 221 'mint': 0, 'maxt': 35000,222 'mint': 0, 'maxt': 40000, 222 223 # 'origin': domain.geo_reference.get_origin(), 223 224 'mean_stage': project.tide, … … 227 228 ) 228 229 # dependencies = source_dir + project.boundary_basename + '.sww') 229 ''' 230 231 232 233 234 235 236 237 230 231 232 233 234 235 236 237 238 -
anuga_work/production/dampier_2006/project.py
r4045 r4049 65 65 combined_final_name ='dampier_combined_elevation_final' 66 66 67 #gauge_name = 'dampier_gauges.csv' 68 gauge_name = 'dampier_gauges_up2.csv' 67 gauge_name = 'dampier_gauges_up2.csv' 69 68 70 69 #Derive subdirectories and filenames … … 98 97 99 98 gauge_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'gauges'+sep 100 gauge_filename = gauge_dir + gauge_name99 gauge_filename = gauge_dir + 'dampier_gauges_up2.csv' 101 100 102 101 gauges_dir_name = gauges_dir + gauge_name -
anuga_work/production/dampier_2006/run_dampier.py
r3998 r4049 29 29 from anuga.shallow_water import File_boundary 30 30 from anuga.shallow_water import Reflective_boundary 31 from Numeric import allclose 31 32 32 33 from anuga.pmesh.mesh_interface import create_mesh_from_regions … … 84 85 print 'start create mesh from regions' 85 86 interior_regions = [#[project.karratha_polygon, 25000], 86 #[project.poly_coast, 10000],87 #[project.poly_pipeline, 2000],88 #[project.poly_facility, 500]]89 [project.poly_interior, 1000]]87 [project.poly_coast, 10000], 88 [project.poly_pipeline, 2000], 89 [project.poly_facility, 500]] 90 # [project.poly_interior, 1000]] 90 91 91 from anuga.utilities.polygon import plot_polygons92 figname = project.output_run_time_dir + 'poly_pic'93 plot_polygons([interior_regions,94 project.bounding_polygon],95 figname,96 verbose = True)97 # if access(project.meshes_time_dir,F_OK) == 0:98 # mkdir(project.meshes_time_dir)99 if access(project.meshes_dir,F_OK) == 0:100 mkdir(project.meshes_dir)101 print 'start create mesh from regions'102 interior_regions = [#[project.karratha_polygon, 25000],103 # [project.cipma_polygon, 1000],104 # [project.poly_pipeline, 5000],105 # [project.poly_facility, 500]]106 [project.poly_interior, 1000]]107 # meshes_dir_name = project.meshes_dir_name + '.msh'108 92 109 93 create_mesh_from_regions(project.bounding_polygon, … … 147 131 from caching import cache 148 132 if myid == 0: 149 cache( urs2sww,133 cache(ferret2sww, 150 134 (boundaries_in_dir_name, 151 135 # boundaries_time_dir_name), … … 160 144 # 'minlon': project.west, 161 145 # 'maxlon': project.east, 162 'mint': 0, 'maxt': 35 000,146 'mint': 0, 'maxt': 35100, 163 147 'origin': domain.geo_reference.get_origin(), 164 148 'mean_stage': project.tide, … … 173 157 # Setup initial conditions 174 158 #------------------------------------------------------------------------- 175 print 'Setup initial conditions' 176 177 domain.set_quantity('stage', tide) 178 domain.set_quantity('friction', 0.0) 179 #combined_time_dir_name = project.topographies_dir+build_time+project.combined_name 180 print 'Start Set quantity' 181 182 domain.set_quantity('elevation', 159 if myid == 0: 160 161 print 'Setup initial conditions' 162 163 domain.set_quantity('stage', tide) 164 domain.set_quantity('friction', 0.0) 165 #combined_time_dir_name = project.topographies_dir+build_time+project.combined_name 166 print 'Start Set quantity' 167 168 169 domain.set_quantity('elevation', 183 170 filename = project.topographies_dir + build_time + sep + project.combined_final_name + '.pts', 184 171 use_cache = True, 185 172 verbose = True, 186 173 alpha = 0.1) 187 #domain.set_quantity('elevation', -50)188 print 'Finished Set quantity'189 174 #domain.set_quantity('elevation', -50) 175 print 'Finished Set quantity' 176 barrier() 190 177 191 178 … … 247 234 248 235 for t in domain.evolve(yieldstep = 120, finaltime = 9000): 249 #for t in domain.evolve(yieldstep = 120, finaltime = 130):250 236 domain.write_time() 251 237 domain.write_boundary_statistics(tags = 'ocean') 252 print 'time: ',time.time()238 # print 'time: ',time.time() 253 239 254 240 if allclose(t, 6000): 255 241 domain.set_quantity('xmomentum', 0) 256 242 domain.set_quantity('ymomentum', 0) 257 import sys; sys.exit()243 #import sys; sys.exit() 258 244 259 245 for t in domain.evolve(yieldstep = 60, finaltime = 28800
Note: See TracChangeset
for help on using the changeset viewer.