source: anuga_work/production/sydney_2006/project.py @ 5001

Last change on this file since 5001 was 3788, checked in by sexton, 18 years ago

path fixups

File size: 16.4 KB
Line 
1"""Common filenames and locations for topographic data, meshes and outputs.
2Also includes origin for slump scenario.
3"""
4
5from os import sep, environ
6from os.path import expanduser
7from anuga.utilities.polygon import read_polygon
8import sys
9
10from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees, convert_from_latlon_to_utm
11               
12
13#Making assumptions about the location of scenario data
14state = 'new_south_wales'
15scenario_dir_name = 'sydney_tsunami_scenario_2006'
16# revised 100m data
17coarsename = 'bathyland100' # get from Neil/Ingo (DEM or topo data)
18# revised 25m 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
27# creating easting and northing max and min for export viz purposes
28eminviz = 318000
29emaxviz = 351000
30nminviz = 6231000
31nmaxviz = 6283000
32
33basename = 'slump_duncan'
34basename2 = 'slump_1000res_1min'
35basename4 = 'slump_poly_ingo_test'
36
37if sys.platform == 'win32':
38    home = environ['INUNDATIONHOME']     #Sandpit's parent dir
39else:   
40    home = expanduser('~')
41
42# INUNDATIONHOME is the inundation directory, not the data directory.
43home += sep +'data'
44
45#Derive subdirectories and filenames
46meshdir = home+sep+state+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
47datadir = home+sep+state+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
48outputdir = home+sep+state+scenario_dir_name+sep+'anuga'+sep+'output'+sep
49polygondir = home+sep+state+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
50gaugedir = home+sep+state+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
51#reportdir = home+sep+state+scenario_dir_name+sep+'reports'+sep
52
53meshname = meshdir + basename
54meshelevname = meshdir + 'test_elev.tsh'
55meshname4 = meshdir + basename4
56coarsedemname = datadir + coarsename
57finedemname = datadir + finename
58combineddemname = datadir + 'sydneytopo'
59outputname = outputdir + basename  #Used by post processing
60outputname2 = outputdir+sep+'Coast_Polygons'+sep+'res1000'+sep+basename2  #Used by post processing
61
62#csv file of coastline 50m epsilon belt
63#manly_polygonname = polygondir + 'manly_polygon_UTM56_coarse'
64#manly_polygon = read_polygon(manly_polygonname + '.csv')
65#print manly_polygon
66
67gauge_filename = gaugedir + 'sydney_gauges.xya'
68buildings_filename = gaugedir + 'all_bld_ind.csv'
69#gauge_filename = gaugedir + 'sydney_gauges_test.xya'
70gauge_outname = gaugedir + 'gauges_max_output.xya'
71#gauge_filename = gaugedir + 'nest_gauges_Manly.xya'
72#gauge_filename = gaugedir + 'west_of_quay_yprofile.xya'
73#gauge_filename = gaugedir + 'GA_gauge.csv' # from Benfield
74#gauge_outname = gaugedir + 'gauges_max_output_next.xya'
75gaugetimeseries = gaugedir + 'gauges_time_series'
76polygonptsfile = polygondir + 'poly'
77integraltimeseries = outputdir + 'integral_time_series'
78integraltimeseries2 = outputdir + 'integral_time_series_move_origin'
79
80
81#Georeferencing
82from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees
83
84# define clipping polygon
85south = degminsec2decimal_degrees(-34,05,0)
86north = degminsec2decimal_degrees(-33,33,0)
87west = degminsec2decimal_degrees(151,1,0)
88east = degminsec2decimal_degrees(151,30,0)
89p0 = [south, west]
90p1 = [south, east]
91p2 = [north, east]
92p3 = [north, west]
93   
94polygonall, zone = convert_from_latlon_to_utm([p0, p1, p2, p3])
95refzone = zone
96
97print 'Got refzone', refzone
98
99# original clipping
100dsouth = degminsec2decimal_degrees(-34,05,0)
101dsouth2 = degminsec2decimal_degrees(-34,01,0)
102dnorth = degminsec2decimal_degrees(-33,33,0)
103dnorth1 = degminsec2decimal_degrees(-33,40,0)
104dnorth2 = degminsec2decimal_degrees(-33,58,30)
105dnorth3 = degminsec2decimal_degrees(-33,46,0)
106dwest = degminsec2decimal_degrees(151,1,0)
107deast1 = degminsec2decimal_degrees(151,20,0)
108deast2 = degminsec2decimal_degrees(151,48,0)
109deast3 = degminsec2decimal_degrees(151,10,0)
110deast4 = degminsec2decimal_degrees(151,9,0)
111
112dp0 = [dsouth, dwest]
113dp1 = [dsouth, deast1]
114dp2 = [dnorth2, deast2]
115dp3 = [dnorth1, deast2]
116dp4 = [dnorth, deast1]
117dp5 = [dnorth, deast4]
118dp6 = [dnorth3, deast3]
119dp7 = [dnorth3, dwest]
120dp8 = [dnorth, dwest]
121
122dp12 = [dsouth2, deast2]
123dp34 = [dnorth, deast2]
124diffpolygonall, zone = convert_from_latlon_to_utm([dp0, dp1, dp2, dp3, dp4, dp5, dp6, dp7])
125# used for new tests 4 April 2006 (ensure slump contained in domain)
126diffpolygonall2, zone = convert_from_latlon_to_utm([dp0, dp1, dp12, dp34, dp4, dp5, dp6, dp7])
127
128# clipping used for look at increasingly finer resolution
129j0 = [338000, 6243000]
130j1 = [365000, 6243000]
131j2 = [365000, 6273000]
132j3 = [338000, 6273000]
133   
134diffpolygonall_test = [j0, j1, j2, j3]
135# clipping used for further investigation of black screen of death
136j0 = [328000, 6255000]
137j1 = [355000, 6255000]
138j2 = [355000, 6270000]
139j3 = [328000, 6270000]
140
141diffpolygonall_test2 = [j0, j1, j2, j3]
142
143# clipping used for demo purposes to fit around poly3 and poly4 (Ingo's files)
144#j0 = [318000, 6249000]
145#j1 = [387000, 6249000]
146#j2 = [387000, 6270000]
147#j3 = [318000, 6270000]
148
149#demopoly = [j0, j1, j2, j3]
150
151# second demo poly which isn't rectangular
152j0 = [385000, 6280000]
153j1 = [360000, 6272500]
154j2 = [335000, 6272500]
155j3 = [330000, 6265000]
156j31 = [325000, 6260000]
157j4 = [316000, 6260000]
158j5 = [316000, 6247000]
159j6 = [350000, 6247000]
160j7 = [385000, 6238000]
161
162demopoly = [j0, j1, j2, j3, j31, j4, j5, j6, j7]
163
164# to put chunk back in
165#diffpolygonall = [dp0, dp1, dp2, dp3, dp4, dp8]
166
167# testing new interior regions 15 Feb 06
168# these worked OK it seemed, no warnings and resulting mesh looked fine.
169pp0 = [343965, 6273229]
170pp1 = [342984, 6270664]
171pp2 = [343950, 6270005]
172pp3 = [343853, 6270399]
173pp4 = [343383, 6270925]
174pp5 = [343756, 6271926]
175pp6 = [344037, 6272401]
176pp7 = [344405, 6272503]
177pp8 = [344226, 6273244]
178
179poly1 = [pp0, pp1, pp2, pp3, pp4, pp5, pp6, pp7, pp8]
180
181qp0 = [343494.0, 6270650.0]
182qp1 = [343337.0, 6270303.0]
183qp2 = [343466.0, 6270228.0]
184qp3 = [343139.0, 6269901.0]
185qp4 = [342472.0, 6268573.0]
186qp5 = [342111.0, 6267115.0]
187qp6 = [342479.0, 6266121.0]
188qp7 = [342860.0, 6266386.0]
189qp8 = [342635.0, 6267438.0]
190qp9 = [343105.0, 6269070.0]
191qp10 = [343548.0, 6269567.0]
192qp11 = [343487.0, 6269928.0]
193qp12 = [343991.0, 6270269.0]
194
195poly2 = [qp0, qp1, qp2, qp3, qp4, qp5, qp6, qp7, qp8, qp9, qp10, qp11, qp12]
196#poly2 = [qp5, qp6, qp7, qp8, qp9, qp10]
197
198# test from Jane drawing
199# north
200np1 = [318200, 6253000]
201np2 = [327000, 6250500]
202np2east = [327200, 6250500]
203np2west = [326800, 6250500]
204np3 = [333000, 6249000]
205np4 = [342000, 6249000]
206np5 = [342000, 6255000]
207np6 = [343000, 6256000]
208np7 = [344000, 6258000]
209np8 = [343000, 6260300]
210#np8 = [343000, 6260000]
211np9 = [343000, 6264000]
212np10 = [345000, 6265000]
213np10_2 = [344500, 6265000]
214np10_3 = [344200, 6265000]
215np11 = [343000, 6266000]
216np12 = [344000, 6269000]
217np13 = [344000, 6272000]
218np14 = [342000, 6272000]
219np15 = [339000, 6269000]
220np16 = [339000, 6264000]
221#np17 = [332000, 6264000]
222np17 = [332500, 6262000]
223np18 = [334000, 6254000]
224np19 = [329000, 6257000]
225np20 = [330000, 6259000]
226#np21 = [327000, 6262000]
227np21 = [327000, 6259000]
228np22 = [327000, 6257000]
229np23 = [318200, 6257000]
230np24 = [335000, 6261000]
231np25 = [336000, 6262000]
232np26 = [338000, 6262000]
233np27 = [340000, 6264000]
234np28 = [334000, 6250000]
235np29 = [336000, 6250000]
236np30 = [341500, 6250000]
237np31 = [327000, 6254000]
238np32 = [323000, 6257000]
239np33 = [335000, 6255000]
240np34 = [337000, 6256000]
241np35 = [338000, 6255000]
242np36 = [320000, 6254000]
243np37 = [322000, 6252000]
244np38 = [324000, 6253000]
245np39 = [325000, 6251000]
246nptest = [339000, 6266000]
247nptest2 = [344000, 6265000]
248
249#testpoly1 = [np1, \
250#             np36, np37, np38, np39, \
251#             np2, np3, \
252#             np28, np29, np30, \
253#             np5, np6, np7, np8, np9, np10, \
254#             np11, np12, np13, np14, np15, \
255#             np27, np26, np25, np24, \
256#             np17, \
257#             np33, np34, np35, \
258#             np18, np19, np20, \
259#             np21, np22, \
260#             np31, np32, \
261#             np23]
262
263# reduce this polygon for black screen of death testing 24/04/06
264#newpoly1_refine = [nptest, np27, np16] # worked
265#newpoly1_refine = [np9, np10, np11] # worked
266#newpoly1_refine = [np9, np10, np11, nptest2] # worked
267#newpoly1_refine = [np9, np10_2, np11, nptest2] # worked
268newpoly1_refine = [np9, np10_3, np11, nptest2] # worked
269
270# used for refined interior regions and fine mesh
271newpoly1 = [np28, np29, np30, \
272            np5, np6, np7, np8, np9, np10, \
273            np11, np12, np13, np14, np15, \
274            np27, np26, np25, np24, np17, \
275            np33, \
276            np19, np20, np21, np22, np31, np32, \
277            np36, np37, np38, np39, np2, np3]
278
279# last two lines for second run
280
281north1 = [np2, np3, np30, np5, np24, np17, np33, np19, np20, np21, \
282          np31, np32, np37, np38, np39]
283north2 = [np8, np9, np19, np11, np12, np13, np14, np15, np27, np27, np25]
284npinsert = [332000, 6255000]
285parrariver = [np3, np18, npinsert, np19, np32, np36, np38, np39, np2] #first run
286#parrariver = [np32, np36, np37, np38, np39, np2west, np31] #second run
287
288# south
289sp1 = [ 328000, 6231000]
290sp2 = [335000, 6231000]
291sp3 = [338000, 6235000]
292sp4 = [340000, 6240000]
293sp5 = [340000, 6244000]
294sp6 = [342000, 6248800]
295sp7 = [340000, 6248800]
296sp8 = [338000, 6244000]
297sp9 = [338000, 6237000]
298sp10 = [334000, 6242000]
299sp11 = [331000, 6245000]
300sp12 = [326000, 6247000]
301sp13 = [325000, 6246000]
302sp14 = [329000, 6243000]
303sp15 = [328000, 6237000]
304sp16 = [337000, 6236000]
305sp17 = [330000, 6237000]
306sp18 = [330000, 6239000]
307sp19 = [332000, 6239000]
308sp20 = [334000, 6240000]
309sp21 = [334000, 6238000]
310sp22 = [337000, 6236500]
311sp23 = [339000, 6236000]
312
313#original
314south1 = [sp1, sp2, sp3, \
315             sp16, sp17, sp18, sp19, sp20, sp21, sp22, sp23, \
316             sp4, sp5, sp6, sp7, sp8, sp9, sp10, \
317             sp11, sp12, sp13, sp14, sp15] 
318
319m1 = [340000, 6256000]
320m2 = [342800, 6256000]
321m3 = [342800, 6261000]
322m4 = [340000, 6260000]
323   
324finepolymanly = [m1, m2, m3, m4]
325
326q1 = [333000, 6250000]
327q2 = [340000, 6250000]
328q3 = [340000, 6254000]
329q4 = [333000, 6255000]
330   
331finepolyquay = [q1, q2, q3, q4]
332
333# refined 13/03/06 to look at effect of finer resolution on no IC scenario
334q2south = [340000, 6249000]
335newpoly1 = [np28, np29, q2south, sp7, sp8, sp5, sp6, np30, \
336            np5, np6, np7, np8, np9, np10, \
337            np11, np12, np13, np14, np15, \
338            np27, np26, np25, np24, np17, \
339            np33, \
340            np19, np20, np21, np22, np31, np32, \
341            np36, np37, np38, np39, np2, np3]
342
343#Interior regions - the Harbour
344harbour_1x = degminsec2decimal_degrees(-33,51,0)
345harbour_1y = degminsec2decimal_degrees(151,2,30)
346harbour_12x = degminsec2decimal_degrees(-33,51,0)
347harbour_12y = degminsec2decimal_degrees(151,5,0)
348harbour_13x = degminsec2decimal_degrees(-33,52,15)
349harbour_13y = degminsec2decimal_degrees(151,5,0)
350harbour_2x = degminsec2decimal_degrees(-33,53,0)
351harbour_2y = degminsec2decimal_degrees(151,17,20)
352harbour_3x = degminsec2decimal_degrees(-33,47,0)
353harbour_3y = degminsec2decimal_degrees(151,20,30)
354harbour_4x = degminsec2decimal_degrees(-33,47,50)
355harbour_4y = degminsec2decimal_degrees(151,8,10)
356harbour_5x = degminsec2decimal_degrees(-33,48,10)
357harbour_5y = degminsec2decimal_degrees(151,8,0)
358harbour_6x = degminsec2decimal_degrees(-33,49,0)
359harbour_6y = degminsec2decimal_degrees(151,2,30)
360harbour_7x = degminsec2decimal_degrees(-33,34,30)
361harbour_7y = degminsec2decimal_degrees(151,20,20)
362harbour_8x = degminsec2decimal_degrees(-33,33,30)
363harbour_8y = degminsec2decimal_degrees(151,17,0)
364harbour_9x = degminsec2decimal_degrees(-33,45,30)
365harbour_9y = degminsec2decimal_degrees(151,17,0)
366harbour_10x = degminsec2decimal_degrees(-33,45,10)
367harbour_10y = degminsec2decimal_degrees(151,11,40)
368harbour_11x = degminsec2decimal_degrees(-33,45,10)
369harbour_11y = degminsec2decimal_degrees(151,11,40)
370harbour_14x = degminsec2decimal_degrees(-33,49,10)
371harbour_14y = degminsec2decimal_degrees(151,11,40)
372harbour_15x = degminsec2decimal_degrees(-33,48,55)
373harbour_15y = degminsec2decimal_degrees(151,2,30)
374
375k02 = [harbour_1x, harbour_1y]
376k12 = [harbour_2x, harbour_2y]
377k22 = [harbour_3x, harbour_3y]
378k32 = [harbour_4x, harbour_4y]
379k42 = [harbour_5x, harbour_5y]
380k52 = [harbour_6x, harbour_6y]
381k62 = [harbour_7x, harbour_7y]
382k72 = [harbour_8x, harbour_8y]
383k82 = [harbour_9x, harbour_9y]
384k92 = [harbour_10x, harbour_10y]
385k102 = [harbour_11x, harbour_11y]
386k112 = [harbour_12x, harbour_12y]
387k122 = [harbour_13x, harbour_13y]
388k132 = [harbour_14x, harbour_14y]
389k142 = [harbour_15x, harbour_15y]
390
391harbour_polygon_2, zone = convert_from_latlon_to_utm([k02, k112, k122, k12, k22, k62, k72, k82, k102, k42, k52]) #worked
392assert zone == refzone
393
394
395#Interior region - Botany Bay
396bb_1x = degminsec2decimal_degrees(-34,3,0)
397bb_1y = degminsec2decimal_degrees(151,2,30)
398bb_10x = degminsec2decimal_degrees(-34,3,0)
399bb_10y = degminsec2decimal_degrees(151,8,0)
400bb_2x = degminsec2decimal_degrees(-34,3,0)
401bb_2y = degminsec2decimal_degrees(151,14,0)
402bb_3x = degminsec2decimal_degrees(-33,53,30)
403bb_3y = degminsec2decimal_degrees(151,17,20)
404bb_4x = degminsec2decimal_degrees(-33,53,0)
405bb_4y = degminsec2decimal_degrees(151,8,0)
406bb_5x = degminsec2decimal_degrees(-33,57,30)
407bb_5y = degminsec2decimal_degrees(151,8,0)
408bb_6x = degminsec2decimal_degrees(-33,57,30)
409bb_6y = degminsec2decimal_degrees(151,2,30) 
410bb_7x = degminsec2decimal_degrees(-33,53,30)
411bb_7y = degminsec2decimal_degrees(151,12,30) 
412bb_8x = degminsec2decimal_degrees(-33,55,20)
413bb_8y = degminsec2decimal_degrees(151,8,0) 
414bb_9x = degminsec2decimal_degrees(-33,55,20)
415bb_9y = degminsec2decimal_degrees(151,12,30) 
416
417j02 = [bb_1x, bb_1y]
418j12 = [bb_2x, bb_2y]
419j22 = [bb_3x, bb_3y]
420j32 = [bb_4x, bb_4y]
421j42 = [bb_5x, bb_5y]
422j52 = [bb_6x, bb_6y]
423j62 = [bb_7x, bb_7y]
424j72 = [bb_8x, bb_8y]
425j82 = [bb_9x, bb_9y]
426j92 = [bb_10x, bb_10y]
427
428botanybay_polygon_2, zone = convert_from_latlon_to_utm([j92, j12, j22, j62, j82, j72, j42]) # worked
429
430
431# close to botany bay opening (340000,6236000)
432# x0 = 25964
433# y0 = 11049
434# around 10km from botany bay opening (350000,6236000)
435# x0 = 35964
436# y0 = 11049
437# around 21km from botany bay opening (361000,6236000)
438#x0 = 46964
439#y0 = 11049
440
441# not used for sydney scenario, original interior regions listed though
442# setting up problem area for doing just around the harbour
443hsouth = degminsec2decimal_degrees(-33,54,0)
444hnorth = degminsec2decimal_degrees(-33,48,0)
445hwest = degminsec2decimal_degrees(151,0,0)
446heast = degminsec2decimal_degrees(151,30,0)
447
448hp0 = [hsouth, hwest]
449hp1 = [hsouth, heast]
450hp2 = [hnorth, heast]
451hp3 = [hnorth, hwest]
452polygon_h, zone = convert_from_latlon_to_utm([hp0, hp1, hp2, hp3])
453
454#Interior regions - the Harbour - take 1
455harbour_south = degminsec2decimal_degrees(-33,53,0)
456harbour_north = degminsec2decimal_degrees(-33,47,0)
457harbour_west = degminsec2decimal_degrees(151,5,0)
458harbour_east = degminsec2decimal_degrees(151,19,0)
459
460#harbour_south1 = degminsec2decimal_degrees(-33,53,0)
461#harbour_south2 = degminsec2decimal_degrees(-33,52,0)
462#harbour_north1 = degminsec2decimal_degrees(-33,45,0)
463#harbour_north2 = degminsec2decimal_degrees(-33,48,0)
464#harbour_west = degminsec2decimal_degrees(151,5,0)
465#harbour_east = degminsec2decimal_degrees(151,19,0)
466
467k0 = [harbour_south, harbour_west]
468k1 = [harbour_south, harbour_east]
469k2 = [harbour_north, harbour_east]
470k3 = [harbour_north, harbour_west]   
471
472harbour_polygon, zone = convert_from_latlon_to_utm([k0, k1, k2, k3])
473
474# setting up problem area for doing just around Botany Bay
475bsouth = degminsec2decimal_degrees(-33,56,0)
476bnorth = degminsec2decimal_degrees(-34,3,0)
477bwest = degminsec2decimal_degrees(151,0,0)
478beast = degminsec2decimal_degrees(151,30,0)
479
480bp0 = [bsouth, bwest]
481bp1 = [bsouth, beast]
482bp2 = [bnorth, beast]
483bp3 = [bnorth, bwest]
484polygon_bb, zone = convert_from_latlon_to_utm([bp0, bp1, bp2, bp3])
485
486#Interior region - Botany Bay - take 1
487botanybay_south = degminsec2decimal_degrees(-33,58,0)
488botanybay_north = degminsec2decimal_degrees(-34,1,0)
489botanybay_west = degminsec2decimal_degrees(151,5,0)
490botanybay_east = degminsec2decimal_degrees(151,18,0)
491
492j0 = [botanybay_south, botanybay_west]
493j1 = [botanybay_south, botanybay_east]
494j2 = [botanybay_north, botanybay_east]
495j3 = [botanybay_north, botanybay_west]   
496
497botanybay_polygon, zone = convert_from_latlon_to_utm([j0, j1, j2, j3])
498assert zone == refzone
499
500#x0 = 28964 + 42000
501#y0 = 30049
502#slump_origin = [x0+314036.58727982, y0+6224951.2960092] #Absolute UTM
503slump_origin = [385000.0, 6255000.0] #Absolute UTM
504# move 10km west
505slump_origin2 = [375000.0, 6255000.0] #Absolute UTM
506
507a = [340000, 6255000]
508b = [340000, 6270000]
509c = [318000, 6255000]
510d = [318000, 6270000]
511e = [316000, 6255000]
512f = [395000, 6255000]
513g = [355000, 6280000]
514h = [355000, 6224000]
515test_pts = [a, b, c, d, e, f, g, h]
516test_elev = [1.0, 4.0, 3.0, 0.1, 5, -10.0, -20, -15]
Note: See TracBrowser for help on using the repository browser.