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

Last change on this file since 7064 was 7064, checked in by rwilson, 11 years ago

Fiddling with layout of user guide.

File size: 2.9 KB
Line 
1"""Common filenames and locations for topographic data, meshes and outputs."""
2
3from anuga.utilities.polygon import read_polygon, plot_polygons, \
4                                    polygon_area, is_inside_polygon
5
6#------------------------------------------------------------------------------
7# Define scenario as either slide or fixed_wave.
8#------------------------------------------------------------------------------
9scenario = 'fixed_wave'
10#scenario = 'slide'
11
12#------------------------------------------------------------------------------
13# Filenames
14#------------------------------------------------------------------------------
15demname = 'cairns'
16meshname = demname + '.msh'
17
18# Filename for locations where timeseries are to be produced
19gauge_filename = 'gauges.csv'
20
21#------------------------------------------------------------------------------
22# Domain definitions
23#------------------------------------------------------------------------------
24# bounding polygon for study area
25bounding_polygon = read_polygon('extent.csv')
26
27A = polygon_area(bounding_polygon) / 1000000.0
28print 'Area of bounding polygon = %.2f km^2' % A
29
30#------------------------------------------------------------------------------
31# Interior region definitions
32#------------------------------------------------------------------------------
33# Read interior polygons
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
41# Optionally plot points making up these polygons
42#plot_polygons([bounding_polygon, poly_cairns, poly_island0, poly_island1,
43#               poly_island2, poly_island3, poly_shallow],
44#               style='boundingpoly', verbose=False)
45
46# Define resolutions (max area per triangle) for each polygon
47default_res = 10000000    # Background resolution
48islands_res = 100000
49cairns_res = 100000
50shallow_res = 500000
51
52# Define list of interior regions with associated resolutions
53interior_regions = [[poly_cairns,  cairns_res],
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#------------------------------------------------------------------------------
63eastingmin = 363000
64eastingmax = 418000
65northingmin = 8026600
66northingmax = 8145700
67
68#------------------------------------------------------------------------------
69# Data for landslide
70#------------------------------------------------------------------------------
71slide_origin = [451871, 8128376]   # Assume to be on continental shelf
72slide_depth = 500.
Note: See TracBrowser for help on using the repository browser.