Ignore:
Timestamp:
Sep 25, 2008, 1:34:14 PM (16 years ago)
Author:
kristy
Message:

Correlating with Janes updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/perth/run_perth_250m.py

    r5782 r5785  
    1 """Script for running tsunami inundation scenario for Perth, WA, Australia.
     1"""Script for running a tsunami inundation scenario for Perth, WA, Australia.
    22
    33The scenario is defined by a triangular mesh created from project_250m.polygon,
    4 the elevation data is combiled into a pts file through build_perth.py
    5 and a simulated tsunami is generated through an sts file from build_boundary.py
    6 
    7 Input: sts file (build_boundary.py for resepective event)
     4the elevation data is compiled into a pts file through build_perth.py
     5and a simulated tsunami is generated through an sts file from build_boundary.py.
     6
     7Input: sts file (build_boundary.py for respective event)
    88       pts file (build_perth.py)
    9        information from project_250m file
     9       information from project file
    1010Outputs: sww file stored in project_250m.output_run_time_dir
    1111The export_results_all.py and get_timeseries.py is reliant
     
    4848   
    4949# Application specific imports
    50 import project_250m  # Definition of file names and polygons
     50import project  # Definition of file names and polygons
    5151numprocs = 1
    5252myid = 0
     
    9090    N = len(urs_bounding_polygon)-1
    9191
    92     #boundary tags refer to project_250m.landward 4 points equals 5 segments start at N
     92    # boundary tags refer to project_250m.landward 4 points equals 5 segments start at N
    9393    boundary_tags={'back': [N+1,N+2,N+3], 'side': [N,N+4], 'ocean': range(N)}
    9494
    95    
    9695    #--------------------------------------------------------------------------
    9796    # Create the triangular mesh based on overall clipping polygon with a tagged
     
    10099    #--------------------------------------------------------------------------
    101100
    102     #IMPORTANT don't cache create_mesh_from_region and Domain(mesh....) as it
     101    # IMPORTANT don't cache create_mesh_from_region and Domain(mesh....) as it
    103102    # causes problems with the ability to cache set quantity which takes alot of times
    104103       
     
    132131    print 'Setup initial conditions'
    133132
    134     #following sets the stage/water to be offcoast only
     133    # sets the initial stage in the offcoast region only
    135134    IC = Polygon_function( [(project_250m.poly_mainland, 0)], default = kwargs['tide'],
    136135                             geo_reference = domain.geo_reference)
     
    161160    domain.set_name(kwargs['scenario_name'])
    162161    domain.set_datadir(kwargs['output_dir'])
    163     domain.set_default_order(2) # Apply second order scheme
    164     domain.set_minimum_storable_height(0.01) # Don't store anything less than 1cm
     162    domain.set_default_order(2)                 # Apply second order scheme
     163    domain.set_minimum_storable_height(0.01)    # Don't store anything less than 1cm
    165164    domain.set_store_vertices_uniquely(False)
    166165    domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum'])
     
    206205        domain.write_boundary_statistics(tags = 'ocean')
    207206
     207    # these outputs should be checked with the resultant inundation map
    208208    x, y = domain.get_maximum_inundation_location()
    209209    q = domain.get_maximum_inundation_elevation()
    210 
    211210    print 'Maximum runup observed at (%.2f, %.2f) with elevation %.2f' %(x,y,q)
    212211
    213     print 'That took %.2f seconds' %(time.time()-t0)
     212    print 'Simulation took %.2f seconds' %(time.time()-t0)
    214213
    215214    #kwargs 'completed' must be added to write the final parameters to file
     
    232231    kwargs['alpha'] = project_250m.alpha
    233232    kwargs['friction']=project_250m.friction
    234        
    235 
     233     
    236234    run_model(**kwargs)
    237235     
Note: See TracChangeset for help on using the changeset viewer.