Changeset 5404
- Timestamp:
- Jun 13, 2008, 3:50:07 PM (15 years ago)
- Location:
- anuga_work/development/boxingday08
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/boxingday08/combine_good_data.py
r5393 r5404 1 1 from anuga.geospatial_data.geospatial_data import * 2 from anuga.utilities.numerical_tools import ensure_numeric 2 3 import project 3 4 from os.path import exists … … 72 73 73 74 dir='data' 74 print 'Converting .xy afiles to .csv format'75 print 'Converting .xyz files to .csv format' 75 76 for filename in filenames: 76 77 if not exists(dir+sep+filename+'.csv'): 77 78 xyz2csv(dir+sep+filename) 78 79 else: 79 print dir+sep+filename+'.csv already exists ensure the .xy achanged has not changed'80 print dir+sep+filename+'.csv already exists ensure the .xyz changed has not changed' 80 81 81 82 print 'Clipping .csv files' … … 87 88 88 89 print 'Creating geospatial data' 89 if exists(project.good_combined_dir_name +'.pts'): 90 print project.good_combined_dir_name +'.pts'+' already exists ensure the input .csv files have not changed' 91 else: 92 G0 = Geospatial_data(file_name=dir+sep+filenames[0]+'.csv') 93 print 'read bay' 94 G1=Geospatial_data(file_name=dir+sep+filenames[1]+'_clipped.csv') 95 print 'read andaman' 96 G1.clip(project.bounding_polygon) 97 print 'clipped andaman' 98 G1.clip_outside(G0) 90 G0 = Geospatial_data(file_name=dir+sep+filenames[0]+'.csv') 91 print 'read bay' 92 G1 = Geospatial_data(file_name=dir+sep+filenames[1]+'_clipped.csv') 93 print 'read andaman' 94 bounding_polygon=ensure_numeric(project.bounding_polygon) 95 G1 = G1.clip(bounding_polygon) 96 print 'clipped andaman' 97 bay_grid_poly=ensure_numeric(project.bay_grid_poly) 98 G1 = G1.clip_outside(bay_grid_poly) 99 99 100 G = G0 + G1 100 # Plot the two point sets 101 data_3s=G1.get_data_points() 102 data_1s=G0.get_data_points() 101 103 102 print 'Creating .pts file' 103 G.export_points_file(project.good_combined_dir_name +'.pts') 104 from pylab import * 105 hold(True) 106 plot(data_3s[:,0],data_3s[:,1],'r.') 107 #plot(data_1s[:,0],data_1s[:,1],'b.') 108 #plot(bounding_polygon[:,0],bounding_polygon[:,1],'k-') 109 show() 110 111 112 G = G0 + G1 113 114 print 'Creating .pts file' 115 G.export_points_file(project.good_combined_dir_name +'.pts') -
anuga_work/development/boxingday08/export_results.py
r5393 r5404 4 4 from anuga.shallow_water.data_manager import sww2dem 5 5 from os import sep 6 import project 6 7 7 8 #name='good_simulation/good_simulation_polylinefriction20080529_115703' … … 36 37 quantity = quantityname, 37 38 cellsize = 20, 38 easting_min = 417348,39 easting_max = 425656,40 northing_min = 870565,41 northing_max = 877008,39 easting_min = project.bay_west, 40 easting_max = project.bay_east, 41 northing_min = project.bay_south, 42 northing_max = project.bay_borth, 42 43 reduction = max, 43 44 verbose = True, -
anuga_work/development/boxingday08/mesh_polygons/20m.csv
r5247 r5404 1 419517.9812,889806.50432 422812.9129,886474.96233 1 422520.03,882374.603 4 2 422666.4714,879262.7231 … … 7 5 424423.7683,869194.8766 8 6 424057.6648,865607.0622 9 423691.5613,862824.675510 7 424643.4304,859310.0817 11 427425.8171,854184.632612 429036.6726,846359.01313 425961.4031,841892.550114 417467.8016,850450.376815 8 409999.2899,866851.8141 16 9 407070.4618,879299.3335 17 406411.4755,891380.749418 405972.1513,898776.040319 404214.8544,903791.6584 -
anuga_work/development/boxingday08/mesh_polygons/extent.csv
r5247 r5404 1 419336.424,810100.8452 342405.0281,711455.80263 1 274649.9152,723352.9603 4 272089.092,972393.0131 5 347633.3754,968551.7784 2 272089.092,922393.0131 6 3 427979.2022,885965.2313 7 4 427659.0993,875721.9386 8 5 429259.6138,861317.3083 9 436301.8775,840830.723 -
anuga_work/development/boxingday08/project.py
r5402 r5404 126 126 south = 5.9 127 127 128 129 bay_west = 417348.0 130 bay_east = 425656.0 131 bay_south = 870565.0 132 bay_north = 877008.0 133 134 bay_grid_poly=[[bay_west,bay_south],[bay_west,bay_north],[bay_east,bay_north],[bay_east,bay_south]] 135 128 136 check_ferret_extent=False 129 137 if check_ferret_extent: -
anuga_work/development/boxingday08/run_boxingday_most.py
r5401 r5404 112 112 #, evaluate=True 113 113 ) 114 115 114 116 115 #------------------------------------------------------------------------------ … … 197 196 198 197 print 'Available boundary tags', domain.get_boundary_tags() 199 Bf = File_boundary(project.boundary_most_out+'.sww',200 domain, time_thinning=1, use_cache=True,verbose = True)198 #Bf = File_boundary(project.boundary_most_out+'.sww', 199 # domain, time_thinning=1, use_cache=True,verbose = True) 201 200 Br = Reflective_boundary(domain) 202 201 Bd = Dirichlet_boundary([tide,0.0,0.0]) 203 202 204 domain.set_boundary({'ocean': B f,203 domain.set_boundary({'ocean': Bd, 205 204 'otherocean': Bd, 206 205 'land': Br,
Note: See TracChangeset
for help on using the changeset viewer.