source: production/onslow_2006/project.py @ 3535

Last change on this file since 3535 was 3535, checked in by duncan, 18 years ago

change imports so reflect the new structure

File size: 6.3 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 anuga.utilities.polygon import read_polygon
8import sys
9
10from anuga.pmesh.create_mesh import convert_points_from_latlon_to_utm
11
12from anuga.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'
78#buildings_filename = gaugedir + 'onslow_res.csv'
79buildings_filename = gaugedir + 'extra_points_nbed.csv'
80#buildings_filename_out = gaugedir + 'onslow_res_modified.csv'
81buildings_filename_damage_out = 'extra_points_nbed_modified.csv'
82
83gaugetimeseries = gaugedir + 'onslow'
84
85tidal_filename = tidedir + 'onsl.txt'
86tidal_outname = tidedir + 'max_min.txt'
87
88# boundary source data
89#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
90
91codedir = getcwd()+sep
92                               
93codedirname = codedir + 'project.py'
94
95#meshname = meshdir + basename
96meshname = outputtimedir + 'mesh_' + basename
97print 'meshname',meshname
98coarsedemname = datadir + coarsename
99
100onshore_dem_name = datadir + onshore_name_dli
101
102offshore_dem_name = datadir + offshore_name
103coast_dem_name = datadir + coast_name
104islands_dem_name = datadir + islands_name
105combined_dem_name = datadir + 'onslow_combined_elevation'
106
107outputname = outputtimedir + basename  #Used by post processing
108
109#!gauge_filename = outputdir + 'onslow_gauges.xya'
110#!gauge_outname = outputdir + 'gauges_max_output.xya'
111
112# clipping region to make DEM (pts file) from fine elevation data
113eastingmin = 240000
114eastingmax = 340000
115northingmin = 7580000
116northingmax = 7700000
117
118south = degminsec2decimal_degrees(-22,15,0)
119north = degminsec2decimal_degrees(-20,30,0)
120west = degminsec2decimal_degrees(114,15,0)
121east = degminsec2decimal_degrees(115,50,0)
122'''
123# region for visualisation
124eminviz = 260000
125emaxviz = 320000
126nminviz = 7590000
127nmaxviz = 7630000
128'''
129# region to export
130
131e_min_area = 300000
132e_max_area = 310000
133n_min_area = 7600000
134n_max_area = 7610000
135
136#Georeferencing
137from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees
138
139refzone = 50
140
141#Updated Main Domain of Onslow: first run NB 6/4/06
142d0 = [310000, 7690000]
143d1 = [280000, 7690000]
144d2 = [270000, 7645000]
145d3 = [240000, 7625000]
146d4 = [270000, 7580000]
147d5 = [300000, 7590000]
148d6 = [340000, 7610000]
149
150polyAll = [d0, d1, d2, d3, d4, d5, d6]
151
152#Interior region - Onslow town
153
154#first run!
155#i0 = [304000, 7608000]
156#i1 = [302000, 7605000]
157#i2 = [303000, 7602000]
158#i3 = [305000, 7601000]
159#i4 = [309000, 7603000]
160#i5 = [307000, 7606500]
161
162#refined run
163#i0 = [304000, 7607000]
164#i1 = [302000, 7605000]
165#i2 = [304000, 7603000]
166#i3 = [307000, 7602000]
167#i4 = [309000, 7603000]
168#i5 = [307000, 7606000]
169
170#for visualisation
171#i0 = [304000, 7609000]
172#i1 = [301500, 7605000]
173#i2 = [304000, 7603000]
174#i3 = [307000, 7602000]
175#i4 = [309000, 7603000]
176#i5 = [311000, 7607000]
177
178#i0 = [304000, 7608000]
179i0 = [304000, 7607000]
180i1 = [302000, 7605000]
181#i2 = [303000, 7602000]
182i2 = [304000, 7603000]
183#i3 = [305000, 7601000]
184i3 = [307000, 7602000]
185i4 = [309000, 7603000]
186#i5 = [307000, 7606500]
187i5 = [307000, 7606000]
188
189
190poly_onslow = [i0, i1, i2, i3, i4, i5]
191
192#Thevenard Island
193j0 = [294000, 7629000]
194j1 = [285000, 7625000]
195j2 = [294000, 7621000]
196j3 = [299000, 7625000]
197
198poly_thevenard = [j0, j1, j2, j3]
199
200'''
201# Direction Is
202k0 = [309000, 7619000]
203k1 = [304000, 7619000]
204k2 = [304000, 7616500]
205k3 = [309000, 7616500]
206
207poly_direction = [k0, k1, k2, k3]
208'''
209
210#med res around onslow
211l0 = [300000, 7610000]
212l1 = [285000, 7600000]
213l2 = [300000, 7597500]
214l3 = [310000, 7600000]
215l4 = [315000, 7610000]
216#l5 = [310000, 7612500]
217
218#poly_coast = [l0, l1, l2, l3, l4, l5]
219poly_coast = [l0, l1, l2, l3, l4]
220
221#general coast and local area to onslow region
222m0 = [270000, 7581000]
223m1 = [300000, 7591000]
224m2 = [339000, 7610000]
225m3 = [330000, 7630000]
226m4 = [290000, 7640000]
227m5 = [260000, 7600000]
228
229poly_region = [m0, m1, m2, m3, m4, m5]
Note: See TracBrowser for help on using the repository browser.