source: production/onslow_2006/project.py @ 3349

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

updates

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