source: production/pt_hedland_2006/project.py @ 3031

Last change on this file since 3031 was 2963, checked in by sexton, 19 years ago

incorporate new gauges into pt hedland project file

File size: 4.8 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
13from geospatial_data import *
14
15
16
17
18#Making assumptions about the location of scenario data
19scenario_dir_name = 'pt_hedland_tsunami_scenario_2006'
20
21# onshore data from 30m DTED level 2
22onshore_name = 'pt_hedland_onshore_30m_dted' # get from Neil/Ingo (DEM or topo data)
23# offshore data from GA digitised charts
24offshore_name1 = 'pt_hedland_offshore_points'
25# offshore data from AHO fairsheets
26offshore_name2 = 'pt_hedland_offshore_points_fairsheet'
27# coastline developed from 30m DTED
28coast_name = 'pt_hedland_coastline_points.xya'
29
30boundary_basename = 'SU-AU_clip'
31
32#swollen/ all data output
33basename = 'source'
34
35codename = 'project.py'
36
37if sys.platform == 'win32':
38    home = getenv('INUNDATIONHOME')
39#    python_home = getenv('PWD')     
40#    home = environ['INUNDATIONHOME']     #Sandpit's parent dir
41    #user = basename(getenv('USERPROFILE'))
42    #print 'USER:', user
43else:   
44    home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'1'+sep+'cit'+sep+'risk_assessment_methods_project'+sep+'inundation')     
45    user = getenv('LOGNAME')
46    print 'USER:', user
47
48#Derive subdirectories and filenames
49time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
50#print 'home', home
51outputtimedir = home+sep+scenario_dir_name+sep+'output'+sep+time+sep
52#print 'outputtimedir', outputtimedir
53meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep
54datadir = home+sep+scenario_dir_name+sep+'topographies'+sep
55gaugedir = home+sep+scenario_dir_name+sep+'gauges'+sep
56polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep
57boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep
58#output dir without time
59outputdir = home+sep+scenario_dir_name+sep+'output'+sep
60tidedir = home+sep+scenario_dir_name+sep+'tide_data'+sep
61
62#print'bound', boundarydir
63
64#gauge_filename = gaugedir + 'onslow_gauges.xya'
65#for MOST
66#gauge_filename = gaugedir + 'pt_hedland_gauges.xya'
67gauge_filename = gaugedir + 'gauge_location_port_hedland.csv'
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]
132#d4 = [604415.81, 7733013.56]
133d4 = [638000.0, 7733013.56]
134#d5 = [656561.15, 7732615.11]
135d5 = [662000.0, 7732615.11]
136#d6 = [708940.32, 7750510.33]
137d6 = [690000.0, 7740510.33]
138
139polyAll = [d0, d1, d2, d3, d4, d5, d6]
140
141#Interior region - Pt Hedland town
142i0 = [668000, 7757000]
143i1 = [659000, 7755000]
144i2 = [660000, 7749000]
145i3 = [667000, 7746000]
146i4 = [678000, 7751000]
147
148poly_pt_hedland = [i0, i1, i2, i3, i4]
149
150#Are there other significant features?
151j0 = [670000, 7760000]
152j1 = [633000, 7745000]
153j2 = [665000, 7743000]
154j3 = [690000, 7755000]
155
156poly_region = [j0, j1, j2, j3]
157
158coast_buffer_file = datadir+'pts2ascii_test.xya'
159G = Geospatial_data(file_name=coast_buffer_file,delimiter=' ')
160poly_coast = list(G.get_data_points())
161#print 'get_data_points()',G.get_data_points()
162#print 'get_',poly_region
163
164
165
Note: See TracBrowser for help on using the repository browser.