Changeset 6225
- Timestamp:
- Jan 21, 2009, 4:57:58 PM (16 years ago)
- Location:
- anuga_work/production/patong
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/patong/project.py
r6219 r6225 60 60 print'basic' 61 61 res_factor=4 62 time_thinning= 1262 time_thinning=24 63 63 yieldstep=120 64 64 if setup =='final': 65 65 print'final' 66 66 res_factor=1 67 time_thinning= 167 time_thinning=4 68 68 #time_thinning=48 69 69 yieldstep=10 … … 74 74 # Important to distinguish each run - ensure str(user) is included! 75 75 # Note, the user is free to include as many parameters as desired 76 dir_comment='_'+setup+'_'+str(tide)+'_ poly_'+str(user)76 dir_comment='_'+setup+'_'+str(tide)+'_buildings_'+str(user) 77 77 78 78 #------------------------------------------------------------------------------ … … 171 171 # Initial bounding polygon for data clipping 172 172 poly_all = read_polygon(polygons_dir+'poly_all.csv') 173 res_poly_all = 10000 *res_factor173 res_poly_all = 100000*res_factor 174 174 175 175 # Area of Interest 1 elevation from -10m to 20m … … 179 179 # Area of Significance 1 elevation from -20m to a 200m buffer of the 20m contour 180 180 poly_aos1 = read_polygon(polygons_dir+'aos.csv') 181 res_aos1 = 2000*res_factor181 res_aos1 = 700*res_factor 182 182 183 183 # Area of Shallow water and coastal land that needs a finer res than 1000000 184 # This is a rectangle. 184 185 poly_sw = read_polygon(polygons_dir+'sw.csv') 185 res_sw = 3000*res_factor186 res_sw = 6000*res_factor 186 187 187 188 … … 191 192 building_main_south = read_polygon(polygons_dir+'building_main_south.csv') 192 193 building_saddle = read_polygon(polygons_dir+'building_saddle.csv') 194 building_area_polygons = [building_main, building_main_small, building_main_south, building_saddle] 193 195 bld_res = 25*res_factor 194 196 … … 220 222 #------------------------------------------------------------------------------ 221 223 222 #CBD extract ascii grid - coor idnates from patong_1s extent224 #CBD extract ascii grid - coordinates from patong_1s extent 223 225 xminCBD = 417445.1119 224 226 xmaxCBD = 425601.7881 -
anuga_work/production/patong/run_patong.py
r6219 r6225 116 116 domain.set_quantity('friction', project.friction) 117 117 print 'elevation' 118 domain.set_quantity('elevation', 118 domain.set_quantity('elevation', 119 119 filename=project.combined_dir_name+'.pts', 120 alpha=project.alpha, 120 121 use_cache=True, 121 verbose=True ,122 alpha=project.alpha) 122 verbose=True) 123 123 124 124 125 # Add buildings from file 125 126 print 'Reading building polygons' 126 127 building_polygons, building_heights = csv2building_polygons(project.building_polygon_file) 128 #clipping_polygons=project.building_area_polygons) 127 129 128 130 print 'Creating %d building polygons' % len(building_polygons) 129 def create_polygon_function(building_polygons ):131 def create_polygon_function(building_polygons, geo_reference=None): 130 132 L = [] 131 133 for i, key in enumerate(building_polygons): … … 133 135 poly = building_polygons[key] 134 136 elev = building_heights[key] 135 L.append((poly, elev)) #137 L.append((poly, elev)) 136 138 137 139 buildings = Polygon_function(L, default=0.0, 138 geo_reference= domain.geo_reference)140 geo_reference=geo_reference) 139 141 return buildings 140 142 141 143 buildings = cache(create_polygon_function, 142 144 building_polygons, 145 {'geo_reference': domain.geo_reference}, 143 146 verbose=True) 144 147 145 print 'Add buildings' 146 domain.add_quantity('elevation', buildings) 148 print 'Adding buildings' 149 domain.add_quantity('elevation', 150 buildings, 151 use_cache=False, # FIXME(OLE): This seems to pickup the stage IC?? 152 verbose=True) 153 147 154 148 155
Note: See TracChangeset
for help on using the changeset viewer.