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