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