source: anuga_work/production/hobart_2006/project.py @ 3658

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

change bounding polygon for Hobart

File size: 6.6 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
9               
10#Making assumptions about the location of scenario data
11state = 'tasmania'
12scenario_dir_name = 'hobart_tsunami_scenario_2006'
13
14# data provided by Tas SES and checked by NM&I
15#onshore_name = 'hob3_topo' # original
16onshore_name = 'hob5_topo' # 12.5m grid and clipped to 100m elevation or 3000m from coast
17onshore_name_25 = 'hob5_topo_25' # 25m grid and clipped to 100m elevation or 3000m from coast
18offshore_name_tas1 = 'derwent_2m'
19offshore_name_tas2 = 'derwent_5m'
20offshore_name_tas3 = 'south_east_tas' #actually this is AHO
21offshore_name_tas4 = 'hobart_1m'
22
23# AHO data and checked by NM&I
24offshore_name1 = 'xy100003760'
25offshore_name2 = 'xy100003761'
26offshore_name3 = 'xy100003762'
27offshore_name4 = 'xy100003907'
28offshore_name5 = 'xy100003908'
29offshore_name6 = 'xy100003909'
30offshore_name7 = 'xy100003910'
31offshore_name8 = 'xy100003932'
32offshore_name9 = 'xy100003933'
33offshore_name10 = 'xy100003934'
34offshore_name11 = 'xy100003935'
35offshore_name12 = 'xy100003936'
36offshore_name13 = 'xy100003964'
37offshore_name14 = 'xy100014250'
38offshore_name15 = 'xy100014253'
39offshore_name16 = 'xy100016142'
40
41# developed by NM&I
42coast_name = 'coastline_points'
43
44boundary_basename = 'SU-AU_clip'
45
46#swollen/ all data output
47basename = 'source'
48
49codename = 'project.py'
50
51if sys.platform == 'win32':
52    home = getenv('INUNDATIONHOME')
53    user = getenv('USERPROFILE')   
54else:   
55    home = getenv('INUNDATIONHOME', sep+'d'+sep+'xrd'+sep+'gem'+sep+'2'+sep+'ramp'+'risk_assessment_methods_project'+sep+'inundation'+sep+'data')     
56    user = getenv('LOGNAME')
57    print 'USER:', user
58
59#Derive subdirectories and filenames
60#time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
61local_time = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir
62
63meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
64datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
65gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
66polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
67boundarydir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep
68#output dir without time
69outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep
70outputtimedir = outputdir + local_time + sep
71polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
72
73gauge_filename = gaugedir + 'hobart_gauges.xya'
74buildings_filename = gaugedir + 'hobart_res.csv'
75buildings_filename_damage_out = 'hobart_res_modified.csv'
76
77gaugetimeseries = gaugedir + 'hobart'
78
79# boundary source data
80#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
81
82codedir = getcwd()+sep
83                               
84codedirname = codedir + 'project.py'
85
86meshname = outputtimedir + 'mesh_' + basename
87
88onshore_dem_name = datadir + onshore_name
89onshore_dem_name_25 = datadir + onshore_name_25
90all_onshore_dem_name = datadir + 'combined_onshore'
91offshore_dem_name_local1 = datadir + offshore_name_tas1
92offshore_dem_name_local2 = datadir + offshore_name_tas2
93offshore_dem_name_local3 = datadir + offshore_name_tas3
94offshore_dem_name_local4 = datadir + offshore_name_tas4
95offshore_dem_name_aho1 = datadir + offshore_name1
96offshore_dem_name_aho2 = datadir + offshore_name2
97offshore_dem_name_aho3 = datadir + offshore_name3
98offshore_dem_name_aho4 = datadir + offshore_name4
99offshore_dem_name_aho5 = datadir + offshore_name5
100offshore_dem_name_aho6 = datadir + offshore_name6
101offshore_dem_name_aho7 = datadir + offshore_name7
102offshore_dem_name_aho8 = datadir + offshore_name8
103offshore_dem_name_aho9 = datadir + offshore_name9
104offshore_dem_name_aho10 = datadir + offshore_name10
105offshore_dem_name_aho11 = datadir + offshore_name11
106offshore_dem_name_aho12 = datadir + offshore_name12
107offshore_dem_name_aho13 = datadir + offshore_name13
108offshore_dem_name_aho14 = datadir + offshore_name14
109offshore_dem_name_aho15 = datadir + offshore_name15
110offshore_dem_name_aho16 = datadir + offshore_name16
111coast_dem_name = datadir + coast_name
112combined_dem_name = datadir + 'hobart_combined_elevation'
113
114outputname = outputtimedir + basename  #Used by post processing
115
116# clipping 12.5m onshore data set
117eastingmin = 520000
118eastingmax = 536000
119northingmin = 5245000
120northingmax = 5260000
121
122# region to export for inundation map
123e_min_area = 500000
124e_max_area = 580000
125n_min_area = 5200000
126n_max_area = 5275000
127
128from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees, convert_points_from_latlon_to_utm
129                       
130# bounding box
131south = degminsec2decimal_degrees(-43,45,0)
132north = degminsec2decimal_degrees(-42,30,0)
133west = degminsec2decimal_degrees(146,45,0)
134east = degminsec2decimal_degrees(148,15,0)
135
136#Main Domain of Hobart: first run JS 18/9/06
137d0 = [south, west]
138d1 = [south, east]
139d2 = [north, east]
140d3 = [north, west]
141
142polyAll, zone = convert_points_from_latlon_to_utm([d0, d1, d2, d3])
143refzone = zone
144NWcorner = polyAll[0]
145SEcorner = polyAll[2]
146
147#Main Domain of Hobart: updated region from Alex JS 22/9/06
148j0 = [583819.54,5193158.37]
149j1 = [585025.05,5172148.01]
150j2 = [583991.76,5155443.05]
151j3 = [486000.80,5155443.05]
152j4 = [486173.02,5165603.80]
153j5 = [478939.94,5170770.28]
154j6 = [479628.80,5290787.67]
155j7 = [570731.12,5281488.00]
156j8 = [583991.76,5266160.77]
157j9 = [590363.75,5268399.58]
158j10 = [597252.40,5276838.17]
159#j11 = [602418.88,5276838.17]
160j11 = [600000,5276838.17]
161#j12 = [600868.93,5201924.17]
162j12 = [597600, 5201914]
163#j13 = [593119.21,5196241.04]
164j13 = [590000,5196241]
165#j14 = [583819.54,5193158.37]
166j14 = [580000, 5193160]ZZ
167polyAll = [j0,j1,j2,j3,j4,j5,j6,j7,j8,j9,j10,j11,j12,j13,j14]
168
169# region to export for Alex to make bathymetry map
170e_min_area = 480000#NWcorner[0]
171e_max_area = 600000#SEcorner[0]
172n_min_area = 5160000#NWcorner[1]
173n_max_area = 5280000#SEcorner[1]
174
175#Interior region - Hobart city area + Glenorchy, Kingston
176i0 = [517000, 5267000]
177i1 = [517000, 5255000]
178i2 = [520000, 5250000]
179i3 = [522000, 5239000]
180i4 = [524000, 5238000]
181i5 = [526000, 5236000]
182i6 = [530000, 5244000]
183i7 = [530000, 5250000]
184i8 = [534000, 5254000]
185i9 = [520000, 5270000]
186
187poly_hobart = [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9]
188
189# Tasman Peninsula
190l0 = [550000, 5247000]
191l1 = [550000, 5211000]
192l2 = [583000, 5211000]
193l3 = [583000, 5247000]
194
195poly_tasman_peninsula = [l0, l1, l2, l3]
196
197# Bruny Island
198from anuga.utilities.polygon import read_polygon
199poly_bruny = read_polygon(polygondir+'bruny.csv')
Note: See TracBrowser for help on using the repository browser.