source: production/pt_hedland_2006/project.py @ 2920

Last change on this file since 2920 was 2902, checked in by nick, 19 years ago

update onslow and pt hedland

File size: 4.1 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'
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'
63
64tidal_filename = tidedir + 'pt_hedland_tide.txt'
65
66# boundary source data
67#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
68
69#print 'name', __name__
70#print 'path', __file__
71#codedir = getcwd()+sep
72
73#project_code_name = __name__
74                           
75#project_code_dir_name = __file__
76
77meshname = meshdir + basename
78
79onshore_dem_name = datadir + onshore_name
80
81offshore_dem_name1 = datadir + offshore_name1
82offshore_dem_name2 = datadir + offshore_name2
83
84combined_dem_name = datadir + 'pt_hedland_combined_elevation'
85
86outputname = outputtimedir + basename  #Used by post processing
87
88# clipping region to make DEM (pts file) from onshore data
89eastingmin = 594000
90eastingmax = 715000
91northingmin = 7720000
92northingmax = 7880000
93
94# for ferret2sww
95south = degminsec2decimal_degrees(-20,30,0)
96north = degminsec2decimal_degrees(-17,10,0)
97west = degminsec2decimal_degrees(117,00,0)
98east = degminsec2decimal_degrees(120,00,0)
99
100# region to export (used from export_results.py)
101
102#e_min_area = 300000
103#e_max_area = 310000
104#n_min_area = 7600000
105#n_max_area = 7610000
106
107refzone = 50 # confirm with Hamish
108
109# bounding polygon provided by Hamish
110#d0 = [818732.55, 8062768.27]
111d0 = [755000.0, 8025000.0]
112d1 = [708940.32, 7750510.33]
113d2 = [656561.15, 7732615.11]
114d3 = [604415.81, 7733013.56]
115d4 = [517682.34, 7899310.22]
116
117polyAll = [d0, d4, d3, d2, d1]
118
119#Interior region - Pt Hedland town
120i0 = [668000, 7757000]
121i1 = [659000, 7755000]
122i2 = [660000, 7749000]
123i3 = [667000, 7746000]
124i4 = [678000, 7751000]
125
126poly_pt_hedland = [i0, i1, i2, i3, i4]
127
128#Are there other significant features?
129j0 = [670000, 7780000]
130j1 = [620000, 7745000]
131j2 = [665000, 7735000]
132j3 = [700000, 7755000]
133
134poly_region = [j0, j1, j2, j3]
135
Note: See TracBrowser for help on using the repository browser.