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

Last change on this file since 3383 was 3275, checked in by sexton, 19 years ago

updates on sydney demo for user manual

File size: 1.8 KB
RevLine 
[2461]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
[2462]9# We'll do this for the final thing
[2461]10home = '.'
11
[2462]12if sys.platform == 'win32':
13    home = environ['INUNDATIONHOME']     #Sandpit's parent dir
14else:   
15    home = expanduser('~')
16   
[2461]17basename = 'Sydney'
18
19#Setting the location of scenario data
20scenario_dir_name = 'sydney_tsunami_example_2006'
21# revised 100m data
[3275]22coarsename = 'bathyland100' 
[2461]23# revised 25m data
[3275]24finename = 'bathy_dem25'
[2461]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
[3275]40# demo poly
[3136]41j0 = [385000, 6280000]
[3190]42j1 = [360000, 6272500]
43j2 = [335000, 6272500]
44j3 = [330000, 6265000]
45j31 = [325000, 6260000]
[3136]46j4 = [316000, 6260000]
47j5 = [316000, 6247000]
48j6 = [350000, 6247000]
49j7 = [385000, 6238000]
50
[3190]51demopoly = [j0, j1, j2, j3, j31, j4, j5, j6, j7]
[3136]52
[3275]53from utilities.polygon import read_polygon
[3190]54polygonptsfile4 = polygondir + 'poly1'
55polygonptsfile0 = polygondir + 'poly2'
[3136]56polygonptsfile1 = polygondir + 'poly3'
57polygonptsfile2 = polygondir + 'poly4'
58polygonptsfile3 = polygondir + 'poly5'
[3190]59northern_polygon = read_polygon(polygonptsfile0 + '.csv')
60manly_polygon = read_polygon(polygonptsfile1 + '.csv')
[3136]61harbour_polygon = read_polygon(polygonptsfile2 + '.csv')
62southern_polygon = read_polygon(polygonptsfile3 + '.csv')
[3190]63top_polygon = read_polygon(polygonptsfile4 + '.csv')
[3136]64
[3150]65slump_origin = [372500.0, 6255000.0] #Absolute UTM
Note: See TracBrowser for help on using the repository browser.