source: production/onslow_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.6 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
9
10from pmesh.create_mesh import convert_points_from_latlon_to_utm
11
12from coordinate_transforms.redfearn import degminsec2decimal_degrees
13
14from time import localtime, strftime
15
16               
17#Making assumptions about the location of scenario data
18scenario_dir_name = 'onslow_tsunami_scenario_2006'
19
20# 250m data to be provided
21coarsename = 'onsl_bathydem250' # get from Neil/Ingo (DEM or topo data)
22
23# 30m data to be provided
24onshore_name = 'onslow_onshore_30m_dted' # get from Neil/Ingo (DEM or topo data)
25
26offshore_name = 'onslow_offshore_points'
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 = environ['INUNDATIONHOME']     #Sandpit's parent dir
37#    home = environ['INUNDATIONHOME']     #Sandpit's parent dir
38else:   
39    home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'1'+sep+'cit'+sep+'risk_assessment_methods_project'+sep+'inundation')     
40
41#Derive subdirectories and filenames
42time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
43outputtimedir = home+sep+scenario_dir_name+sep+'output'+sep+time+sep
44meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep
45datadir = home+sep+scenario_dir_name+sep+'topographies'+sep
46gaugedir = home+sep+scenario_dir_name+sep+'gauges'+sep
47polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep
48boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep
49#output dir without time
50outputdir = home+sep+scenario_dir_name+sep+'output'+sep
51tidedir = home+sep+scenario_dir_name+sep+'tide_data'+sep
52
53print'bound', boundarydir
54
55#gauge_filename = gaugedir + 'onslow_gauges.xya'
56#for MOST
57gauge_filename = gaugedir + 'onslow_gauges1.xya'
58
59
60gaugetimeseries = gaugedir + 'onslow'
61
62tidal_filename = tidedir + 'onsl.txt'
63tidal_outname = tidedir + 'max_min.txt'
64
65# boundary source data
66#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
67
68codedir = getcwd()+sep
69                               
70codedirname = codedir + 'project.py'
71
72meshname = meshdir + basename
73
74coarsedemname = datadir + coarsename
75
76onshore_dem_name = datadir + onshore_name
77
78offshore_dem_name = datadir + offshore_name
79
80combined_dem_name = datadir + 'onslow_combined_elevation'
81
82outputname = outputtimedir + basename  #Used by post processing
83
84#!gauge_filename = outputdir + 'onslow_gauges.xya'
85#!gauge_outname = outputdir + 'gauges_max_output.xya'
86
87# clipping region to make DEM (pts file) from fine elevation data
88eastingmin = 240000
89eastingmax = 340000
90northingmin = 7580000
91northingmax = 7700000
92
93south = degminsec2decimal_degrees(-22,15,0)
94north = degminsec2decimal_degrees(-20,30,0)
95west = degminsec2decimal_degrees(114,15,0)
96east = degminsec2decimal_degrees(115,50,0)
97'''
98# region for visualisation
99eminviz = 260000
100emaxviz = 320000
101nminviz = 7590000
102nmaxviz = 7630000
103'''
104# region to export
105
106e_min_area = 300000
107e_max_area = 310000
108n_min_area = 7600000
109n_max_area = 7610000
110
111#Georeferencing
112from coordinate_transforms.redfearn import degminsec2decimal_degrees
113
114refzone = 50
115
116#Updated Main Domain of Onslow: first run NB 6/4/06
117d0 = [310000, 7690000]
118d1 = [280000, 7690000]
119d2 = [270000, 7645000]
120d3 = [240000, 7625000]
121d4 = [270000, 7580000]
122d5 = [300000, 7590000]
123d6 = [340000, 7610000]
124
125polyAll = [d0, d1, d2, d3, d4, d5, d6]
126
127#Interior region - Onslow town
128
129#i0 = [304000, 7608000]
130i0 = [304000, 7607000]
131i1 = [302000, 7605000]
132#i2 = [303000, 7602000]
133i2 = [304000, 7603000]
134#i3 = [305000, 7601000]
135i3 = [307000, 7602000]
136i4 = [309000, 7603000]
137#i5 = [307000, 7606500]
138i5 = [307000, 7606000]
139
140poly_onslow = [i0, i1, i2, i3, i4, i5]
141
142#Thevenard Island
143j0 = [294000, 7629000]
144j1 = [285000, 7625000]
145j2 = [294000, 7621000]
146j3 = [299000, 7625000]
147
148poly_thevenard = [j0, j1, j2, j3]
149
150'''
151# Direction Is
152k0 = [309000, 7619000]
153k1 = [304000, 7619000]
154k2 = [304000, 7616500]
155k3 = [309000, 7616500]
156
157poly_direction = [k0, k1, k2, k3]
158'''
159
160#med res around onslow
161l0 = [300000, 7610000]
162l1 = [285000, 7600000]
163l2 = [300000, 7597500]
164l3 = [310000, 7600000]
165l4 = [315000, 7610000]
166#l5 = [310000, 7612500]
167
168#poly_coast = [l0, l1, l2, l3, l4, l5]
169poly_coast = [l0, l1, l2, l3, l4]
170
171#general coast and local area to onslow region
172m0 = [270000, 7581000]
173m1 = [300000, 7591000]
174m2 = [339000, 7610000]
175m3 = [330000, 7630000]
176m4 = [290000, 7640000]
177m5 = [260000, 7600000]
178
179poly_region = [m0, m1, m2, m3, m4, m5]
Note: See TracBrowser for help on using the repository browser.