source: anuga_core/documentation/user_manual/demos/cairns/project.py @ 7077

Last change on this file since 7077 was 7077, checked in by ole, 14 years ago

Updated runcairns to use add_quantity - also made slide the default event.

File size: 3.0 KB
RevLine 
[7064]1"""Common filenames and locations for topographic data, meshes and outputs."""
[3979]2
[4856]3from anuga.utilities.polygon import read_polygon, plot_polygons, \
[3979]4                                    polygon_area, is_inside_polygon
5
[6889]6#------------------------------------------------------------------------------
[7077]7# Define scenario as either slide or fixed_wave. Choose one.
[6889]8#------------------------------------------------------------------------------
[7077]9#scenario = 'fixed_wave' # Huge wave applied at the boundary
10scenario = 'slide'       # Slide wave form applied inside the domain
[7064]11
[6889]12#------------------------------------------------------------------------------
13# Filenames
14#------------------------------------------------------------------------------
[7064]15demname = 'cairns'
[6889]16meshname = demname + '.msh'
17
18# Filename for locations where timeseries are to be produced
19gauge_filename = 'gauges.csv'
[7064]20
[6889]21#------------------------------------------------------------------------------
[3979]22# Domain definitions
[6889]23#------------------------------------------------------------------------------
[3979]24# bounding polygon for study area
[4100]25bounding_polygon = read_polygon('extent.csv')
[3979]26
[7064]27A = polygon_area(bounding_polygon) / 1000000.0
[6889]28print 'Area of bounding polygon = %.2f km^2' % A
[3979]29
[6889]30#------------------------------------------------------------------------------
[4003]31# Interior region definitions
[6889]32#------------------------------------------------------------------------------
33# Read interior polygons
[4003]34poly_cairns = read_polygon('cairns.csv')
35poly_island0 = read_polygon('islands.csv')
36poly_island1 = read_polygon('islands1.csv')
37poly_island2 = read_polygon('islands2.csv')
38poly_island3 = read_polygon('islands3.csv')
39poly_shallow = read_polygon('shallow.csv')
40
[6889]41# Optionally plot points making up these polygons
[7064]42#plot_polygons([bounding_polygon, poly_cairns, poly_island0, poly_island1,
43#               poly_island2, poly_island3, poly_shallow],
44#               style='boundingpoly', verbose=False)
[4003]45
[6889]46# Define resolutions (max area per triangle) for each polygon
[7064]47default_res = 10000000    # Background resolution
[6889]48islands_res = 100000
49cairns_res = 100000
50shallow_res = 500000
51
52# Define list of interior regions with associated resolutions
[7064]53interior_regions = [[poly_cairns,  cairns_res],
[6889]54                    [poly_island0, islands_res],
55                    [poly_island1, islands_res],
56                    [poly_island2, islands_res],
57                    [poly_island3, islands_res],
58                    [poly_shallow, shallow_res]]
59
60#------------------------------------------------------------------------------
61# Data for exporting ascii grid
62#------------------------------------------------------------------------------
[4063]63eastingmin = 363000
64eastingmax = 418000
65northingmin = 8026600
66northingmax = 8145700
[3979]67
[6889]68#------------------------------------------------------------------------------
69# Data for landslide
70#------------------------------------------------------------------------------
[7064]71slide_origin = [451871, 8128376]   # Assume to be on continental shelf
[4063]72slide_depth = 500.
Note: See TracBrowser for help on using the repository browser.