Changeset 4616


Ignore:
Timestamp:
Jul 9, 2007, 3:24:23 PM (17 years ago)
Author:
ole
Message:

Shark bay work

Location:
anuga_work/production/shark_bay_2007
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/shark_bay_2007/build_shark_bay.py

    r4577 r4616  
    114114print 'project.boundary_name', project.boundary_name
    115115
    116 urs_ungridded2sww(project.boundary_name, verbose=True);
    117                   #verbose=True, mint=5000, maxt=35000, zscale=1)
     116urs_ungridded2sww(project.boundary_name, verbose=True,
     117                  mint=0, maxt=40000, zscale=1)
    118118
    119119
  • anuga_work/production/shark_bay_2007/project.py

    r4601 r4616  
    3131run_time = time+'_run'
    3232
    33 #tide = -3.9
    34 tide = 0.0
    35 #tide = 3.6
     33#tide = 0.0 # MSL
     34tide = 0.85 # HAT average between Denham and Canarvon
    3635
    3736#Maybe will try to make project a class to allow these parameters to be passed in.
    3837alpha = 0.1
    3938friction=0.01
    40 finaltime=25000
    41 starttime=3600
     39finaltime=40000
     40starttime=6000 # Action starts at 9000
    4241setup='final'
    4342#setup='trial'
    4443source='shark_bay'
    4544
    46 boundary_event = 'july2006'
    47 #boundary_event = '10000'
     45#boundary_event = 'july2006'
     46boundary_event = '10000'
    4847
    4948if setup =='trial':
     
    5958if setup =='final':
    6059    print'final'
    61     res_factor=1.1
     60    res_factor=1.0
    6261    time_thinning=4
    6362    yieldstep=60
    6463
    6564
     65
    6666dir_comment='_'+setup+'_'+str(tide)+'_'+str(source)+'_'+\
    67              str(user)+'_'+boundary_event
     67             str(user)+'_'+boundary_event+'_'+'tide'+str(tide)+'_coastpolys'
     68
     69#dir_comment='_'+setup+'_'+str(tide)+'_'+str(source)+'_'+\
     70#             str(user)+'_'+boundary_event
    6871
    6972# elevation data filenames
     
    160163                 
    161164
     165
     166#FIXME (Ole): It is bad to read in polygons in project.py. If a file does not exist
     167#project.py cannot be imported
     168
    162169# Bounding polygon
    163170bounding_polygon = read_polygon(join(polygons_dir, 'boundary_extent_small.csv'))
    164 res_bounding_polygon = 350000*res_factor
     171res_bounding_polygon = 500000*res_factor
    165172
    166173#Interior regions
    167 poly_inundated_area = read_polygon(join(polygons_dir, 'inundated_area.csv'))
    168 res_inundated_area = 10*res_factor
    169 
    170 poly_tsunami_approach_area = read_polygon(join(polygons_dir, 'tsunami_approach_area.csv'))
    171 res_tsunami_approach_area = 50*res_factor
    172 
    173 poly_bay_area = read_polygon(join(polygons_dir, 'bay_area.csv'))                                   
    174 res_bay_area = 1000*res_factor
    175 
    176 poly_map_area = read_polygon(join(polygons_dir, 'map_area.csv'))                                   
    177 res_map_area = 5000*res_factor
    178 
    179 poly_model_area = read_polygon(join(polygons_dir, 'model_area.csv'))                                   
    180 res_model_area = 200000*res_factor                                   
    181 
    182 poly_exclusion_area1 = read_polygon(join(polygons_dir, 'exclusion_area1.csv'))
    183 res_exclusion_area1 = 2000000*res_factor
    184 
    185 interior_regions = [[poly_inundated_area, res_inundated_area],
    186                     [poly_tsunami_approach_area, res_tsunami_approach_area],
    187                     [poly_bay_area, res_bay_area],                   
    188                     [poly_map_area, res_map_area]]
     174interior_regions_and_resolutions = {
     175    'study_area': 300000,
     176    'bernier_dorre_islands': 250000,
     177    'map_area': 10000,
     178    'bay_area': 4000,
     179    'south_bank_buffer': 2000,
     180    'south_coast_polygon_1': 1000,
     181    'south_coast_polygon_2': 1000,
     182    'north_bay_coastline': 1000,
     183    'tsunami_approach_area': 50,
     184    'inundated_area': 10,
     185    'exclusion_1': 10000000,
     186    'exclusion_2': 10000000,
     187    'exclusion_3': 10000000}
     188
     189
     190#poly_exclusion_area1 = read_polygon(join(polygons_dir, 'exclusion_area1.csv'))
     191#res_exclusion_area1 = 2000000*res_factor
     192#
     193#interior_regions = [[poly_inundated_area, res_inundated_area],
     194#                    [poly_tsunami_approach_area, res_tsunami_approach_area],
     195#                    [poly_bay_area, res_bay_area],                   
     196#                    [poly_map_area, res_map_area]]
    189197                    #[poly_model_area, res_model_area],
    190198                    #[poly_exclusion_area1, res_exclusion_area1]]                                       
     
    204212
    205213
     214
     215# Read filenames etc (FIXME: move this to new file: read_structures)
     216
     217interior_regions = [] # Consider using dictionary for mesh interface.
     218for area_name in interior_regions_and_resolutions.keys():
     219    file_name = join(polygons_dir, area_name + '.csv')
     220   
     221    print 'Reading polygon from', file_name
     222    polygon = read_polygon(file_name)
     223    base_resolution = interior_regions_and_resolutions[area_name]
     224   
     225    interior_regions.append([polygon, base_resolution*res_factor])
     226
     227
     228
    206229trigs_min = number_mesh_triangles(interior_regions,
    207230                                  bounding_polygon,
  • anuga_work/production/shark_bay_2007/run_shark_bay.py

    r4601 r4616  
    9393    #IMPORTANT don't cache create_mesh_from_region and Domain(mesh....) as it
    9494    # causes problems with the ability to cache set quantity which takes alot of times
     95
     96    # FIXME (Ole): Move to build_shark_bay.py
    9597    if myid == 0:
    9698   
     
    125127    if myid == 0:
    126128
    127         if project.tide == 0.0:
    128             print 'Tide is MSL'
    129             IC = 0.0
    130         else:   
    131             print 'Create onshore polygon'
    132             from polygon import Polygon_function
    133             #following sets the stage/water to be offcoast only
    134             IC = Polygon_function([(project.onshore_polygon, -1.0)],
    135                                   default = tide,
    136                                   geo_reference = domain.geo_reference)
     129        IC = project.tide
     130        #if project.tide == 0.0:
     131        #    print 'Tide is MSL'
     132        #    IC = 0.0
     133        #else:   
     134        #    print 'Create onshore polygon'
     135        #    from polygon import Polygon_function
     136        #    #following sets the stage/water to be offcoast only
     137        #    IC = Polygon_function([(project.onshore_polygon, -1.0)],
     138        #                          default = tide,
     139        #                          geo_reference = domain.geo_reference)
    137140           
    138141
     
    214217    # Reset stage in study area
    215218    print 'Reset initial condition in study area'
    216     domain.set_quantity('stage', 0.0,
     219    domain.set_quantity('stage', project.tide,
    217220                        polygon=project.poly_tsunami_approach_area)
    218221   
Note: See TracChangeset for help on using the changeset viewer.