source: documentation/user_manual/examples/project.py @ 3534

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

updates on sydney demo for user manual

File size: 1.8 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
6from os.path import expanduser
7import sys
8
9# We'll do this for the final thing
10home = '.'
11
12if sys.platform == 'win32':
13    home = environ['INUNDATIONHOME']     #Sandpit's parent dir
14else:   
15    home = expanduser('~')
16   
17basename = 'Sydney'
18
19#Setting the location of scenario data
20scenario_dir_name = 'sydney_tsunami_example_2006'
21# revised 100m data
22coarsename = 'bathyland100' 
23# revised 25m data
24finename = 'bathy_dem25'
25
26#Derive subdirectories and filenames
27meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep
28datadir = home+sep+scenario_dir_name+sep+'topographies'+sep
29outputdir = home+sep+scenario_dir_name+sep+'output'+sep
30polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep
31
32meshname = meshdir + basename
33coarsedemname = datadir + coarsename
34finedemname = datadir + finename
35combineddemname = datadir + 'sydneytopo'
36
37refzone = 56
38print 'refzone', refzone
39
40# demo poly
41j0 = [385000, 6280000]
42j1 = [360000, 6272500]
43j2 = [335000, 6272500]
44j3 = [330000, 6265000]
45j31 = [325000, 6260000]
46j4 = [316000, 6260000]
47j5 = [316000, 6247000]
48j6 = [350000, 6247000]
49j7 = [385000, 6238000]
50
51demopoly = [j0, j1, j2, j3, j31, j4, j5, j6, j7]
52
53from utilities.polygon import read_polygon
54polygonptsfile4 = polygondir + 'poly1'
55polygonptsfile0 = polygondir + 'poly2'
56polygonptsfile1 = polygondir + 'poly3'
57polygonptsfile2 = polygondir + 'poly4'
58polygonptsfile3 = polygondir + 'poly5'
59northern_polygon = read_polygon(polygonptsfile0 + '.csv')
60manly_polygon = read_polygon(polygonptsfile1 + '.csv')
61harbour_polygon = read_polygon(polygonptsfile2 + '.csv')
62southern_polygon = read_polygon(polygonptsfile3 + '.csv')
63top_polygon = read_polygon(polygonptsfile4 + '.csv')
64
65slump_origin = [372500.0, 6255000.0] #Absolute UTM
Note: See TracBrowser for help on using the repository browser.