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 | Parameters differ from example to make the code run faster, and so the data is stored and found in the correct places |
---|
5 | """ |
---|
6 | |
---|
7 | import anuga |
---|
8 | from anuga.abstract_2d_finite_volumes.util import add_directories |
---|
9 | import os |
---|
10 | |
---|
11 | |
---|
12 | home2 = os.getenv('INUNDATIONHOME') |
---|
13 | |
---|
14 | scenariodir2 = add_directories(home2, ["data", "mem_time_test", "parallel", "cairns"]) |
---|
15 | |
---|
16 | h = 'CAIRNS.msh' |
---|
17 | file_pathh = os.path.join(scenariodir2, h) |
---|
18 | store ='store.txt' |
---|
19 | file_path_store = os.path.join(scenariodir2, store) |
---|
20 | #------------------------------------------------------------------------------ |
---|
21 | # Define scenario as either slide or fixed_wave. Choose one. |
---|
22 | #------------------------------------------------------------------------------ |
---|
23 | scenario = 'fixed_wave' # Huge wave applied at the boundary |
---|
24 | #scenario = 'slide' # Slide wave form applied inside the domain |
---|
25 | |
---|
26 | #------------------------------------------------------------------------------ |
---|
27 | # Filenames |
---|
28 | #------------------------------------------------------------------------------ |
---|
29 | meshname = os.path.join(scenariodir2, 'cairns.msh') |
---|
30 | |
---|
31 | # Filename for locations where timeseries are to be produced |
---|
32 | gauge_filename = os.path.join(scenariodir2, 'gauges.csv') |
---|
33 | |
---|
34 | #------------------------------------------------------------------------------ |
---|
35 | # Domain definitions |
---|
36 | #------------------------------------------------------------------------------ |
---|
37 | # bounding polygon for study area |
---|
38 | bounding_polygon = anuga.read_polygon(os.path.join(scenariodir2, 'extent.csv')) |
---|
39 | |
---|
40 | A = anuga.polygon_area(bounding_polygon) / 1000000.0 |
---|
41 | print 'Area of bounding polygon = %.2f km^2' % A |
---|
42 | |
---|
43 | #------------------------------------------------------------------------------ |
---|
44 | # Interior region definitions |
---|
45 | #------------------------------------------------------------------------------ |
---|
46 | # Read interior polygons |
---|
47 | poly_cairns = anuga.read_polygon(os.path.join(scenariodir2, 'cairns.csv')) |
---|
48 | poly_island0 = anuga.read_polygon(os.path.join(scenariodir2, 'islands.csv')) |
---|
49 | poly_island1 = anuga.read_polygon(os.path.join(scenariodir2, 'islands1.csv')) |
---|
50 | poly_island2 = anuga.read_polygon(os.path.join(scenariodir2, 'islands2.csv')) |
---|
51 | poly_island3 = anuga.read_polygon(os.path.join(scenariodir2, 'islands3.csv')) |
---|
52 | poly_shallow = anuga.read_polygon(os.path.join(scenariodir2, 'shallow.csv')) |
---|
53 | |
---|
54 | # Optionally plot points making up these polygons |
---|
55 | #plot_polygons([bounding_polygon, poly_cairns, poly_island0, poly_island1, |
---|
56 | # poly_island2, poly_island3, poly_shallow], |
---|
57 | # style='boundingpoly', verbose=False) |
---|
58 | |
---|
59 | # Define resolutions (max area per triangle) for each polygon |
---|
60 | # Make these numbers larger to reduce the number of triangles in the model, |
---|
61 | # and hence speed up the simulation |
---|
62 | default_res = 10000000 # Background resolution |
---|
63 | islands_res = 100000 |
---|
64 | cairns_res = 100000 |
---|
65 | shallow_res = 500000 |
---|
66 | |
---|
67 | # Define list of interior regions with associated resolutions |
---|
68 | interior_regions = [[poly_cairns, cairns_res], |
---|
69 | [poly_island0, islands_res], |
---|
70 | [poly_island1, islands_res], |
---|
71 | [poly_island2, islands_res], |
---|
72 | [poly_island3, islands_res], |
---|
73 | [poly_shallow, shallow_res]] |
---|
74 | |
---|
75 | #------------------------------------------------------------------------------ |
---|
76 | # Data for exporting ascii grid |
---|
77 | #------------------------------------------------------------------------------ |
---|
78 | eastingmin = 363000 |
---|
79 | eastingmax = 418000 |
---|
80 | northingmin = 8026600 |
---|
81 | northingmax = 8145700 |
---|
82 | |
---|
83 | #------------------------------------------------------------------------------ |
---|
84 | # Data for landslide |
---|
85 | #------------------------------------------------------------------------------ |
---|
86 | slide_origin = [451871, 8128376] # Assume to be on continental shelf |
---|
87 | slide_depth = 500. |
---|
88 | |
---|
89 | |
---|