source: anuga_work/production/MOST_example/project.py @ 3600

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

comitting onslow work, before switching over to pt hedland

File size: 6.7 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 os import mkdir, access, F_OK
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    home = 'O:'+sep+'2'+sep+'cit'+sep+'inundation'+sep+'data'     
43#    python_home = getenv('PWD')     
44#    home = environ['INUNDATIONHOME']     #Sandpit's parent dir
45    user = getenv('USERPROFILE')
46#    user = basename(user_path)
47   
48else:   
49    home = sep+'d'+sep+'cit'+sep+'2'+sep+'cit'+sep+'inundation'+sep+'data'
50    user = getenv('LOGNAME')
51    print 'USER:', user
52home = '.'
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
56statedir = home+sep+state
57scenariodir = home+sep+state+sep+scenario_dir_name
58anugadir = scenariodir+sep+'anuga'
59meshdir = scenariodir+sep+'anuga'+sep+'meshes'+sep
60datadir = scenariodir+sep+'anuga'+sep+'topographies'+sep
61gaugedir = scenariodir+sep+'anuga'+sep+'gauges'+sep
62polygondir = scenariodir+sep+'anuga'+sep+'polygons'+sep
63boundarydir = scenariodir+sep+'anuga'+sep+'boundaries'+sep
64#output dir without time
65outputdir = scenariodir+sep+'anuga'+sep+'outputs'+sep
66tidedir = scenariodir+sep+'anuga'+sep+'tide_data'+sep
67comparereportdir = '..'+sep+'..'+sep+'documentation'+sep+'experimentation'+sep+'boundary_ANUGA_MOST'+sep+'report'
68
69outputtimedir = outputdir + local_time + sep
70
71
72
73# creates copy of output dir structure, if it doesn't exist
74if not access(statedir,F_OK):
75    mkdir (statedir)
76
77if not access(scenariodir,F_OK):
78    mkdir (scenariodir)
79   
80if not access(anugadir,F_OK):
81    mkdir (anugadir)
82     
83#if not access(meshdir,F_OK):
84#    mkdir (meshdir)
85
86if not access(outputdir,F_OK):
87    mkdir (outputdir)
88       
89if not access(outputtimedir,F_OK):
90    mkdir (outputtimedir)
91print'bound', boundarydir
92
93#gauge_filename = gaugedir + 'onslow_gauges.xya'
94#for MOST
95gauge_filename = gaugedir + 'gauge_location_onslow.csv'
96gauges50 = gaugedir + '50_gauges.xya'
97gauge_comparison = gaugedir + 'MOST_comparison_gauges.xya'
98gauge_comparison_3d = gaugedir + 'MOST_comparison_gauges_3d.xya'
99community_filename = gaugedir + 'CHINS_v2.csv'
100community_scenario = gaugedir + 'community_onslow.csv'
101#buildings_filename = gaugedir + 'onslow_res.csv'
102buildings_filename = gaugedir + 'extra_points_nbed.csv'
103#buildings_filename_out = gaugedir + 'onslow_res_modified.csv'
104buildings_filename_damage_out = 'extra_points_nbed_modified.csv'
105
106gaugetimeseries = gaugedir + 'onslow'
107
108tidal_filename = tidedir + 'onsl.txt'
109tidal_outname = tidedir + 'max_min.txt'
110
111# boundary source data
112#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
113
114codedir = getcwd()+sep
115                               
116codedirname = codedir + 'project.py'
117
118#meshname = meshdir + basename
119meshname = outputtimedir + 'mesh_' + basename
120print 'meshname',meshname
121coarsedemname = datadir + coarsename
122
123onshore_dem_name = datadir + onshore_name_dli
124
125offshore_dem_name = datadir + offshore_name
126coast_dem_name = datadir + coast_name
127islands_dem_name = datadir + islands_name
128combined_dem_name = datadir + 'onslow_combined_elevation'
129
130outputname = outputtimedir + basename  #Used by post processing
131
132#!gauge_filename = outputdir + 'onslow_gauges.xya'
133#!gauge_outname = outputdir + 'gauges_max_output.xya'
134
135# clipping region to make DEM (pts file) from fine elevation data
136eastingmin = 240000
137eastingmax = 340000
138northingmin = 7580000
139northingmax = 7700000
140
141south = degminsec2decimal_degrees(-22,15,0)
142north = degminsec2decimal_degrees(-20,30,0)
143west = degminsec2decimal_degrees(114,15,0)
144east = degminsec2decimal_degrees(115,50,0)
145'''
146# region for visualisation
147eminviz = 260000
148emaxviz = 320000
149nminviz = 7590000
150nmaxviz = 7630000
151'''
152# region to export
153
154e_min_area = 300000
155e_max_area = 310000
156n_min_area = 7600000
157n_max_area = 7610000
158
159#Georeferencing
160from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees
161
162refzone = 50
163
164#Updated Main Domain of Onslow: first run NB 6/4/06
165d0 = [310000, 7690000]
166d1 = [280000, 7690000]
167d2 = [270000, 7645000]
168d3 = [240000, 7625000]
169d4 = [270000, 7580000]
170d5 = [300000, 7590000]
171d6 = [340000, 7610000]
172
173polyAll = [d0, d1, d2, d3, d4, d5, d6]
174
175#Interior region - Onslow town
176
177#first run!
178#i0 = [304000, 7608000]
179#i1 = [302000, 7605000]
180#i2 = [303000, 7602000]
181#i3 = [305000, 7601000]
182#i4 = [309000, 7603000]
183#i5 = [307000, 7606500]
184
185#refined run
186#i0 = [304000, 7607000]
187#i1 = [302000, 7605000]
188#i2 = [304000, 7603000]
189#i3 = [307000, 7602000]
190#i4 = [309000, 7603000]
191#i5 = [307000, 7606000]
192
193#for visualisation
194#i0 = [304000, 7609000]
195#i1 = [301500, 7605000]
196#i2 = [304000, 7603000]
197#i3 = [307000, 7602000]
198#i4 = [309000, 7603000]
199#i5 = [311000, 7607000]
200
201#i0 = [304000, 7608000]
202i0 = [304000, 7607000]
203i1 = [302000, 7605000]
204#i2 = [303000, 7602000]
205i2 = [304000, 7603000]
206#i3 = [305000, 7601000]
207i3 = [307000, 7602000]
208i4 = [309000, 7603000]
209#i5 = [307000, 7606500]
210i5 = [307000, 7606000]
211
212
213poly_onslow = [i0, i1, i2, i3, i4, i5]
214
215#Thevenard Island
216j0 = [294000, 7629000]
217j1 = [285000, 7625000]
218j2 = [294000, 7621000]
219j3 = [299000, 7625000]
220
221poly_thevenard = [j0, j1, j2, j3]
222
223'''
224# Direction Is
225k0 = [309000, 7619000]
226k1 = [304000, 7619000]
227k2 = [304000, 7616500]
228k3 = [309000, 7616500]
229
230poly_direction = [k0, k1, k2, k3]
231'''
232
233#med res around onslow
234l0 = [300000, 7610000]
235l1 = [285000, 7600000]
236l2 = [300000, 7597500]
237l3 = [310000, 7600000]
238l4 = [315000, 7610000]
239#l5 = [310000, 7612500]
240
241#poly_coast = [l0, l1, l2, l3, l4, l5]
242poly_coast = [l0, l1, l2, l3, l4]
243
244#general coast and local area to onslow region
245m0 = [270000, 7581000]
246m1 = [300000, 7591000]
247m2 = [339000, 7610000]
248m3 = [330000, 7630000]
249m4 = [290000, 7640000]
250m5 = [260000, 7600000]
251
252poly_region = [m0, m1, m2, m3, m4, m5]
Note: See TracBrowser for help on using the repository browser.