source: production/pt_hedland_2006/project.py @ 2950

Last change on this file since 2950 was 2947, checked in by sexton, 18 years ago

updates for consideration of indigeneous communities

File size: 4.5 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
7from utilities.polygon import read_polygon
8import sys
9from pmesh.create_mesh import convert_points_from_latlon_to_utm
10from coordinate_transforms.redfearn import degminsec2decimal_degrees
11from time import localtime, strftime
12
13
14
15
16#Making assumptions about the location of scenario data
17scenario_dir_name = 'pt_hedland_tsunami_scenario_2006'
18
19# onshore data from 30m DTED level 2
20onshore_name = 'pt_hedland_onshore_30m_dted' # get from Neil/Ingo (DEM or topo data)
21# offshore data from GA digitised charts
22offshore_name1 = 'pt_hedland_offshore_points'
23# offshore data from AHO fairsheets
24offshore_name2 = 'pt_hedland_offshore_points_fairsheet'
25# coastline developed from 30m DTED
26coast_name = 'pt_hedland_coastline_points.xya'
27
28boundary_basename = 'SU-AU_clip'
29
30#swollen/ all data output
31basename = 'source'
32
33codename = 'project.py'
34
35if sys.platform == 'win32':
36    home = getenv('INUNDATIONHOME')
37#    python_home = getenv('PWD')     
38#    home = environ['INUNDATIONHOME']     #Sandpit's parent dir
39    #user = basename(getenv('USERPROFILE'))
40    #print 'USER:', user
41else:   
42    home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'1'+sep+'cit'+sep+'risk_assessment_methods_project'+sep+'inundation')     
43    user = getenv('LOGNAME')
44    print 'USER:', user
45
46#    home = sep+'d'+sep+'cit'+sep+'1'+sep+'cit'+sep+'risk_assessment_methods_project'+sep+'inundation'
47#    home = expanduser('~')
48
49#Derive subdirectories and filenames
50time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
51#print 'home', home
52outputtimedir = home+sep+scenario_dir_name+sep+'output'+sep+time+sep
53#print 'outputtimedir', outputtimedir
54meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep
55datadir = home+sep+scenario_dir_name+sep+'topographies'+sep
56gaugedir = home+sep+scenario_dir_name+sep+'gauges'+sep
57polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep
58boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep
59#output dir without time
60outputdir = home+sep+scenario_dir_name+sep+'output'+sep
61tidedir = home+sep+scenario_dir_name+sep+'tide_data'+sep
62
63#print'bound', boundarydir
64
65#gauge_filename = gaugedir + 'onslow_gauges.xya'
66#for MOST
67gauge_filename = gaugedir + 'pt_hedland_gauges.xya'
68buildings_filename = gaugedir + 'pt_hedland_res.csv'
69community_filename = gaugedir + 'CHINS_v2.csv'
70community_scenario = gaugedir + 'community_pt_hedland.csv'
71tidal_filename = tidedir + 'pt_hedland_tide.txt'
72coast_filename = datadir + coast_name
73
74# boundary source data
75#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
76
77#print 'name', __name__
78#print 'path', __file__
79#codedir = getcwd()+sep
80
81#project_code_name = __name__
82                           
83#project_code_dir_name = __file__
84
85meshname = meshdir + basename
86
87onshore_dem_name = datadir + onshore_name
88
89offshore_dem_name1 = datadir + offshore_name1
90offshore_dem_name2 = datadir + offshore_name2
91
92combined_dem_name = datadir + 'pt_hedland_combined_elevation'
93
94outputname = outputtimedir + basename  #Used by post processing
95
96# clipping region to make DEM (pts file) from onshore data
97eastingmin = 594000
98eastingmax = 715000
99northingmin = 7720000
100northingmax = 7880000
101
102# for ferret2sww
103south = degminsec2decimal_degrees(-20,30,0)
104north = degminsec2decimal_degrees(-17,10,0)
105west = degminsec2decimal_degrees(117,00,0)
106east = degminsec2decimal_degrees(120,00,0)
107
108# region to export (used from export_results.py)
109
110#e_min_area = 300000
111#e_max_area = 310000
112#n_min_area = 7600000
113#n_max_area = 7610000
114
115refzone = 50 # confirm with Hamish
116
117# bounding polygon provided by Hamish
118#d0 = [818732.55, 8062768.27]
119"""
120old
121d0 = [755000.0, 8025000.0]
122d1 = [708940.32, 7750510.33]
123d2 = [656561.15, 7732615.11]
124d3 = [604415.81, 7733013.56]
125d4 = [517682.34, 7899310.22]
126"""
127
128d0 = [763852.0, 7934358.0]
129d1 = [710987.0, 7925797.0]
130d2 = [658264.0, 7926314.0]
131d3 = [552686.0, 7871580.0]
132d4 = [604415.81, 7733013.56]
133d5 = [656561.15, 7732615.11]
134d6 = [708940.32, 7750510.33]
135
136polyAll = [d0, d1, d2, d3, d4, d5, d6]
137
138#Interior region - Pt Hedland town
139i0 = [668000, 7757000]
140i1 = [659000, 7755000]
141i2 = [660000, 7749000]
142i3 = [667000, 7746000]
143i4 = [678000, 7751000]
144
145poly_pt_hedland = [i0, i1, i2, i3, i4]
146
147#Are there other significant features?
148j0 = [670000, 7760000]
149j1 = [630000, 7745000]
150j2 = [665000, 7743000]
151j3 = [690000, 7755000]
152
153poly_region = [j0, j1, j2, j3]
154
Note: See TracBrowser for help on using the repository browser.