1 | """Common filenames and locations for topographic data, meshes and outputs. |
---|
2 | Also includes origin for slump scenario. |
---|
3 | """ |
---|
4 | |
---|
5 | |
---|
6 | from os import sep |
---|
7 | from os.path import expanduser |
---|
8 | import sys |
---|
9 | |
---|
10 | #Making assumptions about the location of scenario data |
---|
11 | scenario_dir_name = 'sydney_tsunami_scenario_2006' |
---|
12 | # original 100m data |
---|
13 | #basename = 'sydney_2006_100' # get from Neil/Ingo (DEM or topo data) |
---|
14 | # revised 100m data |
---|
15 | coarsename = 'bathyland100' # get from Neil/Ingo (DEM or topo data) |
---|
16 | # revised 25m data |
---|
17 | #finename = 'bathyland25' # get from Neil/Ingo (DEM or topo data) |
---|
18 | #finename = 'bathyland100' # get from Neil/Ingo (DEM or topo data) |
---|
19 | finename = 'bathy_dem25' # get from Neil/Ingo (DEM or topo data) Wed 25 Jan |
---|
20 | |
---|
21 | # creating easting and northing max and min for fine data - region of interest |
---|
22 | eastingmin = 332090 |
---|
23 | eastingmax = 347500 |
---|
24 | northingmin = 6246250 |
---|
25 | northingmax = 6264100 |
---|
26 | #northingmax = 6280100 |
---|
27 | |
---|
28 | # creating easting and northing max and min for export viz purposes |
---|
29 | #eminviz = 332000 |
---|
30 | #emaxviz = 350000 |
---|
31 | #nminviz = 6231000 |
---|
32 | #nmaxviz = 6283000 |
---|
33 | |
---|
34 | # version2 |
---|
35 | eminviz = 318000 |
---|
36 | emaxviz = 351000 |
---|
37 | nminviz = 6231000 |
---|
38 | nmaxviz = 6283000 |
---|
39 | # for harbour region |
---|
40 | #nminviz = 6248000 |
---|
41 | #nmaxvix = 6270000 |
---|
42 | # for botany bay region |
---|
43 | #nmaxviz = 6248000 |
---|
44 | #nminvix = 6283000 |
---|
45 | |
---|
46 | basename = 'slump_ole' |
---|
47 | |
---|
48 | if sys.platform == 'win32': |
---|
49 | home = '..\..\..\..\..' #Sandpit's parent dir |
---|
50 | else: |
---|
51 | home = expanduser('~') |
---|
52 | |
---|
53 | |
---|
54 | #Derive subdirectories and filenames |
---|
55 | meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep |
---|
56 | datadir = home+sep+scenario_dir_name+sep+'topographies'+sep |
---|
57 | outputdir = home+sep+scenario_dir_name+sep+'output'+sep |
---|
58 | #boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep |
---|
59 | |
---|
60 | meshname = meshdir + basename |
---|
61 | coarsedemname = datadir + coarsename |
---|
62 | finedemname = datadir + finename |
---|
63 | combineddemname = datadir + 'sydneytopo' |
---|
64 | #boundaryname = boundarydir + boundary_basename |
---|
65 | outputname = outputdir + basename #Used by post processing |
---|
66 | #newoutputname = outputdir+'Combined Data v1'+sep+'d400'+sep+basename |
---|
67 | gauge_filename = outputdir + 'sydney_gauges.xya' |
---|
68 | gauge_outname = outputdir + 'gauges_max_output.xya' |
---|
69 | |
---|
70 | #Georeferencing |
---|
71 | #from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees |
---|
72 | from coordinate_transforms.redfearn import degminsec2decimal_degrees |
---|
73 | |
---|
74 | #Origin of existing dem (FIXME: Temporary measure) |
---|
75 | #x0_origin = 314036 #original 100m data |
---|
76 | #y0_origin = 6224951 |
---|
77 | #refzone = 56 |
---|
78 | #x0_origin = 314036.58727982 #revised 100m and 25m data |
---|
79 | #y0_origin = 6224951.2960092 |
---|
80 | #mesh_origin = (refzone, x0_origin, y0_origin) # input from Neil's data |
---|
81 | |
---|
82 | # define clipping polygon |
---|
83 | south = degminsec2decimal_degrees(-34,05,0) |
---|
84 | north = degminsec2decimal_degrees(-33,33,0) |
---|
85 | west = degminsec2decimal_degrees(151,1,0) |
---|
86 | east = degminsec2decimal_degrees(151,30,0) |
---|
87 | p0 = [south, west] |
---|
88 | p1 = [south, east] |
---|
89 | p2 = [north, east] |
---|
90 | p3 = [north, west] |
---|
91 | |
---|
92 | polygonall = [p0, p1, p2, p3] |
---|
93 | |
---|
94 | dsouth = degminsec2decimal_degrees(-34,05,0) |
---|
95 | dnorth = degminsec2decimal_degrees(-33,33,0) |
---|
96 | dnorth1 = degminsec2decimal_degrees(-33,40,0) |
---|
97 | dnorth2 = degminsec2decimal_degrees(-33,58,30) |
---|
98 | dnorth3 = degminsec2decimal_degrees(-33,46,0) |
---|
99 | dwest = degminsec2decimal_degrees(151,2,20) |
---|
100 | deast1 = degminsec2decimal_degrees(151,20,0) |
---|
101 | deast2 = degminsec2decimal_degrees(151,48,0) |
---|
102 | deast3 = degminsec2decimal_degrees(151,10,0) |
---|
103 | deast4 = degminsec2decimal_degrees(151,9,0) |
---|
104 | |
---|
105 | dp0 = [dsouth, dwest] |
---|
106 | dp1 = [dsouth, deast1] |
---|
107 | dp2 = [dnorth2, deast2] |
---|
108 | dp3 = [dnorth1, deast2] |
---|
109 | dp4 = [dnorth, deast1] |
---|
110 | dp5 = [dnorth, deast4] |
---|
111 | dp6 = [dnorth3, deast3] |
---|
112 | dp7 = [dnorth3, dwest] |
---|
113 | dp8 = [dnorth, dwest] |
---|
114 | |
---|
115 | #diffpolygonall = [dp0, dp1, dp2, dp3, dp4, dp5, dp6, dp7] |
---|
116 | diffpolygonall = [dp0, dp1, dp2, dp3, dp4, dp5, dp6, dp7] |
---|
117 | # to put chunk back in |
---|
118 | #diffpolygonall = [dp0, dp1, dp2, dp3, dp4, dp8] |
---|
119 | |
---|
120 | #Interior regions - the Harbour - take 2 |
---|
121 | harbour_1x = degminsec2decimal_degrees(-33,51,0) |
---|
122 | harbour_1y = degminsec2decimal_degrees(151,2,30) |
---|
123 | harbour_12x = degminsec2decimal_degrees(-33,51,0) |
---|
124 | harbour_12y = degminsec2decimal_degrees(151,5,0) |
---|
125 | harbour_13x = degminsec2decimal_degrees(-33,52,15) |
---|
126 | harbour_13y = degminsec2decimal_degrees(151,5,0) |
---|
127 | harbour_2x = degminsec2decimal_degrees(-33,53,0) |
---|
128 | harbour_2y = degminsec2decimal_degrees(151,17,20) |
---|
129 | harbour_3x = degminsec2decimal_degrees(-33,47,0) |
---|
130 | harbour_3y = degminsec2decimal_degrees(151,20,30) |
---|
131 | #harbour_4x = degminsec2decimal_degrees(-33,48,0) |
---|
132 | harbour_4x = degminsec2decimal_degrees(-33,47,50) |
---|
133 | harbour_4y = degminsec2decimal_degrees(151,8,10) |
---|
134 | #harbour_5x = degminsec2decimal_degrees(-33,49,0) |
---|
135 | harbour_5x = degminsec2decimal_degrees(-33,48,10) |
---|
136 | harbour_5y = degminsec2decimal_degrees(151,8,0) |
---|
137 | harbour_6x = degminsec2decimal_degrees(-33,49,0) |
---|
138 | harbour_6y = degminsec2decimal_degrees(151,2,30) |
---|
139 | harbour_7x = degminsec2decimal_degrees(-33,34,30) |
---|
140 | harbour_7y = degminsec2decimal_degrees(151,20,20) |
---|
141 | #harbour_8x = degminsec2decimal_degrees(-33,33,30) |
---|
142 | #harbour_8y = degminsec2decimal_degrees(151,15,0) |
---|
143 | harbour_8x = degminsec2decimal_degrees(-33,33,30) |
---|
144 | harbour_8y = degminsec2decimal_degrees(151,17,0) |
---|
145 | #harbour_9x = degminsec2decimal_degrees(-33,45,30) |
---|
146 | #harbour_9y = degminsec2decimal_degrees(151,15,0) |
---|
147 | harbour_9x = degminsec2decimal_degrees(-33,45,30) |
---|
148 | harbour_9y = degminsec2decimal_degrees(151,17,0) |
---|
149 | harbour_10x = degminsec2decimal_degrees(-33,45,10) |
---|
150 | harbour_10y = degminsec2decimal_degrees(151,11,40) |
---|
151 | harbour_11x = degminsec2decimal_degrees(-33,45,10) |
---|
152 | harbour_11y = degminsec2decimal_degrees(151,11,40) |
---|
153 | harbour_14x = degminsec2decimal_degrees(-33,49,10) |
---|
154 | harbour_14y = degminsec2decimal_degrees(151,11,40) |
---|
155 | harbour_15x = degminsec2decimal_degrees(-33,48,55) |
---|
156 | harbour_15y = degminsec2decimal_degrees(151,2,30) |
---|
157 | |
---|
158 | k02 = [harbour_1x, harbour_1y] |
---|
159 | k12 = [harbour_2x, harbour_2y] |
---|
160 | k22 = [harbour_3x, harbour_3y] |
---|
161 | k32 = [harbour_4x, harbour_4y] |
---|
162 | k42 = [harbour_5x, harbour_5y] |
---|
163 | k52 = [harbour_6x, harbour_6y] |
---|
164 | k62 = [harbour_7x, harbour_7y] |
---|
165 | k72 = [harbour_8x, harbour_8y] |
---|
166 | k82 = [harbour_9x, harbour_9y] |
---|
167 | k92 = [harbour_10x, harbour_10y] |
---|
168 | k102 = [harbour_11x, harbour_11y] |
---|
169 | k112 = [harbour_12x, harbour_12y] |
---|
170 | k122 = [harbour_13x, harbour_13y] |
---|
171 | k132 = [harbour_14x, harbour_14y] |
---|
172 | k142 = [harbour_15x, harbour_15y] |
---|
173 | |
---|
174 | #harbour_polygon_2 = [k02, k112, k122, k12, k22, k62, k72, k82, k92, k102, k32, k42, k52] |
---|
175 | #harbour_polygon_2 = [k122, k12, k22, k62, k72, k102] #worked |
---|
176 | harbour_polygon_2 = [k02, k112, k122, k12, k22, k62, k72, k82, k102, k42, k52] #worked |
---|
177 | |
---|
178 | #Interior region - Botany Bay - take 2 |
---|
179 | bb_1x = degminsec2decimal_degrees(-34,3,0) |
---|
180 | bb_1y = degminsec2decimal_degrees(151,2,30) |
---|
181 | bb_10x = degminsec2decimal_degrees(-34,3,0) |
---|
182 | bb_10y = degminsec2decimal_degrees(151,8,0) |
---|
183 | bb_2x = degminsec2decimal_degrees(-34,3,0) |
---|
184 | bb_2y = degminsec2decimal_degrees(151,14,0) |
---|
185 | bb_3x = degminsec2decimal_degrees(-33,53,30) |
---|
186 | bb_3y = degminsec2decimal_degrees(151,17,20) |
---|
187 | bb_4x = degminsec2decimal_degrees(-33,53,0) |
---|
188 | bb_4y = degminsec2decimal_degrees(151,8,0) |
---|
189 | bb_5x = degminsec2decimal_degrees(-33,57,30) |
---|
190 | bb_5y = degminsec2decimal_degrees(151,8,0) |
---|
191 | bb_6x = degminsec2decimal_degrees(-33,57,30) |
---|
192 | bb_6y = degminsec2decimal_degrees(151,2,30) |
---|
193 | bb_7x = degminsec2decimal_degrees(-33,53,30) |
---|
194 | bb_7y = degminsec2decimal_degrees(151,12,30) |
---|
195 | bb_8x = degminsec2decimal_degrees(-33,55,20) |
---|
196 | bb_8y = degminsec2decimal_degrees(151,8,0) |
---|
197 | bb_9x = degminsec2decimal_degrees(-33,55,20) |
---|
198 | bb_9y = degminsec2decimal_degrees(151,12,30) |
---|
199 | |
---|
200 | j02 = [bb_1x, bb_1y] |
---|
201 | j12 = [bb_2x, bb_2y] |
---|
202 | j22 = [bb_3x, bb_3y] |
---|
203 | j32 = [bb_4x, bb_4y] |
---|
204 | j42 = [bb_5x, bb_5y] |
---|
205 | j52 = [bb_6x, bb_6y] |
---|
206 | j62 = [bb_7x, bb_7y] |
---|
207 | j72 = [bb_8x, bb_8y] |
---|
208 | j82 = [bb_9x, bb_9y] |
---|
209 | j92 = [bb_10x, bb_10y] |
---|
210 | |
---|
211 | botanybay_polygon_2 = [j92, j12, j22, j62, j82, j72, j42] # worked |
---|
212 | #botanybay_polygon_2 = [j02, j12, j22, j32, j42, j52] # worked |
---|
213 | |
---|
214 | # this section sets up source origin for slump scenario |
---|
215 | # close to harbour opening (343000,6255000) |
---|
216 | # x0 = 28964 |
---|
217 | # y0 = 30049 |
---|
218 | # around 10km harbour opening (353000,6255000) |
---|
219 | #x0 = 38964 |
---|
220 | #y0 = 30049 |
---|
221 | # around 18km across from harbour(361000,6255000) |
---|
222 | #x0 = 46964 |
---|
223 | #y0 = 30049 |
---|
224 | # around 42km across from harbour(385000,6255000) |
---|
225 | x0 = 28964 + 42000 |
---|
226 | y0 = 30049 |
---|
227 | |
---|
228 | #revised 100m and 25m data |
---|
229 | slump_origin = [x0+314036.58727982, y0+6224951.2960092] #Absolute UTM |
---|
230 | |
---|
231 | |
---|
232 | # close to botany bay opening (340000,6236000) |
---|
233 | # x0 = 25964 |
---|
234 | # y0 = 11049 |
---|
235 | # around 10km from botany bay opening (350000,6236000) |
---|
236 | # x0 = 35964 |
---|
237 | # y0 = 11049 |
---|
238 | # around 21km from botany bay opening (361000,6236000) |
---|
239 | #x0 = 46964 |
---|
240 | #y0 = 11049 |
---|
241 | |
---|
242 | # not used for sydney scenario, original interior regions listed though |
---|
243 | # setting up problem area for doing just around the harbour |
---|
244 | hsouth = degminsec2decimal_degrees(-33,54,0) |
---|
245 | hnorth = degminsec2decimal_degrees(-33,48,0) |
---|
246 | hwest = degminsec2decimal_degrees(151,0,0) |
---|
247 | heast = degminsec2decimal_degrees(151,30,0) |
---|
248 | |
---|
249 | hp0 = [hsouth, hwest] |
---|
250 | hp1 = [hsouth, heast] |
---|
251 | hp2 = [hnorth, heast] |
---|
252 | hp3 = [hnorth, hwest] |
---|
253 | polygon_h = [hp0, hp1, hp2, hp3] |
---|
254 | |
---|
255 | #Interior regions - the Harbour - take 1 |
---|
256 | harbour_south = degminsec2decimal_degrees(-33,53,0) |
---|
257 | harbour_north = degminsec2decimal_degrees(-33,47,0) |
---|
258 | harbour_west = degminsec2decimal_degrees(151,5,0) |
---|
259 | harbour_east = degminsec2decimal_degrees(151,19,0) |
---|
260 | |
---|
261 | #harbour_south1 = degminsec2decimal_degrees(-33,53,0) |
---|
262 | #harbour_south2 = degminsec2decimal_degrees(-33,52,0) |
---|
263 | #harbour_north1 = degminsec2decimal_degrees(-33,45,0) |
---|
264 | #harbour_north2 = degminsec2decimal_degrees(-33,48,0) |
---|
265 | #harbour_west = degminsec2decimal_degrees(151,5,0) |
---|
266 | #harbour_east = degminsec2decimal_degrees(151,19,0) |
---|
267 | |
---|
268 | k0 = [harbour_south, harbour_west] |
---|
269 | k1 = [harbour_south, harbour_east] |
---|
270 | k2 = [harbour_north, harbour_east] |
---|
271 | k3 = [harbour_north, harbour_west] |
---|
272 | |
---|
273 | harbour_polygon = [k0, k1, k2, k3] |
---|
274 | |
---|
275 | # setting up problem area for doing just around Botany Bay |
---|
276 | bsouth = degminsec2decimal_degrees(-33,56,0) |
---|
277 | bnorth = degminsec2decimal_degrees(-34,3,0) |
---|
278 | bwest = degminsec2decimal_degrees(151,0,0) |
---|
279 | beast = degminsec2decimal_degrees(151,30,0) |
---|
280 | |
---|
281 | bp0 = [bsouth, bwest] |
---|
282 | bp1 = [bsouth, beast] |
---|
283 | bp2 = [bnorth, beast] |
---|
284 | bp3 = [bnorth, bwest] |
---|
285 | polygon_bb = [bp0, bp1, bp2, bp3] |
---|
286 | |
---|
287 | #Interior region - Botany Bay - take 1 |
---|
288 | botanybay_south = degminsec2decimal_degrees(-33,58,0) |
---|
289 | botanybay_north = degminsec2decimal_degrees(-34,1,0) |
---|
290 | botanybay_west = degminsec2decimal_degrees(151,5,0) |
---|
291 | botanybay_east = degminsec2decimal_degrees(151,18,0) |
---|
292 | |
---|
293 | j0 = [botanybay_south, botanybay_west] |
---|
294 | j1 = [botanybay_south, botanybay_east] |
---|
295 | j2 = [botanybay_north, botanybay_east] |
---|
296 | j3 = [botanybay_north, botanybay_west] |
---|
297 | |
---|
298 | botanybay_polygon = [j0, j1, j2, j3] |
---|