source: production/onslow_2006/project.py @ 3159

Last change on this file since 3159 was 3158, checked in by sexton, 19 years ago

including pic to investigate incoming MOST wave

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