1 | """Common filenames and locations for topographic data, meshes and outputs. |
---|
2 | """ |
---|
3 | |
---|
4 | |
---|
5 | from os import sep |
---|
6 | from os.path import expanduser |
---|
7 | import sys |
---|
8 | |
---|
9 | #Making assumptions about the location of scenario data |
---|
10 | scenario_dir_name = 'karratha_tsunami_scenario_2005' |
---|
11 | #basename = 'karratha_100m' |
---|
12 | basename = 'elevation50m' |
---|
13 | boundary_basename = 'SU-AU' |
---|
14 | |
---|
15 | |
---|
16 | if sys.platform == 'win32': |
---|
17 | home = '..\..\..\..\..' #Sandpit's parent dir |
---|
18 | else: |
---|
19 | home = expanduser('~') |
---|
20 | |
---|
21 | |
---|
22 | #Derive subdirectories and filenames |
---|
23 | meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep |
---|
24 | datadir = home+sep+scenario_dir_name+sep+'topographies'+sep |
---|
25 | outputdir = home+sep+scenario_dir_name+sep+'output'+sep |
---|
26 | boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep |
---|
27 | |
---|
28 | meshname = meshdir + basename |
---|
29 | demname = datadir + basename |
---|
30 | boundaryname = boundarydir + boundary_basename |
---|
31 | outputname = outputdir + basename #Used by post processing |
---|
32 | |
---|
33 | gauge_filename = 'all_bld_ind.csv' |
---|
34 | |
---|
35 | |
---|
36 | #Georeferencing |
---|
37 | from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees |
---|
38 | |
---|
39 | #Origin of existing dem (FIXME: Temporary measure) |
---|
40 | #mesh_origin = (50, 421544.35127423, 7677669.5257159) #250m |
---|
41 | mesh_origin = (50, 420468.31429902, 7677669.5257159) #100m |
---|
42 | |
---|
43 | |
---|
44 | #south = degminsec2decimal_degrees(-20,45,0) |
---|
45 | #north = degminsec2decimal_degrees(-20,15,0) |
---|
46 | #west = degminsec2decimal_degrees(116,30,0) |
---|
47 | #east = degminsec2decimal_degrees(117,0,0) |
---|
48 | |
---|
49 | south = degminsec2decimal_degrees(-20,55,0) |
---|
50 | north = degminsec2decimal_degrees(-20,15,0) |
---|
51 | west = degminsec2decimal_degrees(116,17,0) |
---|
52 | east = degminsec2decimal_degrees(117,10,0) |
---|
53 | |
---|
54 | p0 = [south, degminsec2decimal_degrees(116,32,0)] |
---|
55 | p1 = [south, west] |
---|
56 | p2 = [degminsec2decimal_degrees(-20,23,0), west] |
---|
57 | p3 = [north, degminsec2decimal_degrees(116,45,0)] |
---|
58 | p4 = [north, degminsec2decimal_degrees(117,0,0)] |
---|
59 | p5 = [p2[0], degminsec2decimal_degrees(117,8,0)] |
---|
60 | p6 = [degminsec2decimal_degrees(-20,30,0), east] |
---|
61 | p7 = [degminsec2decimal_degrees(-20,38,0), east] |
---|
62 | p8 = [south, east] |
---|
63 | |
---|
64 | polygon = [p0, p1, p2, p3, p4, p5, p6, p7, p8] |
---|
65 | refzone = 50 |
---|
66 | |
---|
67 | |
---|
68 | #Interior regions |
---|
69 | karratha_south = degminsec2decimal_degrees(-20,44,0) |
---|
70 | karratha_north = degminsec2decimal_degrees(-20,42,0) |
---|
71 | karratha_west = degminsec2decimal_degrees(116,48,0) |
---|
72 | karratha_east = degminsec2decimal_degrees(116,53,30) |
---|
73 | |
---|
74 | k0 = [karratha_south, karratha_west] |
---|
75 | k1 = [karratha_south, karratha_east] |
---|
76 | k2 = [karratha_north, karratha_east] |
---|
77 | k3 = [karratha_north, karratha_west] |
---|
78 | |
---|
79 | karratha_polygon = [k0, k1, k2, k3] |
---|
80 | |
---|
81 | |
---|
82 | #Interior regions |
---|
83 | dampier_south = degminsec2decimal_degrees(-20,40,0) |
---|
84 | dampier_north = degminsec2decimal_degrees(-20,38,10) |
---|
85 | dampier_west = degminsec2decimal_degrees(116,43,0) |
---|
86 | dampier_east = degminsec2decimal_degrees(116,45,0) |
---|
87 | |
---|
88 | d0 = [dampier_south, dampier_west] |
---|
89 | d1 = [dampier_south, dampier_east] |
---|
90 | d2 = [dampier_north, dampier_east] |
---|
91 | d3 = [dampier_north, dampier_west] |
---|
92 | |
---|
93 | dampier_polygon = [d0, d1, d2, d3] |
---|
94 | |
---|
95 | |
---|
96 | #Interior regions |
---|
97 | refinery_south = degminsec2decimal_degrees(-20,37,50) |
---|
98 | refinery_north = degminsec2decimal_degrees(-20,36,0) |
---|
99 | refinery_west = degminsec2decimal_degrees(116,44,0) |
---|
100 | refinery_east = degminsec2decimal_degrees(116,46,10) |
---|
101 | |
---|
102 | d0 = [refinery_south, refinery_west] |
---|
103 | d1 = [refinery_south, refinery_east] |
---|
104 | d2 = [refinery_north, refinery_east] |
---|
105 | d3 = [refinery_north, refinery_west] |
---|
106 | |
---|
107 | refinery_polygon = [d0, d1, d2, d3] |
---|
108 | |
---|
109 | |
---|
110 | #Interior region around 468899, 7715177: |
---|
111 | #lat (-20, 39, 44.93753), lon (116, 42, 5.09106) |
---|
112 | |
---|
113 | point_south = degminsec2decimal_degrees(-20,39,46) |
---|
114 | point_north = degminsec2decimal_degrees(-20,39,42) |
---|
115 | point_west = degminsec2decimal_degrees(116,42,0) |
---|
116 | point_east = degminsec2decimal_degrees(116,42,10) |
---|
117 | |
---|
118 | d0 = [point_south, point_west] |
---|
119 | d1 = [point_south, point_east] |
---|
120 | d2 = [point_north, point_east] |
---|
121 | d3 = [point_north, point_west] |
---|
122 | |
---|
123 | point_polygon = [d0, d1, d2, d3] |
---|
124 | |
---|
125 | |
---|
126 | #Neils areas around interesting points |
---|
127 | neil1_point1 = [degminsec2decimal_degrees(-20,35,34), |
---|
128 | degminsec2decimal_degrees(116,45,18)] |
---|
129 | neil1_point2 = [degminsec2decimal_degrees(-20,36,15), |
---|
130 | degminsec2decimal_degrees(116,46,18)] |
---|
131 | neil1_point3 = [degminsec2decimal_degrees(-20,35,9), |
---|
132 | degminsec2decimal_degrees(116,47,17)] |
---|
133 | neil1_point4 = [degminsec2decimal_degrees(-20,34,26), |
---|
134 | degminsec2decimal_degrees(116,46,17)] |
---|
135 | |
---|
136 | neil1_polygon = [neil1_point1, neil1_point2, neil1_point3, neil1_point4] |
---|
137 | |
---|
138 | |
---|
139 | |
---|
140 | neil2_point1 = [degminsec2decimal_degrees(-20,39,36), |
---|
141 | degminsec2decimal_degrees(116,41,33)] |
---|
142 | neil2_point2 = [degminsec2decimal_degrees(-20,40,10), |
---|
143 | degminsec2decimal_degrees(116,42,13)] |
---|
144 | neil2_point3 = [degminsec2decimal_degrees(-20,38,39), |
---|
145 | degminsec2decimal_degrees(116,43,49)] |
---|
146 | neil2_point4 = [degminsec2decimal_degrees(-20,38,5), |
---|
147 | degminsec2decimal_degrees(116,43,9)] |
---|
148 | |
---|
149 | neil2_polygon = [neil2_point1, neil2_point2, neil2_point3, neil2_point4] |
---|
150 | |
---|
151 | |
---|
152 | |
---|
153 | |
---|
154 | #Withnell bay |
---|
155 | wb_point1 = [degminsec2decimal_degrees(-20,35,34), |
---|
156 | degminsec2decimal_degrees(116,45,18)] |
---|
157 | wb_point2 = [degminsec2decimal_degrees(-20,36,15), |
---|
158 | degminsec2decimal_degrees(116,46,18)] |
---|
159 | wb_point3 = [degminsec2decimal_degrees(-20,35,9), |
---|
160 | degminsec2decimal_degrees(116,47,17)] |
---|
161 | wb_point4 = [degminsec2decimal_degrees(-20,34,26), |
---|
162 | degminsec2decimal_degrees(116,46,17)] |
---|
163 | |
---|
164 | wb_polygon = [wb_point1, wb_point2, wb_point3, wb_point4] |
---|
165 | |
---|
166 | |
---|
167 | |
---|
168 | |
---|
169 | #Larger Withnell bay |
---|
170 | lwb_point1 = [degminsec2decimal_degrees(-20,35,59), |
---|
171 | degminsec2decimal_degrees(116,42,00)] |
---|
172 | lwb_point2 = [degminsec2decimal_degrees(-20,36,50), |
---|
173 | degminsec2decimal_degrees(116,46,50)] |
---|
174 | lwb_point3 = [degminsec2decimal_degrees(-20,34,00), |
---|
175 | degminsec2decimal_degrees(116,47,39)] |
---|
176 | lwb_point4 = [degminsec2decimal_degrees(-20,33,00), |
---|
177 | degminsec2decimal_degrees(116,42,50)] |
---|
178 | |
---|
179 | lwb_polygon = [lwb_point1, lwb_point2, lwb_point3, lwb_point4] |
---|