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

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

updates to work on cyclone

File size: 5.3 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
15onshore_name = 'hob3_topo' 
16offshore_name_tas1 = 'derwent_2m'
17offshore_name_tas2 = 'derwent_5m'
18offshore_name_tas3 = 'south_east_tas'
19offshore_name_tas4 = 'hobart_1m'
20
21# AHO data and checked by NM&I
22offshore_name1 = 'xy100003760'
23offshore_name2 = 'xy100003761'
24offshore_name3 = 'xy100003762'
25offshore_name4 = 'xy100003907'
26offshore_name5 = 'xy100003908'
27offshore_name6 = 'xy100003909'
28offshore_name7 = 'xy100003910'
29offshore_name8 = 'xy100003932'
30offshore_name9 = 'xy100003933'
31offshore_name10 = 'xy100003934'
32offshore_name11 = 'xy100003935'
33offshore_name12 = 'xy100003936'
34offshore_name13 = 'xy100003964'
35offshore_name14 = 'xy100014250'
36offshore_name15 = 'xy100014253'
37offshore_name16 = 'xy100016142'
38
39# developed by NM&I
40coast_name = 'coastline_points'
41
42boundary_basename = 'SU-AU_clip'
43
44#swollen/ all data output
45basename = 'source'
46
47codename = 'project.py'
48
49if sys.platform == 'win32':
50    home = getenv('INUNDATIONHOME')
51    user = getenv('USERPROFILE')   
52else:   
53    home = getenv('INUNDATIONHOME', sep+'d'+sep+'xrd'+sep+'gem'+sep+'2'+sep+'ramp'+'risk_assessment_methods_project'+sep+'inundation'+sep+'data')     
54    user = getenv('LOGNAME')
55    print 'USER:', user
56
57#Derive subdirectories and filenames
58#time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
59local_time = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir
60
61meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
62datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
63gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
64polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
65boundarydir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep
66#output dir without time
67outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep
68outputtimedir = outputdir + local_time + sep
69polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
70
71gauge_filename = gaugedir + 'hobart_gauges.xya'
72buildings_filename = gaugedir + 'hobart_res.csv'
73buildings_filename_damage_out = 'hobart_res_modified.csv'
74
75gaugetimeseries = gaugedir + 'hobart'
76
77# boundary source data
78#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
79
80codedir = getcwd()+sep
81                               
82codedirname = codedir + 'project.py'
83
84meshname = outputtimedir + 'mesh_' + basename
85
86onshore_dem_name = datadir + onshore_name
87offshore_dem_name_local1 = datadir + offshore_name_tas1
88offshore_dem_name_local2 = datadir + offshore_name_tas2
89offshore_dem_name_local3 = datadir + offshore_name_tas3
90offshore_dem_name_local4 = datadir + offshore_name_tas4
91offshore_dem_name_aho1 = datadir + offshore_name1
92offshore_dem_name_aho2 = datadir + offshore_name2
93offshore_dem_name_aho3 = datadir + offshore_name3
94offshore_dem_name_aho4 = datadir + offshore_name4
95offshore_dem_name_aho5 = datadir + offshore_name5
96offshore_dem_name_aho6 = datadir + offshore_name6
97offshore_dem_name_aho7 = datadir + offshore_name7
98offshore_dem_name_aho8 = datadir + offshore_name8
99offshore_dem_name_aho9 = datadir + offshore_name9
100offshore_dem_name_aho10 = datadir + offshore_name10
101offshore_dem_name_aho11 = datadir + offshore_name11
102offshore_dem_name_aho12 = datadir + offshore_name12
103offshore_dem_name_aho13 = datadir + offshore_name13
104offshore_dem_name_aho14 = datadir + offshore_name14
105offshore_dem_name_aho15 = datadir + offshore_name15
106offshore_dem_name_aho16 = datadir + offshore_name16
107coast_dem_name = datadir + coast_name
108combined_dem_name = datadir + 'hobart_combined_elevation'
109
110outputname = outputtimedir + basename  #Used by post processing
111
112# region to export
113e_min_area = 500000
114e_max_area = 580000
115n_min_area = 5200000
116n_max_area = 5275000
117
118from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees, convert_points_from_latlon_to_utm
119                       
120# bounding box
121south = degminsec2decimal_degrees(-43,45,0)
122north = degminsec2decimal_degrees(-42,30,0)
123west = degminsec2decimal_degrees(146,45,0)
124east = degminsec2decimal_degrees(148,15,0)
125
126#Main Domain of Hobart: first run JS 18/9/06
127d0 = [south, west]
128d1 = [south, east]
129d2 = [north, east]
130d3 = [north, west]
131
132polyAll, zone = convert_points_from_latlon_to_utm([d0, d1, d2, d3])
133refzone = zone
134
135#Interior region - Hobart city area + Glenorchy, Kingston
136i0 = [517000, 5267000]
137i1 = [517000, 5255000]
138i2 = [520000, 5250000]
139i3 = [522000, 5239000]
140i4 = [524000, 5238000]
141i5 = [526000, 5236000]
142i6 = [530000, 5244000]
143i7 = [530000, 5250000]
144i8 = [534000, 5254000]
145i9 = [520000, 5270000]
146
147poly_hobart = [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9]
148
149# Tasman Peninsula
150l0 = [550000, 5247000]
151l1 = [550000, 5211000]
152l2 = [583000, 5211000]
153l3 = [583000, 5247000]
154
155poly_tasman_peninsula = [l0, l1, l2, l3]
156
157# Bruny Island
158from anuga.utilities.polygon import read_polygon
159poly_bruny = read_polygon(polygondir+'bruny.csv')
Note: See TracBrowser for help on using the repository browser.