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

Last change on this file since 7816 was 7816, checked in by hudson, 14 years ago

buildings demo added

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