Changeset 1845


Ignore:
Timestamp:
Sep 21, 2005, 2:42:41 PM (19 years ago)
Author:
ole
Message:

Comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • production/karratha_2005/run_karratha.py

    r1843 r1845  
    1 """Convert from Arcview ASCII DEMs via native netcdf dem format
    2 to native pts netcdf format for use with least_squares fits
     1"""Script for running a tsunami inundation scenario for Karratha, WA, Australia.
     2
     3Source data such as elevation and boundary data is assumed to be available in
     4directories specified by project.py
     5The output sww file is stored in project.outputdir
     6
     7The scenario is defined by a triangular mesh created from project.polygon,
     8the elevation data and boundary data obtained from a tsunami simulation done with MOST.
     9
     10Ole Nielsen, GA - 2005
    311"""
    412
     
    715
    816
    9 from pyvolution.shallow_water import Domain, Reflective_boundary, File_boundary, Dirichlet_boundary, Time_boundary, Transmissive_boundary
     17from pyvolution.shallow_water import Domain, Reflective_boundary, File_boundary,\
     18     Dirichlet_boundary, Time_boundary, Transmissive_boundary
    1019from pyvolution.data_manager import convert_dem_from_ascii2netcdf,\
    1120     dem2pts, ferret2sww
     
    3140source_dir = project.boundarydir
    3241
    33 
    34 #Data
    3542from pyvolution.data_manager import ferret2sww
    36 
    3743
    3844south = project.south
     
    4248
    4349
    44 #Mesh
     50
     51#Create Triangular Mesh
    4552from create_mesh import create_mesh
    46 
    4753m = cache(create_mesh,
    4854          project.polygon,
     
    9096
    9197
    92 #Setup IC
     98
     99#Setup Initial Conditions
    93100tide = 0
    94101domain.set_quantity('friction', 0)
     
    99106                    verbose = True)
    100107
    101 #Setup BC
    102108
     109
     110#Setup Boundary Conditions
    103111print domain.get_boundary_tags()
    104112
    105113Bf = File_boundary(project.boundary_basename + '.sww', domain, verbose = True)
    106114domain.starttime = 3000  #Obtained from MOST
    107 
    108115
    109116Br = Reflective_boundary(domain)
     
    113120                   f=lambda t: [(60<t<660)*4, 0, 0])
    114121
    115 #domain.set_boundary( {'wall': Bd, 'ocean': Bf} )
    116122domain.set_boundary( {'back': Br,'side': Bd, 'ocean': Bf} )
    117123
     
    120126
    121127#Run
    122 
    123128for t in domain.evolve(yieldstep = 60, finaltime = 40000):
    124129    domain.write_time()
Note: See TracChangeset for help on using the changeset viewer.