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

Last change on this file since 6889 was 6889, checked in by ole, 11 years ago

Made sure demos in the manual run and did some cleanup

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