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

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

updates to Hobart script(data not yet received)

File size: 3.8 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 = 'hobart_onshore' 
16offshore_name = 'hobart_offshore_points'
17
18# developed by NM&I
19coast_name = 'hobart_coast'
20
21boundary_basename = 'SU-AU_clip'
22
23#swollen/ all data output
24basename = 'source'
25
26codename = 'project.py'
27
28if sys.platform == 'win32':
29    home = getenv('INUNDATIONHOME')
30    user = getenv('USERPROFILE')   
31else:   
32    home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'1'+sep+'cit'+sep+'risk_assessment_methods_project'+sep+'inundation')     
33    user = getenv('LOGNAME')
34    print 'USER:', user
35
36#Derive subdirectories and filenames
37#time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
38local_time = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir
39
40meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
41datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
42gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
43polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
44boundarydir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep
45#output dir without time
46outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'outputs'+sep
47outputtimedir = outputdir + local_time + sep
48polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
49
50gauge_filename = gaugedir + 'hobart_gauges.xya'
51buildings_filename = gaugedir + 'hobart_res.csv'
52buildings_filename_damage_out = 'hobart_res_modified.csv'
53
54gaugetimeseries = gaugedir + 'hobart'
55
56# boundary source data
57#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
58
59codedir = getcwd()+sep
60                               
61codedirname = codedir + 'project.py'
62
63meshname = outputtimedir + 'mesh_' + basename
64coarsedemname = datadir + coarsename
65
66onshore_dem_name = datadir + onshore_name
67offshore_dem_name_local = datadir + offshore_name_local
68offshore_dem_name_aho = datadir + offshore_name_fairsheets
69coast_dem_name = datadir + coast_name
70combined_dem_name = datadir + 'hobart_combined_elevation'
71
72outputname = outputtimedir + basename  #Used by post processing
73
74# region to export
75e_min_area = 500000
76e_max_area = 540000
77n_min_area = 5220000
78n_max_area = 5275000
79
80from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees,
81                        convert_points_from_latlon_to_utm
82                       
83# bounding box
84south = degminsec2decimal_degrees(-43,45,0)
85north = degminsec2decimal_degrees(-42,30,0)
86west = degminsec2decimal_degrees(146,45,0)
87east = degminsec2decimal_degrees(148,15,0)
88
89#Main Domain of Hobart: first run JS 18/9/06
90d0 = [south, west]
91d1 = [south, east]
92d2 = [north, east]
93d3 = [north, west]
94
95polyAll, zone = convert_points_from_latlon_to_utm([d0, d1, d2, d3])
96refzone = zone
97
98#Interior region - Hobart city area + glenorchy, Kingston
99i0 = [517000, 5267000]
100i1 = [517000, 5255000]
101i2 = [520000, 5250000]
102i3 = [522000, 5239000]
103i4 = [524000, 5238000]
104i5 = [526000, 5236000]
105i6 = [530000, 5244000]
106i7 = [530000, 5250000]
107i7 = [534000, 5254000]
108i7 = [520000, 5270000]
109
110poly_hobart = [i0, i1, i2, i3, i4, i5]
111
112# Tasman Peninsula
113l0 = [550000, 5247000]
114l1 = [550000, 5211000]
115l2 = [583000, 5211000]
116l3 = [583000, 5247000]
117
118poly_tasman_peninsula = [l0, l1, l2, l3]
119
120# Bruny Island
121from anuga.utilities.polygon import read_polygon
122poly_bruny = read_polygon(polygondir+'bruny.csv')
Note: See TracBrowser for help on using the repository browser.