1 | """Common filenames and locations for topographic data, meshes and outputs. |
---|
2 | """ |
---|
3 | |
---|
4 | |
---|
5 | from os import sep |
---|
6 | from os.path import expanduser |
---|
7 | import sys |
---|
8 | |
---|
9 | #Making assumptions about the location of scenario data |
---|
10 | scenario_dir_name = 'sydney_tsunami_scenario_2006' |
---|
11 | basename = 'sydney_2006_100' # get from Neil (DEM or topo data) |
---|
12 | |
---|
13 | if sys.platform == 'win32': |
---|
14 | home = '..\..\..\..' #Sandpit's parent dir |
---|
15 | else: |
---|
16 | home = expanduser('~') |
---|
17 | |
---|
18 | |
---|
19 | #Derive subdirectories and filenames |
---|
20 | meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep |
---|
21 | datadir = home+sep+scenario_dir_name+sep+'topographies'+sep |
---|
22 | outputdir = home+sep+scenario_dir_name+sep+'output'+sep |
---|
23 | #boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep |
---|
24 | |
---|
25 | meshname = meshdir + basename |
---|
26 | demname = datadir + basename |
---|
27 | #boundaryname = boundarydir + boundary_basename |
---|
28 | outputname = outputdir + basename #Used by post processing |
---|
29 | |
---|
30 | |
---|
31 | #Georeferencing |
---|
32 | from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees |
---|
33 | |
---|
34 | #Origin of existing dem (FIXME: Temporary measure) |
---|
35 | mesh_origin = (56, 314036, 6224951) # input from Neil's data |
---|
36 | |
---|
37 | # define clipping polygon |
---|
38 | #south = degminsec2decimal_degrees(-20,45,0) |
---|
39 | #north = degminsec2decimal_degrees(-20,15,0) |
---|
40 | #west = degminsec2decimal_degrees(116,30,0) |
---|
41 | #east = degminsec2decimal_degrees(117,0,0) |
---|
42 | |
---|
43 | south = degminsec2decimal_degrees(-34,05,0) |
---|
44 | north = degminsec2decimal_degrees(-33,45,0) |
---|
45 | west = degminsec2decimal_degrees(151,0,0) |
---|
46 | east = degminsec2decimal_degrees(151,30,0) |
---|
47 | |
---|
48 | p0 = [south, west] |
---|
49 | p1 = [south, east] |
---|
50 | p2 = [north, east] |
---|
51 | p3 = [north, west] |
---|
52 | |
---|
53 | polygonall = [p0, p1, p2, p3] |
---|
54 | refzone = 56 |
---|
55 | |
---|
56 | # setting up problem area for doing just around the harbour |
---|
57 | hsouth = degminsec2decimal_degrees(-33,54,0) |
---|
58 | hnorth = degminsec2decimal_degrees(-33,48,0) |
---|
59 | hwest = degminsec2decimal_degrees(151,0,0) |
---|
60 | heast = degminsec2decimal_degrees(151,30,0) |
---|
61 | |
---|
62 | hp0 = [hsouth, hwest] |
---|
63 | hp1 = [hsouth, heast] |
---|
64 | hp2 = [hnorth, heast] |
---|
65 | hp3 = [hnorth, hwest] |
---|
66 | polygon_h = [hp0, hp1, hp2, hp3] |
---|
67 | |
---|
68 | #Interior regions - the Harbour |
---|
69 | harbour_south = degminsec2decimal_degrees(-33,53,0) |
---|
70 | harbour_north = degminsec2decimal_degrees(-33,47,0) |
---|
71 | harbour_west = degminsec2decimal_degrees(151,5,0) |
---|
72 | harbour_east = degminsec2decimal_degrees(151,19,0) |
---|
73 | |
---|
74 | k0 = [harbour_south, harbour_west] |
---|
75 | k1 = [harbour_south, harbour_east] |
---|
76 | k2 = [harbour_north, harbour_east] |
---|
77 | k3 = [harbour_north, harbour_west] |
---|
78 | |
---|
79 | harbour_polygon = [k0, k1, k2, k3] |
---|
80 | |
---|
81 | # setting up problem area for doing just around Botany Bay |
---|
82 | bsouth = degminsec2decimal_degrees(-33,56,0) |
---|
83 | bnorth = degminsec2decimal_degrees(-34,3,0) |
---|
84 | bwest = degminsec2decimal_degrees(151,0,0) |
---|
85 | beast = degminsec2decimal_degrees(151,30,0) |
---|
86 | |
---|
87 | bp0 = [bsouth, bwest] |
---|
88 | bp1 = [bsouth, beast] |
---|
89 | bp2 = [bnorth, beast] |
---|
90 | bp3 = [bnorth, bwest] |
---|
91 | polygon_bb = [bp0, bp1, bp2, bp3] |
---|
92 | |
---|
93 | #Interior region - Botany Bay |
---|
94 | botanybay_south = degminsec2decimal_degrees(-33,58,0) |
---|
95 | botanybay_north = degminsec2decimal_degrees(-34,1,0) |
---|
96 | botanybay_west = degminsec2decimal_degrees(151,5,0) |
---|
97 | botanybay_east = degminsec2decimal_degrees(151,18,0) |
---|
98 | |
---|
99 | j0 = [botanybay_south, botanybay_west] |
---|
100 | j1 = [botanybay_south, botanybay_east] |
---|
101 | j2 = [botanybay_north, botanybay_east] |
---|
102 | j3 = [botanybay_north, botanybay_west] |
---|
103 | |
---|
104 | botanybay_polygon = [j0, j1, j2, j3] |
---|
105 | |
---|