source: production/onslow_2006/project.py @ 3270

Last change on this file since 3270 was 3270, checked in by sexton, 17 years ago

updates to Onslow report

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