Changeset 6219
- Timestamp:
- Jan 20, 2009, 6:20:24 PM (16 years ago)
- Location:
- anuga_work/production/patong
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/patong/project.py
r6203 r6219 65 65 print'final' 66 66 res_factor=1 67 time_thinning= 467 time_thinning=1 68 68 #time_thinning=48 69 yieldstep= 6069 yieldstep=10 70 70 71 71 #------------------------------------------------------------------------------ … … 175 175 # Area of Interest 1 elevation from -10m to 20m 176 176 poly_aoi1 = read_polygon(polygons_dir+'aoi.csv') 177 res_aoi1 = 800*res_factor177 res_aoi1 = 200*res_factor 178 178 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 = 1000*res_factor181 res_aos1 = 2000*res_factor 182 182 183 183 # Area of Shallow water and coastal land that needs a finer res than 1000000 184 184 poly_sw = read_polygon(polygons_dir+'sw.csv') 185 res_sw = 2000*res_factor185 res_sw = 3000*res_factor 186 186 187 187 … … 191 191 building_main_south = read_polygon(polygons_dir+'building_main_south.csv') 192 192 building_saddle = read_polygon(polygons_dir+'building_saddle.csv') 193 bld_res = 50*res_factor193 bld_res = 25*res_factor 194 194 195 195 -
anuga_work/production/patong/run_patong.py
r6194 r6219 27 27 # Related major packages 28 28 from anuga.interface import create_domain_from_regions 29 from anuga.interface import Domain30 29 from anuga.interface import Dirichlet_boundary 31 from anuga.interface import File_boundary32 30 from anuga.interface import Reflective_boundary 33 31 from anuga.interface import Field_boundary 34 from anuga.interface import export_grid,create_sts_boundary32 from anuga.interface import create_sts_boundary 35 33 from anuga.interface import csv2building_polygons 36 34 37 35 from anuga.caching import cache 38 36 from anuga.shallow_water.data_manager import start_screen_catcher, copy_code_files,store_parameters 39 from anuga.fit_interpolate.benchmark_least_squares import mem_usage 40 from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon 41 from anuga.geospatial_data.geospatial_data import find_optimal_smoothing_parameter 37 from anuga.utilities.polygon import read_polygon 42 38 from polygon import Polygon_function 43 39 … … 113 109 default=project.tide, 114 110 geo_reference=domain.geo_reference) 115 domain.set_quantity('stage', IC) 116 domain.set_quantity('friction', project.friction) 111 print 'stage' 112 domain.set_quantity('stage', IC, 113 use_cache=True, 114 verbose=True) 115 print 'friction' 116 domain.set_quantity('friction', project.friction) 117 print 'elevation' 117 118 domain.set_quantity('elevation', 118 119 filename=project.combined_dir_name+'.pts', … … 125 126 building_polygons, building_heights = csv2building_polygons(project.building_polygon_file) 126 127 127 print 'Creating building polygons'128 print 'Creating %d building polygons' % len(building_polygons) 128 129 def create_polygon_function(building_polygons): 129 130 L = [] 130 for key in building_polygons: 131 for i, key in enumerate(building_polygons): 132 if i%100==0: print i 131 133 poly = building_polygons[key] 132 134 elev = building_heights[key] 133 135 L.append((poly, elev))# 134 136 135 buildings = Polygon_function(L, default=0.0) 137 buildings = Polygon_function(L, default=0.0, 138 geo_reference=domain.geo_reference) 136 139 return buildings 137 140 … … 139 142 building_polygons, 140 143 verbose=True) 141 144 145 print 'Add buildings' 142 146 domain.add_quantity('elevation', buildings) 143 147
Note: See TracChangeset
for help on using the changeset viewer.