Changeset 6219


Ignore:
Timestamp:
Jan 20, 2009, 6:20:24 PM (10 years ago)
Author:
ole
Message:

Work on Patong - finer resolution at community and more cleanup.

Location:
anuga_work/production/patong
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/patong/project.py

    r6203 r6219  
    6565    print'final'
    6666    res_factor=1
    67     time_thinning=4
     67    time_thinning=1
    6868    #time_thinning=48   
    69     yieldstep=60
     69    yieldstep=10
    7070
    7171#------------------------------------------------------------------------------
     
    175175# Area of Interest 1 elevation from -10m to 20m
    176176poly_aoi1 = read_polygon(polygons_dir+'aoi.csv')
    177 res_aoi1 = 800*res_factor
     177res_aoi1 = 200*res_factor
    178178
    179179# Area of Significance 1 elevation from -20m to a 200m buffer of the 20m contour
    180180poly_aos1 = read_polygon(polygons_dir+'aos.csv')
    181 res_aos1 = 1000*res_factor
     181res_aos1 = 2000*res_factor
    182182
    183183# Area of Shallow water and coastal land that needs a finer res than 1000000
    184184poly_sw = read_polygon(polygons_dir+'sw.csv')
    185 res_sw = 2000*res_factor
     185res_sw = 3000*res_factor
    186186
    187187
     
    191191building_main_south = read_polygon(polygons_dir+'building_main_south.csv')
    192192building_saddle = read_polygon(polygons_dir+'building_saddle.csv')
    193 bld_res = 50*res_factor
     193bld_res = 25*res_factor
    194194
    195195
  • anuga_work/production/patong/run_patong.py

    r6194 r6219  
    2727# Related major packages
    2828from anuga.interface import create_domain_from_regions
    29 from anuga.interface import Domain
    3029from anuga.interface import Dirichlet_boundary
    31 from anuga.interface import File_boundary
    3230from anuga.interface import Reflective_boundary
    3331from anuga.interface import Field_boundary
    34 from anuga.interface import export_grid, create_sts_boundary
     32from anuga.interface import create_sts_boundary
    3533from anuga.interface import csv2building_polygons
    3634
    3735from anuga.caching import cache
    3836from 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
     37from anuga.utilities.polygon import read_polygon
    4238from polygon import Polygon_function
    4339   
     
    113109                      default=project.tide,
    114110                      geo_reference=domain.geo_reference)
    115 domain.set_quantity('stage', IC)
    116 domain.set_quantity('friction', project.friction)
     111print 'stage'
     112domain.set_quantity('stage', IC,
     113                    use_cache=True,
     114                    verbose=True)
     115print 'friction'
     116domain.set_quantity('friction', project.friction)
     117print 'elevation'
    117118domain.set_quantity('elevation',
    118119                    filename=project.combined_dir_name+'.pts',
     
    125126building_polygons, building_heights = csv2building_polygons(project.building_polygon_file)
    126127
    127 print 'Creating building polygons'
     128print 'Creating %d building polygons' % len(building_polygons)
    128129def create_polygon_function(building_polygons):
    129130    L = []
    130     for key in building_polygons:
     131    for i, key in enumerate(building_polygons):
     132        if i%100==0: print i
    131133        poly = building_polygons[key]
    132134        elev = building_heights[key]
    133135        L.append((poly, elev))#
    134136
    135         buildings = Polygon_function(L, default=0.0)
     137        buildings = Polygon_function(L, default=0.0,
     138                                     geo_reference=domain.geo_reference)
    136139    return buildings
    137140
     
    139142                  building_polygons,
    140143                  verbose=True)
    141        
     144
     145print 'Add buildings'
    142146domain.add_quantity('elevation', buildings)
    143147
Note: See TracChangeset for help on using the changeset viewer.