source: anuga_work/production/sydney_2006/project_slide.py @ 4853

Last change on this file since 4853 was 4853, checked in by sexton, 17 years ago

reflecting updated function in other files

File size: 6.5 KB
Line 
1# -*- coding: cp1252 -*-
2"""Common filenames and locations for topographic data, meshes and outputs.
3"""
4
5from os import sep, environ, getenv, getcwd
6from os.path import expanduser
7import sys
8from time import localtime, strftime, gmtime
9from anuga.utilities.polygon import read_polygon, plot_polygons_points, polygon_area, is_inside_polygon
10
11if sys.platform == 'win32':
12    home = getenv('INUNDATIONHOME')
13    user = getenv('USERPROFILE')
14
15else:   
16    home = getenv('INUNDATIONHOME', sep+'d'+sep+'xrd'+sep+'gem'+sep+'2'+sep+'ramp'+sep+'risk_assessment_methods_project'+sep+'inundation')     
17    user = getenv('LOGNAME')
18    print 'USER:', user
19
20# INUNDATIONHOME is the inundation directory, not the data directory.
21home += sep +'data'
22
23#Making assumptions about the location of scenario data
24state = 'new_south_wales'
25scenario_dir_name = 'sydney_tsunami_scenario_2006'
26
27# onshore data provided by NSW LPI, Krishna merged with existing
28# PMD data to make 100m DEM
29on_offshore_name25 = 'bathy_dem25'
30on_offshore_name100 = 'bathyland100'
31nsw100 = 'dem_utm'
32
33# survey data
34offshore_name1 = 'surveyAreaA'
35offshore_name2 = 'surveyAreaB'
36offshore_name3 = 'surveyAreaC'
37
38# AHO data
39offshore_name4 = '1000003611export'
40offshore_name5 = '1000003613export'
41offshore_name6 = '1000003614export'
42offshore_name7 = '1000003627export'
43offshore_name8 = '1000003628export'
44offshore_name9 = 'AHDexport'
45
46#swollen/ all data output
47basename = 'source'
48codename = 'project_slide.py'
49
50#Derive subdirectories and filenames
51local_time = strftime('%Y%m%d_%H%M%S',gmtime()) 
52meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
53datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
54gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
55polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
56boundarydir = home+sep+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep
57outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep
58outputtimedir = outputdir + local_time + sep
59polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
60
61gauge_filename = gaugedir + 'sydney_slide_gauges.csv'
62codedir = getcwd()+sep                           
63codedirname = codedir + 'project_slide.py'
64meshname = outputtimedir + 'mesh_' + basename
65
66# Necessary if using point datasets, rather than grid
67on_offshore25_dem_name = datadir + on_offshore_name25
68on_offshore100_dem_name = datadir + on_offshore_name100
69nsw_dem_name = datadir + nsw100
70offshore_dem_name1 = datadir + offshore_name1
71offshore_dem_name2 = datadir + offshore_name2
72offshore_dem_name3 = datadir + offshore_name3
73offshore_dem_name4 = datadir + offshore_name4
74offshore_dem_name5 = datadir + offshore_name5
75offshore_dem_name6 = datadir + offshore_name6
76offshore_dem_name7 = datadir + offshore_name7
77offshore_dem_name8 = datadir + offshore_name8
78offshore_dem_name9 = datadir + offshore_name9
79combined_dem_name   = datadir + 'sydney_combined_elevation'
80
81###############################
82# Domain definitions
83###############################
84
85# bounding polygon for study area
86polyAll = read_polygon(polygondir+'extent3.csv')
87
88print 'Area of bounding polygon', polygon_area(polyAll)/1000000.0
89
90###############################
91# Interior region definitions
92###############################
93
94# sydney digitized polygons
95poly_coast = read_polygon(polygondir+'coast2.csv')
96poly_syd1 = read_polygon(polygondir+'local.csv')
97
98print 'Area of local polygon', polygon_area(poly_syd1)/1000000.0
99print 'Area of coastal polygon', polygon_area(poly_coast)/1000000.0
100
101###################################################################
102# Clipping regions for export to asc and regions for clipping data
103###################################################################
104
105# clipping for 25m grid for conversion
106eastingmin25 = 324825
107eastingmax25 = 347650
108northingmin25 = 6231960
109northingmax25 = 6272543
110
111poly_25mclip = read_polygon(polygondir+'25mclip.csv')
112
113# clipping for 100m grid for conversion
114eastingmin100 = 315870
115eastingmax100 = 361607
116northingmin100 = 6227588
117northingmax100 = 6285975
118
119poly_surveyclip = read_polygon(polygondir+'surveyclip.csv')
120
121# clipping for nsw grid for conversion
122eastingmin_nsw = 315870
123eastingmax_nsw = 390480
124northingmin_nsw = 6161100 
125northingmax_nsw = 6330000
126
127poly_origsyd = [[eastingmin100,northingmin100],[eastingmax100,northingmin100],\
128                [eastingmax100,northingmax100],[eastingmin100,northingmax100]]
129
130# exporting asc grid
131eastingmin = 333000
132eastingmax = 354000
133northingmin = 6244800
134northingmax = 6274550
135
136# exporting asc grid
137eastingmin = 318922+10000
138eastingmax = 318922+45000
139northingmin = 6231749+7500
140northingmax = 6231749+48000
141
142#eastingmin = -40
143#eastingmax = 40
144#northingmin = -20
145#northingmax = 20
146
147###################################################################
148# Slide characteristics
149###################################################################
150
151# historical slides
152slide_origin_bulli = [370110,6189489]
153slide_origin_shovel = [354753,6187397]
154#slide_origin_yacaaba = [463012,6334735] original work was actually Birubi
155slide_origin_yacaaba = [476465, 6362424]
156slide_origin_birubi = [462267,6335100]
157
158# potential slides: these correspond approximately to modelled depths
159slide_origin_bulli_b = [405617,6249852]
160slide_origin_bulli_c0 = [438583,6308510]
161slide_origin_bulli_c1 = [465283,6335210]
162slide_origin_bulli_c2 = [483783,6358810]
163slide_origin_shovel_b = [396262,6252144]
164slide_origin_shovel_c0 = [431683,6311110]
165slide_origin_shovel_c1 = [458694,6340352]
166slide_origin_shovel_c2 = [475589,6363030]
167slide_origin_yacaaba_a = [359796,6190943]
168slide_origin_yacaaba_b = [397330,6251857]
169slide_origin_yacaaba_c0 = [431283,6312110]
170slide_origin_yacaaba_c1 = [459983,6339110]
171slide_origin_birubi_a = [362811,6191183]
172slide_origin_birubi_b = [403573,6250268]
173slide_origin_birubi_c0 = [437183,6309410]
174slide_origin_birubi_c2 = [483392,6359044]
175
176#bulli_depth = 2087.0
177bulli_depth = 1470.0
178bulli_length = 16840.0
179bulli_thickness = 424.0
180bulli_width = 8860.0
181bulli_density = 1.46
182bulli_slope = 4.0
183bulli_alpha = 126.0 - 90.0
184
185#shovel_depth = 968.0
186shovel_depth = 877.0
187shovel_length = 13500.0
188shovel_thickness = 165.0
189shovel_width = 4350.0
190shovel_density = 1.49
191shovel_slope = 4.0
192shovel_alpha = 118.0 - 90.0
193
194#yacaaba_depth = 1119.0
195yacaaba_depth = 938.
196yacaaba_length = 4189.
197yacaaba_thickness = 53.
198yacaaba_width = 2898.
199yacaaba_density = 1.48
200yacaaba_slope = 2.3
201yacaaba_alpha = 133.0 - 90.0
202 
203birubi_depth = 1320.
204birubi_length = 9903.0
205birubi_width = 4150.
206birubi_density = 1.48
207birubi_slope = 3.7
208birubi_alpha = 133.0 - 90.0
209birubi_thickness = 140.
Note: See TracBrowser for help on using the repository browser.