Changeset 4290
- Timestamp:
- Mar 2, 2007, 2:06:16 PM (18 years ago)
- Location:
- anuga_work/production/broome_2006
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/broome_2006/build_broome.py
r4153 r4290 51 51 # Fine pts file to be clipped to area of interest 52 52 #------------------------------------------------------------------------------- 53 print"project.bounding_polygon",project.bounding_polygon54 53 print"project.combined_dir_name",project.combined_dir_name 55 54 … … 57 56 onshore_in_dir_name = project.onshore_in_dir_name 58 57 coast_in_dir_name = project.coast_in_dir_name 59 island_in_dir_name = project.island_in_dir_name 60 island_in_dir_name1 = project.island_in_dir_name1 61 island_in_dir_name2 = project.island_in_dir_name2 62 island_in_dir_name3 = project.island_in_dir_name3 58 #island_in_dir_name = project.island_in_dir_name 63 59 offshore_in_dir_name = project.offshore_in_dir_name 64 offshore1_in_dir_name = project.offshore1_in_dir_name 60 offshore_in_dir_name1 = project.offshore_in_dir_name1 61 offshore_in_dir_name2 = project.offshore_in_dir_name2 65 62 66 63 onshore_dir_name = project.onshore_dir_name 67 64 coast_dir_name = project.coast_dir_name 68 island_dir_name = project.island_dir_name 69 island_dir_name1 = project.island_dir_name1 70 island_dir_name2 = project.island_dir_name2 71 island_dir_name3 = project.island_dir_name3 65 #island_dir_name = project.island_dir_name 72 66 offshore_dir_name = project.offshore_dir_name 67 offshore_dir_name1 = project.offshore_dir_name1 68 offshore_dir_name2 = project.offshore_dir_name2 73 69 74 70 # creates DEM from asc data 75 71 print "creates DEMs from asc data" 76 72 convert_dem_from_ascii2netcdf(onshore_in_dir_name, basename_out=onshore_dir_name, use_cache=True, verbose=True) 77 convert_dem_from_ascii2netcdf(island_in_dir_name, basename_out=island_dir_name, use_cache=True, verbose=True) 78 convert_dem_from_ascii2netcdf(island_in_dir_name1, basename_out=island_dir_name1, use_cache=True, verbose=True) 79 convert_dem_from_ascii2netcdf(island_in_dir_name2, basename_out=island_dir_name2, use_cache=True, verbose=True) 80 convert_dem_from_ascii2netcdf(island_in_dir_name3, basename_out=island_dir_name3, use_cache=True, verbose=True) 73 convert_dem_from_ascii2netcdf(offshore_in_dir_name1, basename_out=offshore_dir_name1, use_cache=True, verbose=True) 74 convert_dem_from_ascii2netcdf(offshore_in_dir_name2, basename_out=offshore_dir_name2, use_cache=True, verbose=True) 81 75 82 76 #creates pts file for onshore DEM … … 87 81 88 82 #creates pts file for island DEM 89 dem2pts(island_dir_name, use_cache=True, verbose=True) 90 dem2pts(island_dir_name1, use_cache=True, verbose=True) 91 dem2pts(island_dir_name2, use_cache=True, verbose=True) 92 dem2pts(island_dir_name3, use_cache=True, verbose=True) 83 dem2pts(offshore_in_dir_name1, use_cache=True, verbose=True) 84 dem2pts(offshore_in_dir_name2, use_cache=True, verbose=True) 93 85 94 86 print'create Geospatial data1 objects from topographies' 95 87 G1 = Geospatial_data(file_name = onshore_dir_name + '.pts') 96 print'create Geospatial data2 objects from topographies' 97 G2 = Geospatial_data(file_name = coast_in_dir_name + '.xya') 98 print'create Geospatial data3 objects from topographies' 99 G3 = Geospatial_data(file_name = island_dir_name + '.pts') 100 print'create Geospatial data4 objects from topographies' 101 G4 = Geospatial_data(file_name = island_dir_name1 + '.pts') 102 print'create Geospatial data5 objects from topographies' 103 G5 = Geospatial_data(file_name = island_dir_name2 + '.pts') 104 print'create Geospatial data6 objects from topographies' 105 G6 = Geospatial_data(file_name = island_dir_name3 + '.pts') 106 print'create Geospatial data7 objects from topographies' 107 G_off = Geospatial_data(file_name = offshore_in_dir_name + '.xya') 108 print'create Geospatial data8 objects from topographies' 109 G_off1 = Geospatial_data(file_name = offshore1_in_dir_name + '.xya') 88 print'create Geospatial data2 objects from coast' 89 G2 = Geospatial_data(file_name = coast_in_dir_name + '.txt') 90 #print'create Geospatial data3 objects from island' 91 #G3 = Geospatial_data(file_name = island_dir_name + '.pts') 92 print'create Geospatial data3 objects from offshore' 93 G_off = Geospatial_data(file_name = offshore_in_dir_name + '.txt') 94 print'create Geospatial data4 objects from offshore1' 95 G_off1 = Geospatial_data(file_name = offshore_in_dir_name1 + '.pts') 96 print'create Geospatial data4 objects from offshore2' 97 G_off2 = Geospatial_data(file_name = offshore_in_dir_name2 + '.pts') 110 98 111 99 print'add all geospatial objects' 112 G = G1 + G2 + G 3 + G4 + G5 + G6 + G_off + G_off1100 G = G1 + G2 + G_off + G_off1 + G_off2 113 101 114 102 print'clip combined geospatial object by bounding polygon' … … 117 105 #print'shape of clipped data', G_clipped.get_data_points().shape 118 106 107 print'split' 108 G_main, G_small = G_clipped.split(.10) 109 119 110 print'export combined DEM file' 120 111 if access(project.topographies_dir,F_OK) == 0: 121 112 mkdir (project.topographies_dir) 122 113 G_clipped.export_points_file(project.combined_dir_name + '.txt') 114 G_small.export_points_file(project.combined_small_dir_name + '.txt') 123 115 #G_clipped.export_points_file(project.combined_dir_name + '.xya') 116 124 117 125 118 ''' -
anuga_work/production/broome_2006/project.py
r4228 r4290 36 36 37 37 # onshore data provided by WA DLI 38 onshore_name = ' dted2_z51' # original38 onshore_name = 'Broome_topography_DLI' # original 39 39 40 40 #island … … 42 42 43 43 # offshore 44 coast_name = 'coastline' 45 offshore_name1 = 'XY100011610' 46 offshore_name2 = 'XY100011611' 47 offshore_name3 = 'XY100011613' 48 offshore_name4 = 'XY100011614' 49 offshore_name5 = 'XY100011616' 50 offshore_name6 = 'XY100011617' 51 offshore_name7 = 'XY100011618' 52 offshore_name8 = 'XY100011621' 53 offshore_name9 = 'XY100011623' 54 offshore_name10 = 'XY100011745' 55 offshore_name11 = 'XY100011746' 56 offshore_name12 = 'XY100017530' 57 offshore_name13 = 'XY100017532' 58 offshore_name14 = 'XY100017538' 59 offshore_name15 = 'XY100017540' 60 offshore_name16 = 'XYBR66' 61 offshore_name17 = 'XYBR70' 62 offshore_name18 = 'XYBR80' 63 offshore_name19 = 'XYBR88' 64 offshore_name20 = 'XYBR93' 65 offshore_name21 = 'XYBR0110' 66 offshore_name22 = 'XYWADPI' 44 coast_name = 'Broome_coastline' 45 46 offshore_name = 'Broome_Bathymetry' 47 offshore_name1 = 'inferred_north' 48 offshore_name2 = 'inferred_south' 67 49 68 50 #final topo name 69 combined_name =' perth_combined_elevation'70 combined_small er_name = 'perth_combined_elevation_smaller'51 combined_name ='broome_combined_elevation' 52 combined_small_name = 'broome_combined_elevation_small' 71 53 72 73 topographies_in_dir = home+sep+state+sep+scenario+sep+'elevation_final'+sep+'points'+sep 54 topographies_in_dir = home+sep+state+sep+scenario+sep+'elevation_final'+sep+'points'+sep+'Feb07'+sep 74 55 topographies_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'topographies'+sep 75 56 topographies_time_dir = topographies_dir+build_time+sep … … 77 58 #input topo file location 78 59 onshore_in_dir_name = topographies_in_dir + onshore_name 79 island_in_dir_name = topographies_in_dir + island_name 80 island_in_dir_name1 = topographies_in_dir + island_name1 81 island_in_dir_name2 = topographies_in_dir + island_name2 82 island_in_dir_name3 = topographies_in_dir + island_name3 60 #island_in_dir_name = topographies_in_dir + island_name 83 61 84 62 coast_in_dir_name = topographies_in_dir + coast_name 63 85 64 offshore_in_dir_name = topographies_in_dir + offshore_name 86 offshore1_in_dir_name = topographies_in_dir + offshore1_name 65 offshore_in_dir_name1 = topographies_in_dir + offshore_name1 66 offshore_in_dir_name2 = topographies_in_dir + offshore_name2 87 67 88 68 onshore_dir_name = topographies_dir + onshore_name 89 island_dir_name = topographies_dir + island_name 90 island_dir_name1 = topographies_dir + island_name1 91 island_dir_name2 = topographies_dir + island_name2 92 island_dir_name3 = topographies_dir + island_name3 69 70 #island_dir_name = topographies_dir + island_name 93 71 94 72 coast_dir_name = topographies_dir + coast_name 73 95 74 offshore_dir_name = topographies_dir + offshore_name 75 offshore_dir_name1 = topographies_dir + offshore_name1 76 offshore_dir_name2 = topographies_dir + offshore_name2 96 77 97 78 #final topo files 98 79 combined_dir_name = topographies_dir + combined_name 99 combined_time_dir_name = topographies_time_dir + combined_name 100 combined_smaller_name_dir = topographies_dir + combined_smaller_name 101 #combined_time_dir_final_name = topographies_time_dir + combined_final_name 80 combined_small_name_dir = topographies_dir + combined_small_name 102 81 103 82 meshes_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'meshes'+sep … … 140 119 141 120 poly_all = read_polygon(polygons_dir+'extent.csv') 142 res_poly_all = 100000121 res_poly_all = 500000 143 122 144 123 ############################### … … 146 125 ############################### 147 126 148 poly_1 = read_polygon(polygons_dir+' Broome_Local_Polygon_update.csv')149 res_1 = 20000127 poly_1 = read_polygon(polygons_dir+'broome_north_coast.csv') 128 res_1 = 50000 150 129 151 poly_2 = read_polygon(polygons_dir+' Broome_Close2_update.csv')152 res_2 = 1000130 poly_2 = read_polygon(polygons_dir+'broome_south_coast.csv') 131 res_2 = 50000 153 132 154 poly_3 = read_polygon(polygons_dir+'Broome_Coast_update2.csv') 155 res_3 = 1000 133 poly_3 = read_polygon(polygons_dir+'Broome_town_pts.csv') 134 res_3 = 10000 135 136 poly_4 = read_polygon(polygons_dir+'Broome_inner_town_pts.csv') 137 res_4 = 1000 156 138 #assert zone == refzone 157 139 158 140 interior_regions = [[poly_1,res_1],[poly_2,res_2] 159 ,[poly_3,res_3] ]141 ,[poly_3,res_3],[poly_4,res_4]] 160 142 161 143 trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all)
Note: See TracChangeset
for help on using the changeset viewer.