source: production/pt_hedland_2006/project.py @ 3286

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

updates from newly supplied data

File size: 6.0 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
12from geospatial_data import *
13
14#Making assumptions about the location of scenario data
15state = 'western_australia'
16scenario_dir_name = 'pt_hedland_tsunami_scenario_2006'
17
18# onshore data from 30m DTED level 2
19onshore_name_dted = 'pt_hedland_onshore_30m_dted' # get from Neil/Ingo (DEM or topo data)
20onshore_name_dli = 'pt_hedland_onshore_20m_dli' # get from Neil/Ingo (DEM or topo data)
21
22# offshore data from GA digitised charts
23offshore_name1 = 'pt_hedland_offshore_points_orig'
24
25# offshore data from AHO fairsheets
26offshore_name2 = 'pt_hedland_offshore_points_fairsheet_orig'
27
28# coastline developed from aerial photography and 1.5m DLI contour
29#coast_name = 'pt_hedland_coastline_points_dted2_new'
30coast_name = 'coast_with_extracted_z'
31
32
33boundary_basename = 'SU-AU_clip'
34
35#swollen/ all data output
36basename = 'source'
37
38codename = 'project.py'
39
40if sys.platform == 'win32':
41    home = getenv('INUNDATIONHOME') #Sandpit's parent dir
42#    python_home = getenv('PWD')     
43    user = getenv('USERPROFILE')
44    #print 'USER:', user
45else:
46    # original
47    #home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'1'+sep+'cit'+sep+'risk_assessment_methods_project'+sep+'inundation')
48    # update to perlite 2
49    home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'2'+sep+'cit'+sep+'inundation'+sep+'data')     
50    user = getenv('LOGNAME')
51
52#Derive subdirectories and filenames
53time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
54outputtimedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep+time+sep
55
56#print 'outputtimedir', outputtimedir
57#meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep
58#datadir = home+sep+scenario_dir_name+sep+'topographies'+sep
59#gaugedir = home+sep+scenario_dir_name+sep+'gauges'+sep
60#polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep
61#boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep
62#outputdir = home+sep+scenario_dir_name+sep+'outputs'+sep
63#tidedir = home+sep+scenario_dir_name+sep+'tide_data'+sep
64
65meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
66datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
67gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
68polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
69boundarydir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep
70outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep
71tidedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'tide_data'+sep
72
73gauge_filename = gaugedir + 'gauge_location_port_hedland.csv'
74buildings_filename = gaugedir + 'pt_hedland_res.csv'
75community_filename = gaugedir + 'CHINS_v2.csv'
76community_scenario = gaugedir + 'community_pt_hedland.csv'
77tidal_filename = tidedir + 'pt_hedland_tide.txt'
78
79meshname = meshdir + basename
80#onshore_dem_name = datadir + onshore_name_dted
81onshore_dem_name = datadir + onshore_name_dli
82offshore_dem_name1 = datadir + offshore_name1
83offshore_dem_name2 = datadir + offshore_name2
84coast_dem_name = datadir + coast_name
85combined_dem_name = datadir + 'pt_hedland_combined_elevation'
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)
101e_min_area = 633000
102e_max_area = 690000
103n_min_area = 7740000
104n_max_area = 7761000
105
106refzone = 50 
107
108from coordinate_transforms.redfearn import redfearn
109# boundary up to 50 m contour
110lat1_50 = degminsec2decimal_degrees(-19,20,0)
111lat2_50 = degminsec2decimal_degrees(-19,30,0)
112lat3_50 = degminsec2decimal_degrees(-19,45,0)
113lon1_50 = degminsec2decimal_degrees(119,05,0)
114lon2_50 = degminsec2decimal_degrees(118,20,0)
115lon3_50 = degminsec2decimal_degrees(117,45,0)
116z, easting, northing = redfearn(lat1_50, lon1_50)
117d0_50 = [easting, northing]
118z, easting, northing = redfearn(lat2_50, lon2_50)
119d1_50 = [easting, northing]
120z, easting, northing= redfearn(lat3_50, lon3_50)
121d2_50 = [easting, northing]
122
123d4_50 = [285000, 7585000]
124d6_50 = [330000, 7605000]
125#bounding_poly50 = [p0_50, p1_50, p2_50, d6_50, d5, d4_50]
126
127d0 = [763852.0, 7934358.0]
128d1 = [710987.0, 7925797.0]
129d2 = [658264.0, 7926314.0]
130d3 = [552686.0, 7871580.0]
131#d4 = [604415.81, 7733013.56]
132d4 = [638000.0, 7733013.56]
133#d5 = [656561.15, 7732615.11]
134d5 = [662000.0, 7732615.11]
135#d6 = [708940.32, 7750510.33]
136d6 = [690000.0, 7740510.33]
137#polyAll = [d0, d1, d2, d3, d4, d5, d6]
138#polyAll = [d0_50, d1_50, d2_50, d4, d5, d6]
139# from Hamish
140h0=[629262.17, 7747205.47]
141h1=[552686.00, 7871579.99] #d3
142h2=[658264.00, 7926314.00] #d2
143h3=[710986.99, 7925796.99] #d1
144h4=[763851.99, 7934357.99] #d0
145h5=[701485.21, 7770656.86]
146h6=[698273.75, 7762227.38]
147h7=[698194.23, 7762018.65]
148h8=[691627.41, 7744781.98]
149h9=[679220.75, 7743604.59]
150h10=[653512.59, 7740528.56]
151h11=[634777.71, 7738247.17]
152h12=[629443.86, 7746910.37]
153h13=[629396.84, 7746986.75]
154h14=[629352.32, 7747059.06]
155h15=[629276.24, 7747182.63]
156h16=[629262.17, 7747205.47] #repeat of h0
157# using Hamish's new bounding polygon
158polyAll = [d0_50, d1_50, d2_50, h16,h15,h14,h13,h12,h11,h10,h9,h8,h7,h6,h5] 
159
160#Interior region - Pt Hedland town
161i0 = [668000, 7757000]
162i1 = [659000, 7755000]
163i2 = [660000, 7749000]
164i3 = [667000, 7746000]
165i4 = [678000, 7751000]
166
167poly_pt_hedland = [i0, i1, i2, i3, i4]
168
169#Are there other significant features?
170j0 = [670000, 7760000]
171j1 = [633000, 7745000]
172j2 = [665000, 7743000]
173j3 = [690000, 7755000]
174
175poly_region = [j0, j1, j2, j3]
Note: See TracBrowser for help on using the repository browser.