Changeset 5401


Ignore:
Timestamp:
Jun 13, 2008, 10:29:14 AM (14 years ago)
Author:
ole
Message:

John reducing domain extent and coarsening of some regions.

Location:
anuga_work/development/boxingday08
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/boxingday08/run_boxingday_most.py

    r5393 r5401  
    4040# Application specific imports
    4141import project                 # Definition of file names and polygons
    42 import create_boundary
    4342
    4443#------------------------------------------------------------------------------
     
    5352
    5453timestamp = strftime('%Y%m%d_%H%M%S',localtime())
    55 basename = scenario + 'source'
     54basename = scenario[:4] + '_most'
    5655
    5756
     
    7069# resolutions (maximal area of per triangle) for each polygon
    7170#------------------------------------------------------------------------------
    72 extent_res     = 10000000.0
     71extent_res     = 1000000.0
    7372contour20m_res = 50000.0
    7473island_res     = 5000.0
    7574bay_res        = 2000.0
    76 patong_res     = 100.0
     75patong_res     = 400.0
     76
     77
    7778
    7879# make polygon that contains land that does not affect result.
    7980interior_regions = [[project.patong, patong_res],
    8081                    [project.bay, bay_res],
    81                     [project.contour20m, contour20m_res],
    82                     [project.island_north, island_res],
    83                     [project.island_south, island_res],
    84                     [project.island_south2, island_res]]
     82                    [project.contour20m, contour20m_res]]#,
     83                    #[project.island_north, island_res],
     84                    #[project.island_south, island_res],
     85                    #[project.island_south2, island_res]]
    8586
    8687#for coarse run to test gauges
    87 extent_res = 10000000.0
    88 interior_regions=None
     88#extent_res = 1000000.0 #causes inaccurate stage
     89#interior_regions=None
    8990
    9091from Numeric import arange,allclose
    91 boundary_tags={'ocean': arange(1,85).tolist(), 'otherocean': [0,89], 'land': [86, 87], 'both': [85,88]}
    92 
    93 
    94 #trigs_min = number_mesh_triangles(interior_regions, create_boundary.bounding_polygon,extent_res)
     92boundary_tags={'ocean': arange(0,41).tolist(), 'otherocean': [41,44], 'land': [42,43]}
     93
     94
     95#trigs_min = number_mesh_triangles(interior_regions, project.bounding_polygon,extent_res)
    9596#print 'Minimum number of traingles ', trigs_min
    9697
     
    102103
    103104_ = cache(create_mesh_from_regions,
    104           create_boundary.bounding_polygon,
     105          project.bounding_polygon,
    105106          {'boundary_tags': boundary_tags,
    106107           'maximum_triangle_area': extent_res,
    107108           'filename': meshname,           
    108109           'interior_regions': interior_regions},
    109           verbose = True,
    110           dependencies = ['run_boxingday_most.py']
     110          verbose = True#,
     111          #dependencies = ['run_boxingday_most.py']
    111112          #, evaluate=True
    112113          )
     
    128129print domain.statistics()
    129130
    130 domain.set_name(basename+'friction'+timestamp)
     131domain.set_name(basename+timestamp)
    131132domain.set_datadir(scenario)
    132133domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum'])
     
    197198print 'Available boundary tags', domain.get_boundary_tags()
    198199Bf = File_boundary(project.boundary_most_out+'.sww',
    199                     domain, time_thinning=1, verbose = True)
     200                    domain, time_thinning=1, use_cache=True,verbose = True)
    200201Br = Reflective_boundary(domain)
    201202Bd = Dirichlet_boundary([tide,0.0,0.0])
     
    219220# start when boundary stage first becomes non-zero.
    220221
    221 for t in domain.evolve(yieldstep = 5.0, finaltime = 18000.0,
     222for t in domain.evolve(yieldstep = 20.0, finaltime = 18000.0,
    222223                       skip_initial_step = False):
    223224    if allclose(t,10800.0):
  • anuga_work/development/boxingday08/run_boxingday_polyline.py

    r5393 r5401  
    4040# Application specific imports
    4141import project                 # Definition of file names and polygons
    42 import create_boundary
    4342
    4443
     
    5453
    5554timestamp = strftime('%Y%m%d_%H%M%S',localtime())
    56 basename = scenario + '_polyline'
     55basename = scenario[:4] + '_polyline'
    5756
    5857
     
    7170# resolutions (maximal area of per triangle) for each polygon
    7271#------------------------------------------------------------------------------
    73 extent_res     = 10000000.0
     72extent_res     = 1000000.0
    7473contour20m_res = 50000.0
    7574island_res     = 5000.0
    7675bay_res        = 2000.0
    77 patong_res     = 100.0
     76patong_res     = 400.0
    7877
    7978
     
    8281interior_regions = [[project.patong, patong_res],
    8382                    [project.bay, bay_res],
    84                     [project.contour20m, contour20m_res],
    85                     [project.island_north, island_res],
    86                     [project.island_south, island_res],
    87                     [project.island_south2, island_res]]
     83                    [project.contour20m, contour20m_res]]#,
     84                    #[project.island_north, island_res],
     85                    #[project.island_south, island_res],
     86                    #[project.island_south2, island_res]]
    8887
    8988
    9089#for coarse run to test gauges
    91 extent_res = 10000000.0
    92 interior_regions=None
     90#extent_res = 10000000.0
     91#interior_regions=None
    9392
    9493from Numeric import arange,allclose
    95 boundary_tags={'ocean': arange(1,85).tolist(), 'otherocean': [0,89], 'land': [86, 87], 'both': [85,88]}
    96 
    97 #trigs_min = number_mesh_triangles(interior_regions, create_boundary.bounding_polygon,extent_res)
     94boundary_tags={'ocean': arange(0,41).tolist(), 'otherocean': [41,44], 'land': [42,43]}
     95
     96#trigs_min = number_mesh_triangles(interior_regions, project.bounding_polygon,extent_res)
    9897#print 'Minimum number of traingles ', trigs_min
    9998
     
    105104
    106105_ = cache(create_mesh_from_regions,
    107           create_boundary.bounding_polygon,
     106          project.bounding_polygon,
    108107          {'boundary_tags': boundary_tags,
    109108           'maximum_triangle_area': extent_res,
     
    111110           'interior_regions': interior_regions},
    112111          verbose = True,
    113           dependencies = ['create_boundary.py']
     112          dependencies = ['project.py']
    114113          #, evaluate=True
    115114          )
     
    130129print domain.statistics()
    131130
    132 domain.set_name(basename+'friction'+timestamp)
     131domain.set_name(basename+timestamp)
    133132#domain.set_name(basename)
    134133domain.set_datadir(scenario)
     
    168167#------------------------------------------------------------------------------
    169168boundary_urs_in='data/boxing'
    170 boundary_urs_out=create_boundary.base_name
     169boundary_urs_out=project.base_name
    171170
    172171print 'Available boundary tags', domain.get_boundary_tags()
    173172Bf = File_boundary(boundary_urs_out+'.sts',
    174173                   domain, time_thinning=1,
    175                    use_cache=False,verbose = True,boundary_polygon=create_boundary.bounding_polygon)
     174                   use_cache=True,verbose = True,boundary_polygon=project.bounding_polygon)
    176175
    177176Br = Reflective_boundary(domain)
     
    196195# start when boundary stage first becomes non-zero.
    197196
    198 for t in domain.evolve(yieldstep = 5.0, finaltime = 18000.0,
     197for t in domain.evolve(yieldstep = 20.0, finaltime = 18000.0,
    199198                       skip_initial_step = False):
    200199    if allclose(t,10800.0):
  • anuga_work/development/boxingday08/run_boxingday_urs.py

    r5393 r5401  
    4040# Application specific imports
    4141import project                 # Definition of file names and polygons
    42 import create_boundary
    4342
    4443#------------------------------------------------------------------------------
     
    5352
    5453timestamp = strftime('%Y%m%d_%H%M%S',localtime())
    55 basename = scenario + '_urs'
     54basename = scenario[:4] + '_urs'
    5655
    5756
     
    7069# resolutions (maximal area of per triangle) for each polygon
    7170#------------------------------------------------------------------------------
    72 extent_res     = 10000000.0
     71extent_res     = 1000000.0
    7372contour20m_res = 50000.0
    7473island_res     = 5000.0
    7574bay_res        = 2000.0
    76 patong_res     = 100.0
     75patong_res     = 400.0
    7776
    7877# make polygon that contains land that does not affect result.
     
    8079interior_regions = [[project.patong, patong_res],
    8180                    [project.bay, bay_res],
    82                     [project.contour20m, contour20m_res],
    83                     [project.island_north, island_res],
    84                     [project.island_south, island_res],
    85                     [project.island_south2, island_res]]
     81                    [project.contour20m, contour20m_res]]#,
     82                    #[project.island_north, island_res],
     83                    #[project.island_south, island_res],
     84                    #[project.island_south2, island_res]]
    8685
    8786#for coarse run to test gauges
    88 extent_res = 10000000.0
    89 interior_regions=None
     87#extent_res = 10000000.0
     88#interior_regions=None
    9089
    9190from Numeric import arange,allclose
    92 print 'Beware not all boundary segments that are tagged as ocean in polyline are tagged here. missing are 79,80,81,82,83,84 which are set to other ocean'
    93 boundary_tags={'ocean': arange(1,79).tolist(), 'otherocean': [0,89,84,83,82,81,80,79], 'land': [86, 87], 'both': [85,88]}
    94 
    95 
    96 #trigs_min = number_mesh_triangles(interior_regions, create_boundary.bounding_polygon,extent_res)
     91boundary_tags={'ocean': arange(0,41).tolist(), 'otherocean': [41,44], 'land': [42,43]}
     92
     93
     94#trigs_min = number_mesh_triangles(interior_regions, project.bounding_polygon,extent_res)
    9795#print 'Minimum number of traingles ', trigs_min
    9896
     
    104102
    105103_ = cache(create_mesh_from_regions,
    106           create_boundary.bounding_polygon,
     104          project.bounding_polygon,
    107105          {'boundary_tags': boundary_tags,
    108106           'maximum_triangle_area': extent_res,
     
    110108           'interior_regions': interior_regions},
    111109          verbose = True,
    112           #dependencies = ['create_boundary.py']
     110          #dependencies = ['project.py']
    113111          dependencies = ['run_boxingday_urs.py']
    114112          #, evaluate=True
     
    131129print domain.statistics()
    132130
    133 domain.set_name(basename+'friction'+timestamp)
     131domain.set_name(basename+timestamp)
    134132#domain.set_name(basename)
    135133domain.set_datadir(scenario)
     
    208206# start when boundary stage first becomes non-zero.
    209207
    210 for t in domain.evolve(yieldstep = 5.0, finaltime = 18000.0,
     208for t in domain.evolve(yieldstep = 20.0, finaltime = 18000.0,
    211209                       skip_initial_step = False):
    212210    if allclose(t,10800.0):
Note: See TracChangeset for help on using the changeset viewer.