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

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

reflecting PATH change in project scripts

File size: 6.4 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, basename
7#from anuga.utilities.polygon import read_polygon
8import sys
9from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees
10from time import localtime, strftime
11from anuga.geospatial_data.geospatial_data import *
12
13#Making assumptions about the location of scenario data
14state = 'western_australia'
15scenario_dir_name = 'pt_hedland_tsunami_scenario_2006'
16
17# onshore data from 30m DTED level 2
18onshore_name_dted = 'pt_hedland_onshore_30m_dted' # get from Neil/Ingo (DEM or topo data)
19onshore_name_dli = 'pt_hedland_onshore_20m_dli' # get from Neil/Ingo (DEM or topo data)
20
21# offshore data from GA digitised charts
22offshore_name1 = 'pt_hedland_offshore_points_orig'
23
24# offshore data from AHO fairsheets
25offshore_name2 = 'pt_hedland_offshore_points_fairsheet_orig'
26
27# coastline developed from aerial photography and 1.5m DLI contour
28#coast_name = 'pt_hedland_coastline_points_dted2_new'
29coast_name = 'coast_with_extracted_z'
30
31
32boundary_basename = 'SU-AU_clip'
33
34#swollen/ all data output
35basename = 'source'
36
37codename = 'project.py'
38
39if sys.platform == 'win32':
40    home = getenv('INUNDATIONHOME') #Sandpit's parent dir
41#    python_home = getenv('PWD')     
42    user = getenv('USERPROFILE')
43    #print 'USER:', user
44else:
45    # original
46    #home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'1'+sep+'cit'+sep+'risk_assessment_methods_project'+sep+'inundation')
47    # update to perlite 2
48    home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'2'+sep+'cit'+sep+'inundation'+sep+'data')     
49    user = getenv('LOGNAME')
50
51# INUNDATIONHOME is the inundation directory, not the data directory.
52home += sep +'data'
53
54#Derive subdirectories and filenames
55time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
56outputtimedir = time+sep
57
58#print 'outputtimedir', outputtimedir
59#meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep
60#datadir = home+sep+scenario_dir_name+sep+'topographies'+sep
61#gaugedir = home+sep+scenario_dir_name+sep+'gauges'+sep
62#polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep
63#boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep
64#outputdir = home+sep+scenario_dir_name+sep+'outputs'+sep
65#tidedir = home+sep+scenario_dir_name+sep+'tide_data'+sep
66
67meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
68datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
69gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
70polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
71boundarydir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep
72outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep
73tidedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'tide_data'+sep
74
75gauge_filename = gaugedir + 'gauge_location_port_hedland.csv'
76gauge_checking = gaugedir + 'gauge_checking_test.csv'
77buildings_filename = gaugedir + 'pt_hedland_res.csv'
78buildings_filename_out = 'pt_hedland_res_modified.csv'
79buildings_filename_damage_out = 'pt_hedland_res_modified_damage.csv'
80community_filename = gaugedir + 'CHINS_v2.csv'
81community_scenario = gaugedir + 'community_pt_hedland.csv'
82tidal_filename = tidedir + 'pt_hedland_tide.txt'
83
84meshname = outputtimedir + basename+time
85mesh_elevname = outputtimedir + basename+time+'_elev'
86#onshore_dem_name = datadir + onshore_name_dted
87onshore_dem_name = datadir + onshore_name_dli
88offshore_dem_name1 = datadir + offshore_name1
89offshore_dem_name2 = datadir + offshore_name2
90coast_dem_name = datadir + coast_name
91combined_dem_name = 'pt_hedland_combined_elevation'
92outputname = outputtimedir + basename  #Used by post processing
93
94# clipping region to make DEM (pts file) from onshore data
95eastingmin = 594000
96eastingmax = 715000
97northingmin = 7720000
98northingmax = 7880000
99
100# for ferret2sww
101south = degminsec2decimal_degrees(-20,30,0)
102north = degminsec2decimal_degrees(-17,10,0)
103west = degminsec2decimal_degrees(117,00,0)
104east = degminsec2decimal_degrees(120,00,0)
105
106# region to export (used from export_results.py)
107e_min_area = 648000
108e_max_area = 675000
109n_min_area = 7745000
110n_max_area = 7761000
111
112export_region = [[e_min_area,n_min_area],[e_min_area,n_max_area],[e_max_area,n_max_area],[e_max_area,n_min_area]]
113                 
114refzone = 50 
115
116from anuga.coordinate_transforms.redfearn import redfearn
117# boundary up to 50 m contour
118lat1_50 = degminsec2decimal_degrees(-19,20,0)
119lat2_50 = degminsec2decimal_degrees(-19,30,0)
120lat3_50 = degminsec2decimal_degrees(-19,45,0)
121lon1_50 = degminsec2decimal_degrees(119,05,0)
122lon2_50 = degminsec2decimal_degrees(118,20,0)
123lon3_50 = degminsec2decimal_degrees(117,45,0)
124z, easting, northing = redfearn(lat1_50, lon1_50)
125d0_50 = [easting, northing]
126z, easting, northing = redfearn(lat2_50, lon2_50)
127d1_50 = [easting, northing]
128z, easting, northing= redfearn(lat3_50, lon3_50)
129d2_50 = [easting, northing]
130
131d4_50 = [285000, 7585000]
132d6_50 = [330000, 7605000]
133#bounding_poly50 = [p0_50, p1_50, p2_50, d6_50, d5, d4_50]
134
135d0 = [763852.0, 7934358.0]
136d1 = [710987.0, 7925797.0]
137d2 = [658264.0, 7926314.0]
138d3 = [552686.0, 7871580.0]
139#d4 = [604415.81, 7733013.56]
140d4 = [638000.0, 7733013.56]
141#d5 = [656561.15, 7732615.11]
142d5 = [662000.0, 7732615.11]
143#d6 = [708940.32, 7750510.33]
144d6 = [690000.0, 7740510.33]
145#polyAll = [d0, d1, d2, d3, d4, d5, d6]
146#polyAll = [d0_50, d1_50, d2_50, d4, d5, d6]
147# from Hamish
148h0=[629262.17, 7747205.47]
149h1=[552686.00, 7871579.99] #d3
150h2=[658264.00, 7926314.00] #d2
151h3=[710986.99, 7925796.99] #d1
152h4=[763851.99, 7934357.99] #d0
153h5=[701485.21, 7770656.86]
154h6=[698273.75, 7762227.38]
155h7=[698194.23, 7762018.65]
156h8=[691627.41, 7744781.98]
157h9=[679220.75, 7743604.59]
158h10=[653512.59, 7740528.56]
159h11=[634777.71, 7738247.17]
160h12=[629443.86, 7746910.37]
161h13=[629396.84, 7746986.75]
162h14=[629352.32, 7747059.06]
163h15=[629276.24, 7747182.63]
164h16=[629262.17, 7747205.47] #repeat of h0
165# using Hamish's new bounding polygon
166#polyAll = [d0_50, d1_50, d2_50, h16,h15,h14,h13,h12,h11,h10,h9,h8,h7,h6,h5]
167polyAll = [d0_50, d1_50, d2_50, h16,h11,h8,h6, h5]
168
169#Interior region - Pt Hedland town
170i0 = [668000, 7757000]
171i1 = [659000, 7755000]
172i2 = [660000, 7749000]
173i3 = [667000, 7746000]
174i4 = [678000, 7751000]
175
176poly_pt_hedland = [i0, i1, i2, i3, i4]
177
178#Are there other significant features?
179j0 = [670000, 7760000]
180j1 = [633000, 7745000]
181j2 = [665000, 7743000]
182j3 = [690000, 7755000]
183
184poly_region = [j0, j1, j2, j3]
Note: See TracBrowser for help on using the repository browser.