source: production/sydney_2006/project.py @ 2378

Last change on this file since 2378 was 2353, checked in by ole, 19 years ago

Fixed georeferencing issues with slump

File size: 10.0 KB
Line 
1"""Common filenames and locations for topographic data, meshes and outputs.
2Also includes origin for slump scenario.
3"""
4
5
6from os import sep
7from os.path import expanduser
8import sys
9
10#Making assumptions about the location of scenario data
11scenario_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
15coarsename = '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)
19finename = '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
22eastingmin = 332090
23eastingmax = 347500
24northingmin = 6246250
25northingmax = 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
35eminviz = 318000
36emaxviz = 351000
37nminviz = 6231000
38nmaxviz = 6283000
39# for harbour region
40#nminviz = 6248000
41#nmaxvix = 6270000
42# for botany bay region
43#nmaxviz = 6248000
44#nminvix = 6283000
45
46basename = 'slump_ole'
47
48if sys.platform == 'win32':
49    home = '..\..\..\..\..'     #Sandpit's parent dir
50else:   
51    home = expanduser('~')
52
53
54#Derive subdirectories and filenames
55meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep
56datadir = home+sep+scenario_dir_name+sep+'topographies'+sep
57outputdir = home+sep+scenario_dir_name+sep+'output'+sep
58#boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep
59
60meshname = meshdir + basename
61coarsedemname = datadir + coarsename
62finedemname = datadir + finename
63combineddemname = datadir + 'sydneytopo'
64#boundaryname = boundarydir + boundary_basename
65outputname = outputdir + basename  #Used by post processing
66#newoutputname = outputdir+'Combined Data v1'+sep+'d400'+sep+basename
67gauge_filename = outputdir + 'sydney_gauges.xya'
68gauge_outname = outputdir + 'gauges_max_output.xya'
69
70#Georeferencing
71#from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees
72from 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
83south = degminsec2decimal_degrees(-34,05,0)
84north = degminsec2decimal_degrees(-33,33,0)
85west = degminsec2decimal_degrees(151,1,0)
86east = degminsec2decimal_degrees(151,30,0)
87p0 = [south, west]
88p1 = [south, east]
89p2 = [north, east]
90p3 = [north, west]
91   
92polygonall = [p0, p1, p2, p3]
93
94dsouth = degminsec2decimal_degrees(-34,05,0)
95dnorth = degminsec2decimal_degrees(-33,33,0)
96dnorth1 = degminsec2decimal_degrees(-33,40,0)
97dnorth2 = degminsec2decimal_degrees(-33,58,30)
98dnorth3 = degminsec2decimal_degrees(-33,46,0)
99dwest = degminsec2decimal_degrees(151,2,20)
100deast1 = degminsec2decimal_degrees(151,20,0)
101deast2 = degminsec2decimal_degrees(151,48,0)
102deast3 = degminsec2decimal_degrees(151,10,0)
103deast4 = degminsec2decimal_degrees(151,9,0)
104
105dp0 = [dsouth, dwest]
106dp1 = [dsouth, deast1]
107dp2 = [dnorth2, deast2]
108dp3 = [dnorth1, deast2]
109dp4 = [dnorth, deast1]
110dp5 = [dnorth, deast4]
111dp6 = [dnorth3, deast3]
112dp7 = [dnorth3, dwest]
113dp8 = [dnorth, dwest]
114   
115#diffpolygonall = [dp0, dp1, dp2, dp3, dp4, dp5, dp6, dp7]
116diffpolygonall = [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
121harbour_1x = degminsec2decimal_degrees(-33,51,0)
122harbour_1y = degminsec2decimal_degrees(151,2,30)
123harbour_12x = degminsec2decimal_degrees(-33,51,0)
124harbour_12y = degminsec2decimal_degrees(151,5,0)
125harbour_13x = degminsec2decimal_degrees(-33,52,15)
126harbour_13y = degminsec2decimal_degrees(151,5,0)
127harbour_2x = degminsec2decimal_degrees(-33,53,0)
128harbour_2y = degminsec2decimal_degrees(151,17,20)
129harbour_3x = degminsec2decimal_degrees(-33,47,0)
130harbour_3y = degminsec2decimal_degrees(151,20,30)
131#harbour_4x = degminsec2decimal_degrees(-33,48,0)
132harbour_4x = degminsec2decimal_degrees(-33,47,50)
133harbour_4y = degminsec2decimal_degrees(151,8,10)
134#harbour_5x = degminsec2decimal_degrees(-33,49,0)
135harbour_5x = degminsec2decimal_degrees(-33,48,10)
136harbour_5y = degminsec2decimal_degrees(151,8,0)
137harbour_6x = degminsec2decimal_degrees(-33,49,0)
138harbour_6y = degminsec2decimal_degrees(151,2,30)
139harbour_7x = degminsec2decimal_degrees(-33,34,30)
140harbour_7y = degminsec2decimal_degrees(151,20,20)
141#harbour_8x = degminsec2decimal_degrees(-33,33,30)
142#harbour_8y = degminsec2decimal_degrees(151,15,0)
143harbour_8x = degminsec2decimal_degrees(-33,33,30)
144harbour_8y = degminsec2decimal_degrees(151,17,0)
145#harbour_9x = degminsec2decimal_degrees(-33,45,30)
146#harbour_9y = degminsec2decimal_degrees(151,15,0)
147harbour_9x = degminsec2decimal_degrees(-33,45,30)
148harbour_9y = degminsec2decimal_degrees(151,17,0)
149harbour_10x = degminsec2decimal_degrees(-33,45,10)
150harbour_10y = degminsec2decimal_degrees(151,11,40)
151harbour_11x = degminsec2decimal_degrees(-33,45,10)
152harbour_11y = degminsec2decimal_degrees(151,11,40)
153harbour_14x = degminsec2decimal_degrees(-33,49,10)
154harbour_14y = degminsec2decimal_degrees(151,11,40)
155harbour_15x = degminsec2decimal_degrees(-33,48,55)
156harbour_15y = degminsec2decimal_degrees(151,2,30)
157
158k02 = [harbour_1x, harbour_1y]
159k12 = [harbour_2x, harbour_2y]
160k22 = [harbour_3x, harbour_3y]
161k32 = [harbour_4x, harbour_4y]
162k42 = [harbour_5x, harbour_5y]
163k52 = [harbour_6x, harbour_6y]
164k62 = [harbour_7x, harbour_7y]
165k72 = [harbour_8x, harbour_8y]
166k82 = [harbour_9x, harbour_9y]
167k92 = [harbour_10x, harbour_10y]
168k102 = [harbour_11x, harbour_11y]
169k112 = [harbour_12x, harbour_12y]
170k122 = [harbour_13x, harbour_13y]
171k132 = [harbour_14x, harbour_14y]
172k142 = [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
176harbour_polygon_2 = [k02, k112, k122, k12, k22, k62, k72, k82, k102, k42, k52] #worked
177
178#Interior region - Botany Bay - take 2
179bb_1x = degminsec2decimal_degrees(-34,3,0)
180bb_1y = degminsec2decimal_degrees(151,2,30)
181bb_10x = degminsec2decimal_degrees(-34,3,0)
182bb_10y = degminsec2decimal_degrees(151,8,0)
183bb_2x = degminsec2decimal_degrees(-34,3,0)
184bb_2y = degminsec2decimal_degrees(151,14,0)
185bb_3x = degminsec2decimal_degrees(-33,53,30)
186bb_3y = degminsec2decimal_degrees(151,17,20)
187bb_4x = degminsec2decimal_degrees(-33,53,0)
188bb_4y = degminsec2decimal_degrees(151,8,0)
189bb_5x = degminsec2decimal_degrees(-33,57,30)
190bb_5y = degminsec2decimal_degrees(151,8,0)
191bb_6x = degminsec2decimal_degrees(-33,57,30)
192bb_6y = degminsec2decimal_degrees(151,2,30) 
193bb_7x = degminsec2decimal_degrees(-33,53,30)
194bb_7y = degminsec2decimal_degrees(151,12,30) 
195bb_8x = degminsec2decimal_degrees(-33,55,20)
196bb_8y = degminsec2decimal_degrees(151,8,0) 
197bb_9x = degminsec2decimal_degrees(-33,55,20)
198bb_9y = degminsec2decimal_degrees(151,12,30) 
199
200j02 = [bb_1x, bb_1y]
201j12 = [bb_2x, bb_2y]
202j22 = [bb_3x, bb_3y]
203j32 = [bb_4x, bb_4y]
204j42 = [bb_5x, bb_5y]
205j52 = [bb_6x, bb_6y]
206j62 = [bb_7x, bb_7y]
207j72 = [bb_8x, bb_8y]
208j82 = [bb_9x, bb_9y]
209j92 = [bb_10x, bb_10y]
210
211botanybay_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)
225x0 = 28964 + 42000
226y0 = 30049
227
228#revised 100m and 25m data
229slump_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
244hsouth = degminsec2decimal_degrees(-33,54,0)
245hnorth = degminsec2decimal_degrees(-33,48,0)
246hwest = degminsec2decimal_degrees(151,0,0)
247heast = degminsec2decimal_degrees(151,30,0)
248
249hp0 = [hsouth, hwest]
250hp1 = [hsouth, heast]
251hp2 = [hnorth, heast]
252hp3 = [hnorth, hwest]
253polygon_h = [hp0, hp1, hp2, hp3]
254
255#Interior regions - the Harbour - take 1
256harbour_south = degminsec2decimal_degrees(-33,53,0)
257harbour_north = degminsec2decimal_degrees(-33,47,0)
258harbour_west = degminsec2decimal_degrees(151,5,0)
259harbour_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
268k0 = [harbour_south, harbour_west]
269k1 = [harbour_south, harbour_east]
270k2 = [harbour_north, harbour_east]
271k3 = [harbour_north, harbour_west]   
272
273harbour_polygon = [k0, k1, k2, k3]
274
275# setting up problem area for doing just around Botany Bay
276bsouth = degminsec2decimal_degrees(-33,56,0)
277bnorth = degminsec2decimal_degrees(-34,3,0)
278bwest = degminsec2decimal_degrees(151,0,0)
279beast = degminsec2decimal_degrees(151,30,0)
280
281bp0 = [bsouth, bwest]
282bp1 = [bsouth, beast]
283bp2 = [bnorth, beast]
284bp3 = [bnorth, bwest]
285polygon_bb = [bp0, bp1, bp2, bp3]
286
287#Interior region - Botany Bay - take 1
288botanybay_south = degminsec2decimal_degrees(-33,58,0)
289botanybay_north = degminsec2decimal_degrees(-34,1,0)
290botanybay_west = degminsec2decimal_degrees(151,5,0)
291botanybay_east = degminsec2decimal_degrees(151,18,0)
292
293j0 = [botanybay_south, botanybay_west]
294j1 = [botanybay_south, botanybay_east]
295j2 = [botanybay_north, botanybay_east]
296j3 = [botanybay_north, botanybay_west]   
297
298botanybay_polygon = [j0, j1, j2, j3]
Note: See TracBrowser for help on using the repository browser.