source: production/onslow_2006/project.py @ 3241

Last change on this file since 3241 was 3188, checked in by sexton, 19 years ago

make gauges to compare MOST and ANUGA time series

File size: 6.6 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 utilities.polygon import read_polygon
8import sys
9
10from pmesh.create_mesh import convert_points_from_latlon_to_utm
11
12from coordinate_transforms.redfearn import degminsec2decimal_degrees
13
14from time import localtime, strftime
15
16from os import getcwd
17               
18#Making assumptions about the location of scenario data
19scenario_dir_name = 'onslow_tsunami_scenario_2006'
20
21# 250m data to be provided
22coarsename = 'onsl_bathydem250' # get from Neil/Ingo (DEM or topo data)
23
24# 30m data to be provided
25onshore_name = 'onslow_onshore_30m_dted' # get from Neil/Ingo (DEM or topo data)
26
27offshore_name = 'onslow_offshore_points'
28
29boundary_basename = 'SU-AU_clip'
30
31#swollen/ all data output
32basename = 'source'
33
34codename = 'project.py'
35
36if sys.platform == 'win32':
37    home = environ['INUNDATIONHOME']     #Sandpit's parent dir
38    comparehome = environ['ANUGAHOME']
39else:   
40    home = environ['INUNDATIONHOME']     #Sandpit's parent dir
41#    home = expanduser('~')
42
43#Derive subdirectories and filenames
44time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
45outputtimedir = home+sep+scenario_dir_name+sep+'output'+sep+time+sep
46meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep
47datadir = home+sep+scenario_dir_name+sep+'topographies'+sep
48gaugedir = home+sep+scenario_dir_name+sep+'gauges'+sep
49polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep
50boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep
51#output dir without time
52outputdir = home+sep+scenario_dir_name+sep+'output'+sep
53tidedir = home+sep+scenario_dir_name+sep+'tide_data'+sep
54comparereportdir = comparehome+sep+'documentation'+sep+'experimentation'+sep+'boundary_ANUGA_MOST'+sep+'report'
55comparereportfigdir = comparehome+sep+'documentation'+sep+'experimentation'+sep+'boundary_ANUGA_MOST'+sep+'report_figures'
56print'bound', boundarydir
57
58#gauge_filename = gaugedir + 'onslow_gauges.xya'
59#for MOST
60gauge_filename = gaugedir + 'gauge_location_onslow.csv'
61gauges50 = gaugedir + '50_gauges.xya'
62gauge_comparison = gaugedir + 'MOST_comparison_gauges.xya'
63gauge_comparison_3d = gaugedir + 'MOST_comparison_gauges_3d.xya'
64community_filename = gaugedir + 'CHINS_v2.csv'
65community_scenario = gaugedir + 'community_onslow.csv'
66buildings_filename = gaugedir + 'onslow_res.csv'
67community_filename = gaugedir + 'CHINS_v2.csv'
68community_scenario = gaugedir + 'community_onslow.csv'
69
70
71gaugetimeseries = gaugedir + 'onslow'
72
73tidal_filename = tidedir + 'onsl.txt'
74tidal_outname = tidedir + 'max_min.txt'
75
76# boundary source data
77#MOST_dir = 'f:'+sep+'3'+sep+'ehn'+sep+'users'+sep+'davidb'+sep+'tsunami'+sep+'WA_project'+sep+'SU-AU_90'+sep+'most_2'+sep+'detailed'+sep
78
79codedir = getcwd()+sep
80                               
81codedirname = codedir + 'project.py'
82
83meshname = meshdir + basename
84
85coarsedemname = datadir + coarsename
86
87onshore_dem_name = datadir + onshore_name
88
89offshore_dem_name = datadir + offshore_name
90
91combined_dem_name = datadir + 'onslow_combined_elevation'
92
93outputname = outputtimedir + basename  #Used by post processing
94
95#!gauge_filename = outputdir + 'onslow_gauges.xya'
96#!gauge_outname = outputdir + 'gauges_max_output.xya'
97
98# clipping region to make DEM (pts file) from fine elevation data
99eastingmin = 240000
100eastingmax = 340000
101northingmin = 7580000
102northingmax = 7700000
103
104south = degminsec2decimal_degrees(-22,15,0)
105north = degminsec2decimal_degrees(-20,30,0)
106west = degminsec2decimal_degrees(114,15,0)
107east = degminsec2decimal_degrees(115,50,0)
108'''
109# region for visualisation
110eminviz = 260000
111emaxviz = 320000
112nminviz = 7590000
113nmaxviz = 7630000
114'''
115# region to export
116
117e_min_area = 300000
118e_max_area = 310000
119n_min_area = 7600000
120n_max_area = 7610000
121
122#Georeferencing
123from coordinate_transforms.redfearn import degminsec2decimal_degrees
124
125refzone = 50
126
127#Updated Main Domain of Onslow: first run NB 6/4/06
128d0 = [310000, 7690000]
129d1 = [280000, 7690000]
130d2 = [270000, 7645000]
131d3 = [240000, 7625000]
132d4 = [270000, 7580000]
133d5 = [300000, 7590000]
134d6 = [340000, 7610000]
135
136polyAll = [d0, d1, d2, d3, d4, d5, d6]
137
138#Interior region - Onslow town
139
140#i0 = [304000, 7608000]
141i0 = [304000, 7607000]
142i1 = [302000, 7605000]
143#i2 = [303000, 7602000]
144i2 = [304000, 7603000]
145#i3 = [305000, 7601000]
146i3 = [307000, 7602000]
147i4 = [309000, 7603000]
148#i5 = [307000, 7606500]
149i5 = [307000, 7606000]
150
151poly_onslow = [i0, i1, i2, i3, i4, i5]
152
153#Thevenard Island
154j0 = [294000, 7629000]
155j1 = [285000, 7625000]
156j2 = [294000, 7621000]
157j3 = [299000, 7625000]
158
159poly_thevenard = [j0, j1, j2, j3]
160
161'''
162# Direction Is
163k0 = [309000, 7619000]
164k1 = [304000, 7619000]
165k2 = [304000, 7616500]
166k3 = [309000, 7616500]
167
168poly_direction = [k0, k1, k2, k3]
169'''
170
171#med res around onslow
172l0 = [300000, 7610000]
173l1 = [285000, 7600000]
174l2 = [300000, 7597500]
175l3 = [310000, 7600000]
176l4 = [315000, 7610000]
177#l5 = [310000, 7612500]
178
179#poly_coast = [l0, l1, l2, l3, l4, l5]
180poly_coast = [l0, l1, l2, l3, l4]
181
182#general coast and local area to onslow region
183m0 = [270000, 7581000]
184m1 = [300000, 7591000]
185m2 = [339000, 7610000]
186m3 = [330000, 7630000]
187m4 = [290000, 7640000]
188m5 = [260000, 7600000]
189
190poly_region = [m0, m1, m2, m3, m4, m5]
191
192from coordinate_transforms.redfearn import redfearn
193# boundary up to 50 m contour
194lat1_50 = degminsec2decimal_degrees(-21,30,0)
195lat2_50 = degminsec2decimal_degrees(-21,25,0)
196lat3_50 = degminsec2decimal_degrees(-21,12,0)
197lat4_50 = degminsec2decimal_degrees(-21,0,0)
198lon1_50 = degminsec2decimal_degrees(114,40,0)
199lon2_50 = degminsec2decimal_degrees(114,49,0)
200lon3_50 = degminsec2decimal_degrees(115,1,0)
201lon4_50 = degminsec2decimal_degrees(115,9,0)
202z, easting, northing = redfearn(lat1_50, lon1_50)
203p0_50 = [easting, northing]
204z, easting, northing = redfearn(lat2_50, lon2_50)
205p1_50 = [easting, northing]
206z, easting, northing= redfearn(lat3_50, lon3_50)
207p2_50 = [easting, northing]
208z, easting, northing = redfearn(lat4_50, lon4_50)
209p3_50 = [easting, northing]
210
211d4_50 = [285000, 7585000]
212d6_50 = [330000, 7605000]
213bounding_poly50 = [p0_50, p1_50, p2_50, p3_50, d6_50, d5, d4_50]
214
215# boundary up to 25 m contour
216lat1_25 = degminsec2decimal_degrees(-21,30,0)
217lat2_25 = degminsec2decimal_degrees(-21,24,0)
218lat3_25 = degminsec2decimal_degrees(-21,3,0)
219lon1_25 = degminsec2decimal_degrees(114,46,0)
220lon2_25 = degminsec2decimal_degrees(114,53,0)
221lon3_25 = degminsec2decimal_degrees(115,9,0)
222z, easting, northing = redfearn(lat1_25, lon1_25)
223p0_25 = [easting, northing]
224z, easting, northing = redfearn(lat2_25, lon2_25)
225p1_25 = [easting, northing]
226z, easting, northing = redfearn(lat3_25, lon3_25)
227p2_25 = [easting, northing]
228bounding_poly25 = [p0_25, p1_25, p2_25, d6, d5, d4]
Note: See TracBrowser for help on using the repository browser.