1 | """Common filenames and locations for topographic data, meshes and outputs. |
---|
2 | Also includes origin for slump scenario. |
---|
3 | """ |
---|
4 | |
---|
5 | from os import sep, environ |
---|
6 | from os.path import expanduser |
---|
7 | import sys |
---|
8 | |
---|
9 | # We'll do this for the final thing |
---|
10 | home = '.' |
---|
11 | |
---|
12 | if sys.platform == 'win32': |
---|
13 | home = environ['INUNDATIONHOME'] #Sandpit's parent dir |
---|
14 | else: |
---|
15 | home = expanduser('~') |
---|
16 | |
---|
17 | basename = 'Sydney' |
---|
18 | |
---|
19 | #Setting the location of scenario data |
---|
20 | scenario_dir_name = 'sydney_tsunami_example_2006' |
---|
21 | # revised 100m data |
---|
22 | #coarsename = 'bathyland100' |
---|
23 | # revised 25m data |
---|
24 | #finename = 'bathy_dem25' |
---|
25 | # revised 25m data |
---|
26 | dem_name = 'sydney_MGA56' |
---|
27 | |
---|
28 | home += sep + 'data' + sep + 'new_south_wales' |
---|
29 | |
---|
30 | #Derive subdirectories and filenames |
---|
31 | meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep |
---|
32 | datadir = home+sep+scenario_dir_name+sep+'topographies'+sep |
---|
33 | outputdir = home+sep+scenario_dir_name+sep+'output'+sep |
---|
34 | polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep |
---|
35 | |
---|
36 | meshname = meshdir + basename |
---|
37 | #coarsedemname = datadir + coarsename |
---|
38 | #finedemname = datadir + finename |
---|
39 | demname = datadir + dem_name |
---|
40 | combineddemname = datadir + 'sydneytopo' |
---|
41 | |
---|
42 | refzone = 56 |
---|
43 | print 'refzone', refzone |
---|
44 | |
---|
45 | # demo poly |
---|
46 | j0 = [385000, 6280000] |
---|
47 | j1 = [360000, 6273000] |
---|
48 | j2 = [335000, 6273000] |
---|
49 | j3 = [330000, 6265000] |
---|
50 | j31 = [325000, 6260000] |
---|
51 | j4 = [316000, 6260000] |
---|
52 | j5 = [316000, 6246750] |
---|
53 | j6 = [350000, 6246750] |
---|
54 | j7 = [385000, 6238000] |
---|
55 | |
---|
56 | demopoly = [j0, j1, j2, j3, j31, j4, j5, j6, j7] |
---|
57 | |
---|
58 | from anuga.utilities.polygon import read_polygon, plot_polygons |
---|
59 | #polygonptsfile4 = polygondir + 'poly1' |
---|
60 | #polygonptsfile0 = polygondir + 'poly2' |
---|
61 | #polygonptsfile1 = polygondir + 'poly3' |
---|
62 | #polygonptsfile2 = polygondir + 'poly4' |
---|
63 | #polygonptsfile3 = polygondir + 'poly5' |
---|
64 | #northern_polygon = read_polygon(polygonptsfile0 + '.csv') |
---|
65 | #manly_polygon = read_polygon(polygonptsfile1 + '.csv') |
---|
66 | #harbour_polygon = read_polygon(polygonptsfile2 + '.csv') |
---|
67 | #southern_polygon = read_polygon(polygonptsfile3 + '.csv') |
---|
68 | #top_polygon = read_polygon(polygonptsfile4 + '.csv') |
---|
69 | coastal_polygon = read_polygon(polygondir+'coastal'+'.csv') |
---|
70 | shallow_polygon = read_polygon(polygondir+'shallow'+'.csv') |
---|
71 | |
---|
72 | #plot_polygons([demopoly,northern_polygon,manly_polygon,harbour_polygon,southern_polygon,top_polygon],'model_setup',verbose=False) |
---|
73 | plot_polygons([demopoly,coastal_polygon,shallow_polygon],'new_model_setup',verbose=False) |
---|
74 | |
---|
75 | slump_origin = [372500.0, 6255000.0] #Absolute UTM |
---|