source: production/pt_hedland_2006/project.py @ 2922

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

trying to include location of indigeneous communities (need to check projection)

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