source: anuga_work/production/onslow_2006/project.py @ 3669

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

reflecting PATH change in project scripts

File size: 7.0 KB
RevLine 
[2616]1"""Common filenames and locations for topographic data, meshes and outputs.
2Also includes origin for slump scenario.
3"""
4
[3249]5from os import sep, environ, getenv, getcwd
[2616]6from os.path import expanduser
[3514]7#from anuga.utilities.polygon import read_polygon
[2616]8import sys
9
[3650]10from anuga.coordinate_transforms.redfearn import convert_points_from_latlon_to_utm
[2616]11
[3535]12from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees
[2616]13
[3249]14from time import localtime, strftime, gmtime
[2616]15               
16#Making assumptions about the location of scenario data
[3270]17state = 'western_australia'
[2616]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
[3261]24onshore_name_dted = 'onslow_onshore_30m_dted2' # get from Neil/Ingo (DEM or topo data)
[2616]25
[3261]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'
[2616]31offshore_name = 'onslow_offshore_points'
32
[2645]33boundary_basename = 'SU-AU_clip'
[2616]34
35#swollen/ all data output
36basename = 'source'
37
38codename = 'project.py'
39
40if sys.platform == 'win32':
[3249]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   
[2616]47else:   
[3249]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
[2616]51
[3669]52# INUNDATIONHOME is the inundation directory, not the data directory.
53home += sep +'data'
54
[2616]55#Derive subdirectories and filenames
[3249]56#time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
57local_time = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir
58
[3270]59meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
60datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
61gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
62polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
63boundarydir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep
[2682]64#output dir without time
[3270]65outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep
66tidedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'tide_data'+sep
[3276]67comparereportdir = '..'+sep+'..'+sep+'documentation'+sep+'experimentation'+sep+'boundary_ANUGA_MOST'+sep+'report'
[3249]68
69outputtimedir = outputdir + local_time + sep
70
[2624]71print'bound', boundarydir
[2616]72
[2773]73#gauge_filename = gaugedir + 'onslow_gauges.xya'
74#for MOST
[2958]75gauge_filename = gaugedir + 'gauge_location_onslow.csv'
[3136]76gauges50 = gaugedir + '50_gauges.xya'
[3158]77gauge_comparison = gaugedir + 'MOST_comparison_gauges.xya'
[3188]78gauge_comparison_3d = gaugedir + 'MOST_comparison_gauges_3d.xya'
[3136]79community_filename = gaugedir + 'CHINS_v2.csv'
80community_scenario = gaugedir + 'community_onslow.csv'
[3391]81#buildings_filename = gaugedir + 'onslow_res.csv'
82buildings_filename = gaugedir + 'extra_points_nbed.csv'
83#buildings_filename_out = gaugedir + 'onslow_res_modified.csv'
[3396]84buildings_filename_damage_out = 'extra_points_nbed_modified.csv'
[3136]85
[2682]86gaugetimeseries = gaugedir + 'onslow'
87
[2721]88tidal_filename = tidedir + 'onsl.txt'
89tidal_outname = tidedir + 'max_min.txt'
90
[2624]91# boundary source data
[2645]92#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]93
[2616]94codedir = getcwd()+sep
95                               
96codedirname = codedir + 'project.py'
97
[3249]98#meshname = meshdir + basename
99meshname = outputtimedir + 'mesh_' + basename
100print 'meshname',meshname
[2616]101coarsedemname = datadir + coarsename
102
[3261]103onshore_dem_name = datadir + onshore_name_dli
[2616]104
105offshore_dem_name = datadir + offshore_name
[3261]106coast_dem_name = datadir + coast_name
107islands_dem_name = datadir + islands_name
[2616]108combined_dem_name = datadir + 'onslow_combined_elevation'
109
[2682]110outputname = outputtimedir + basename  #Used by post processing
[2616]111
112#!gauge_filename = outputdir + 'onslow_gauges.xya'
113#!gauge_outname = outputdir + 'gauges_max_output.xya'
114
[2682]115# clipping region to make DEM (pts file) from fine elevation data
116eastingmin = 240000
117eastingmax = 340000
[2616]118northingmin = 7580000
[2682]119northingmax = 7700000
[2616]120
[2773]121south = degminsec2decimal_degrees(-22,15,0)
[2683]122north = degminsec2decimal_degrees(-20,30,0)
[2773]123west = degminsec2decimal_degrees(114,15,0)
[2683]124east = degminsec2decimal_degrees(115,50,0)
[2682]125'''
[2616]126# region for visualisation
127eminviz = 260000
128emaxviz = 320000
129nminviz = 7590000
130nmaxviz = 7630000
[2682]131'''
132# region to export
[2616]133
[2773]134e_min_area = 300000
[2682]135e_max_area = 310000
[2773]136n_min_area = 7600000
137n_max_area = 7610000
[2682]138
[3669]139# region to export to make elevation map: JS 22/9/06 - NOTE, this won't
140# work as region needs to be inside bounding box (polyAll)!!
[3650]141
142e_min_area = 240000
143e_max_area = 340000
144n_min_area = 7580000
145n_max_area = 7690000
[3669]146export_region = [[e_min_area, n_min_area],
147                 [e_min_area, n_max_area],
148                 [e_max_area, n_max_area],
149                 [e_max_area, n_min_area]]
[2616]150#Georeferencing
[3535]151from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees
[2616]152
153refzone = 50
154
[2682]155#Updated Main Domain of Onslow: first run NB 6/4/06
156d0 = [310000, 7690000]
157d1 = [280000, 7690000]
158d2 = [270000, 7645000]
159d3 = [240000, 7625000]
160d4 = [270000, 7580000]
161d5 = [300000, 7590000]
162d6 = [340000, 7610000]
[2616]163
[2645]164polyAll = [d0, d1, d2, d3, d4, d5, d6]
[2616]165
[3669]166polygons = [polyAll, export_region]
167figname = 'checking.png'
168from anuga.utilities.polygon import plot_polygons
169plot_polygons(polygons, figname, verbose = False)
170print figname
[2616]171#Interior region - Onslow town
172
[3249]173#first run!
[2773]174#i0 = [304000, 7608000]
[3249]175#i1 = [302000, 7605000]
[2773]176#i2 = [303000, 7602000]
[3249]177#i3 = [305000, 7601000]
178#i4 = [309000, 7603000]
179#i5 = [307000, 7606500]
180
181#refined run
182#i0 = [304000, 7607000]
183#i1 = [302000, 7605000]
184#i2 = [304000, 7603000]
185#i3 = [307000, 7602000]
186#i4 = [309000, 7603000]
187#i5 = [307000, 7606000]
188
189#for visualisation
[3265]190#i0 = [304000, 7609000]
191#i1 = [301500, 7605000]
192#i2 = [304000, 7603000]
193#i3 = [307000, 7602000]
194#i4 = [309000, 7603000]
195#i5 = [311000, 7607000]
196
197#i0 = [304000, 7608000]
198i0 = [304000, 7607000]
199i1 = [302000, 7605000]
200#i2 = [303000, 7602000]
[2773]201i2 = [304000, 7603000]
[3265]202#i3 = [305000, 7601000]
[2773]203i3 = [307000, 7602000]
[2616]204i4 = [309000, 7603000]
[3265]205#i5 = [307000, 7606500]
206i5 = [307000, 7606000]
[2616]207
[3249]208
[2616]209poly_onslow = [i0, i1, i2, i3, i4, i5]
210
211#Thevenard Island
212j0 = [294000, 7629000]
213j1 = [285000, 7625000]
214j2 = [294000, 7621000]
215j3 = [299000, 7625000]
216
217poly_thevenard = [j0, j1, j2, j3]
[2706]218
[2773]219'''
[2616]220# Direction Is
221k0 = [309000, 7619000]
222k1 = [304000, 7619000]
223k2 = [304000, 7616500]
224k3 = [309000, 7616500]
225
226poly_direction = [k0, k1, k2, k3]
[2682]227'''
[2773]228
229#med res around onslow
230l0 = [300000, 7610000]
231l1 = [285000, 7600000]
232l2 = [300000, 7597500]
233l3 = [310000, 7600000]
234l4 = [315000, 7610000]
235#l5 = [310000, 7612500]
236
237#poly_coast = [l0, l1, l2, l3, l4, l5]
238poly_coast = [l0, l1, l2, l3, l4]
239
240#general coast and local area to onslow region
241m0 = [270000, 7581000]
242m1 = [300000, 7591000]
243m2 = [339000, 7610000]
244m3 = [330000, 7630000]
245m4 = [290000, 7640000]
246m5 = [260000, 7600000]
247
248poly_region = [m0, m1, m2, m3, m4, m5]
Note: See TracBrowser for help on using the repository browser.