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 | """ |
---|
4 | |
---|
5 | import anuga |
---|
6 | |
---|
7 | |
---|
8 | #------------------------------------------------------------------------------ |
---|
9 | # Runtime parameters |
---|
10 | #------------------------------------------------------------------------------ |
---|
11 | cache = False |
---|
12 | verbose = True |
---|
13 | |
---|
14 | #------------------------------------------------------------------------------ |
---|
15 | # Define scenario as either slide or fixed_wave. Choose one. |
---|
16 | #------------------------------------------------------------------------------ |
---|
17 | scenario = 'fixed_wave' # Huge wave applied at the boundary |
---|
18 | #scenario = 'slide' # Slide wave form applied inside the domain |
---|
19 | |
---|
20 | #------------------------------------------------------------------------------ |
---|
21 | # Filenames |
---|
22 | #------------------------------------------------------------------------------ |
---|
23 | name_stem = 'cairns' |
---|
24 | meshname = name_stem + '.msh' |
---|
25 | |
---|
26 | # Filename for locations where timeseries are to be produced |
---|
27 | gauge_filename = 'gauges.csv' |
---|
28 | |
---|
29 | #------------------------------------------------------------------------------ |
---|
30 | # Domain definitions |
---|
31 | #------------------------------------------------------------------------------ |
---|
32 | # bounding polygon for study area |
---|
33 | bounding_polygon = anuga.read_polygon('extent.csv') |
---|
34 | |
---|
35 | A = anuga.polygon_area(bounding_polygon) / 1000000.0 |
---|
36 | print 'Area of bounding polygon = %.2f km^2' % A |
---|
37 | |
---|
38 | #------------------------------------------------------------------------------ |
---|
39 | # Interior region definitions |
---|
40 | #------------------------------------------------------------------------------ |
---|
41 | # Read interior polygons |
---|
42 | poly_cairns = anuga.read_polygon('cairns.csv') |
---|
43 | poly_island0 = anuga.read_polygon('islands.csv') |
---|
44 | poly_island1 = anuga.read_polygon('islands1.csv') |
---|
45 | poly_island2 = anuga.read_polygon('islands2.csv') |
---|
46 | poly_island3 = anuga.read_polygon('islands3.csv') |
---|
47 | poly_shallow = anuga.read_polygon('shallow.csv') |
---|
48 | |
---|
49 | # Optionally plot points making up these polygons |
---|
50 | #plot_polygons([bounding_polygon, poly_cairns, poly_island0, poly_island1, |
---|
51 | # poly_island2, poly_island3, poly_shallow], |
---|
52 | # style='boundingpoly', verbose=False) |
---|
53 | |
---|
54 | # Define resolutions (max area per triangle) for each polygon |
---|
55 | # Make these numbers larger to reduce the number of triangles in the model, |
---|
56 | # and hence speed up the simulation |
---|
57 | |
---|
58 | # bigger base_scale == less triangles |
---|
59 | just_fitting = False |
---|
60 | #base_scale = 25000 # 635763 # 112sec fit |
---|
61 | #base_scale = 50000 # 321403 # 69sec fit |
---|
62 | base_scale = 100000 # 162170 triangles # 45sec fit |
---|
63 | #base_scale = 400000 # 42093 |
---|
64 | default_res = 100 * base_scale # Background resolution |
---|
65 | islands_res = base_scale |
---|
66 | cairns_res = base_scale |
---|
67 | shallow_res = 5 * base_scale |
---|
68 | |
---|
69 | # Define list of interior regions with associated resolutions |
---|
70 | interior_regions = [[poly_cairns, cairns_res], |
---|
71 | [poly_island0, islands_res], |
---|
72 | [poly_island1, islands_res], |
---|
73 | [poly_island2, islands_res], |
---|
74 | [poly_island3, islands_res], |
---|
75 | [poly_shallow, shallow_res]] |
---|
76 | |
---|
77 | #------------------------------------------------------------------------------ |
---|
78 | # Data for exporting ascii grid |
---|
79 | #------------------------------------------------------------------------------ |
---|
80 | eastingmin = 363000 |
---|
81 | eastingmax = 418000 |
---|
82 | northingmin = 8026600 |
---|
83 | northingmax = 8145700 |
---|
84 | |
---|
85 | #------------------------------------------------------------------------------ |
---|
86 | # Data for landslide |
---|
87 | #------------------------------------------------------------------------------ |
---|
88 | slide_origin = [451871, 8128376] # Assume to be on continental shelf |
---|
89 | slide_depth = 500. |
---|
90 | |
---|
91 | |
---|
92 | #------------------------------------------------------------------------------ |
---|
93 | # Data for Tides |
---|
94 | #------------------------------------------------------------------------------ |
---|
95 | tide = 0.0 |
---|