source: anuga_work/production/dampier_2006/project_original.py @ 4164

Last change on this file since 4164 was 3827, checked in by nick, 18 years ago

more dampier

File size: 7.7 KB
Line 
1"""Common filenames and locations for topographic data, meshes and outputs.
2"""
3
4import sys
5from os import sep, environ, getenv, getcwd
6from os.path import expanduser, basename
7
8from anuga.coordinate_transforms.redfearn import\
9     degminsec2decimal_degrees,\
10     convert_from_latlon_to_utm
11
12from time import localtime, strftime
13from anuga.geospatial_data.geospatial_data import *
14
15# Location and naming of scenario data
16state = 'western_australia'
17scenario_dir_name = 'dampier_tsunami_scenario_2006'
18#scenario_dir_name = 'karratha_tsunami_scenario_2005' # Tmp location
19
20basename = 'elevation50m'
21boundary_basename = 'dampier'
22
23
24# Data output
25codename = 'project.py'
26
27home = getenv('INUNDATIONHOME') #Sandpit's parent dir   
28
29if sys.platform == 'win32':
30    user = getenv('USERPROFILE')
31else:
32    user = getenv('LOGNAME')
33
34# INUNDATIONHOME is the inundation directory, not the data directory.
35home += sep +'data'
36
37#Derive subdirectories and filenames
38print 'home',home
39time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
40outputtimedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep+time+sep
41
42meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
43datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
44gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
45polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
46boundarydir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep+'urs'+sep+'test'+sep
47outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep
48tidedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'tide_data'+sep
49
50#gauge_filename = gaugedir + 'gauge_location_broome.csv'
51
52meshname = meshdir + basename
53outputname = outputtimedir + basename  #Used by post processing
54boundaryname = boundarydir + boundary_basename  #Used by post processing
55
56
57
58
59# Regions
60
61refzone = 50 
62south = degminsec2decimal_degrees(-20,55,0)
63north = degminsec2decimal_degrees(-20,15,0)
64west = degminsec2decimal_degrees(116,17,0)
65east = degminsec2decimal_degrees(117,10,0)
66
67p0 = [south, degminsec2decimal_degrees(116,32,0)]
68p1 = [south, west]
69p2 = [degminsec2decimal_degrees(-20,23,0), west]
70p3 = [north, degminsec2decimal_degrees(116,45,0)]
71p4 = [north, degminsec2decimal_degrees(117,0,0)]
72p5 = [p2[0], degminsec2decimal_degrees(117,8,0)]
73p6 = [degminsec2decimal_degrees(-20,30,0), east]
74p7 = [degminsec2decimal_degrees(-20,38,0), east]
75p8 = [south, east]
76
77
78bounding_polygon, zone =\
79                  convert_from_latlon_to_utm([p0, p1, p2, p3, p4,
80                                              p5, p6, p7, p8])
81refzone = zone
82
83
84#Interior regions
85
86# CIPMA point of interest
87cipma_latitude = -20.588456
88cipma_longitude = 116.771527
89
90
91k0 = [cipma_latitude-0.02, cipma_longitude-0.02]
92k1 = [cipma_latitude-0.02, cipma_longitude+0.02]
93k2 = [cipma_latitude+0.02, cipma_longitude+0.02]
94k3 = [cipma_latitude+0.02, cipma_longitude-0.02]
95
96cipma_polygon, zone = convert_from_latlon_to_utm([k0, k1, k2, k3])
97assert zone == refzone
98
99e_min_area = 474000
100e_max_area = 480000
101n_min_area = 7719000
102n_max_area = 7725000
103
104#Interior regions
105karratha_south = degminsec2decimal_degrees(-20,44,0)
106karratha_north = degminsec2decimal_degrees(-20,42,0)
107karratha_west = degminsec2decimal_degrees(116,48,0)
108karratha_east = degminsec2decimal_degrees(116,53,30)
109
110k0 = [karratha_south, karratha_west]
111k1 = [karratha_south, karratha_east]
112k2 = [karratha_north, karratha_east]
113k3 = [karratha_north, karratha_west]   
114
115karratha_polygon, zone = convert_from_latlon_to_utm([k0, k1, k2, k3])
116assert zone == refzone
117
118
119#Interior regions
120dampier_south = degminsec2decimal_degrees(-20,40,0)
121dampier_north = degminsec2decimal_degrees(-20,38,10)
122dampier_west = degminsec2decimal_degrees(116,43,0)
123dampier_east = degminsec2decimal_degrees(116,45,0)
124
125d0 = [dampier_south, dampier_west]
126d1 = [dampier_south, dampier_east]
127d2 = [dampier_north, dampier_east]
128d3 = [dampier_north, dampier_west]   
129
130dampier_polygon, zone = convert_from_latlon_to_utm([d0, d1, d2, d3])
131assert zone == refzone
132
133
134#Interior regions
135refinery_south = degminsec2decimal_degrees(-20,37,50)
136refinery_north = degminsec2decimal_degrees(-20,36,0)
137refinery_west = degminsec2decimal_degrees(116,44,0)
138refinery_east = degminsec2decimal_degrees(116,46,10)
139
140d0 = [refinery_south, refinery_west]
141d1 = [refinery_south, refinery_east]
142d2 = [refinery_north, refinery_east]
143d3 = [refinery_north, refinery_west]   
144
145refinery_polygon, zone = convert_from_latlon_to_utm([d0, d1, d2, d3])
146assert zone == refzone
147
148
149#Interior region around 468899, 7715177:
150#lat (-20, 39, 44.93753), lon (116, 42, 5.09106)
151
152point_south = degminsec2decimal_degrees(-20,39,46)
153point_north = degminsec2decimal_degrees(-20,39,42)
154point_west = degminsec2decimal_degrees(116,42,0)
155point_east = degminsec2decimal_degrees(116,42,10)
156
157d0 = [point_south, point_west]
158d1 = [point_south, point_east]
159d2 = [point_north, point_east]
160d3 = [point_north, point_west]   
161
162point_polygon, zone = convert_from_latlon_to_utm([d0, d1, d2, d3])
163assert zone == refzone
164
165
166#Neils areas around interesting points
167neil1_point1 = [degminsec2decimal_degrees(-20,35,34),
168                degminsec2decimal_degrees(116,45,18)]
169neil1_point2 = [degminsec2decimal_degrees(-20,36,15),
170                degminsec2decimal_degrees(116,46,18)]
171neil1_point3 = [degminsec2decimal_degrees(-20,35,9),
172                degminsec2decimal_degrees(116,47,17)]
173neil1_point4 = [degminsec2decimal_degrees(-20,34,26),
174                degminsec2decimal_degrees(116,46,17)]
175
176neil1_polygon, zone = convert_from_latlon_to_utm([neil1_point1,
177                                                  neil1_point2,
178                                                  neil1_point3,
179                                                  neil1_point4])
180assert zone == refzone
181
182
183
184
185neil2_point1 = [degminsec2decimal_degrees(-20,39,36),
186                degminsec2decimal_degrees(116,41,33)]
187neil2_point2 = [degminsec2decimal_degrees(-20,40,10),
188                degminsec2decimal_degrees(116,42,13)]
189neil2_point3 = [degminsec2decimal_degrees(-20,38,39),
190                degminsec2decimal_degrees(116,43,49)]
191neil2_point4 = [degminsec2decimal_degrees(-20,38,5),
192                degminsec2decimal_degrees(116,43,9)]
193
194neil2_polygon, zone = convert_from_latlon_to_utm([neil2_point1,
195                                                  neil2_point2,
196                                                  neil2_point3,
197                                                  neil2_point4])
198assert zone == refzone
199
200
201
202
203
204#Withnell bay
205wb_point1 = [degminsec2decimal_degrees(-20,35,34),
206                degminsec2decimal_degrees(116,45,18)]
207wb_point2 = [degminsec2decimal_degrees(-20,36,15),
208                degminsec2decimal_degrees(116,46,18)]
209wb_point3 = [degminsec2decimal_degrees(-20,35,9),
210                degminsec2decimal_degrees(116,47,17)]
211wb_point4 = [degminsec2decimal_degrees(-20,34,26),
212                degminsec2decimal_degrees(116,46,17)]
213
214wb_polygon, zone = convert_from_latlon_to_utm([wb_point1, wb_point2,
215                                               wb_point3, wb_point4])
216assert zone == refzone
217
218
219
220
221
222#Larger Withnell bay
223lwb_point1 = [degminsec2decimal_degrees(-20,35,59),
224                degminsec2decimal_degrees(116,42,00)]
225lwb_point2 = [degminsec2decimal_degrees(-20,36,50),
226                degminsec2decimal_degrees(116,46,50)]
227lwb_point3 = [degminsec2decimal_degrees(-20,34,00),
228                degminsec2decimal_degrees(116,47,39)]
229lwb_point4 = [degminsec2decimal_degrees(-20,33,00),
230                degminsec2decimal_degrees(116,42,50)]
231
232lwb_polygon, zone = convert_from_latlon_to_utm([lwb_point1, lwb_point2,
233                                                lwb_point3, lwb_point4])
234                                                     
235assert zone == refzone
236
237
238
239
Note: See TracBrowser for help on using the repository browser.