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 | from utilities.polygon import read_polygon |
---|
8 | import sys |
---|
9 | |
---|
10 | from pmesh.create_mesh import convert_points_from_latlon_to_utm |
---|
11 | |
---|
12 | #Making assumptions about the location of scenario data |
---|
13 | scenario_dir_name = 'onslow_tsunami_scenario_2006' |
---|
14 | |
---|
15 | |
---|
16 | # 250m data to be provided |
---|
17 | coarsename = 'onsl_bathydem250' # get from Neil/Ingo (DEM or topo data) |
---|
18 | """ |
---|
19 | # 30m data to be provided |
---|
20 | finename = 'onshore_30' # get from Neil/Ingo (DEM or topo data) |
---|
21 | """ |
---|
22 | |
---|
23 | # clipping region for fine elevation data |
---|
24 | west = 240000 |
---|
25 | east = 340000 |
---|
26 | south = 7570000 |
---|
27 | north = 7645000 |
---|
28 | |
---|
29 | #swollen/ all data output |
---|
30 | basename = 'source' |
---|
31 | |
---|
32 | if sys.platform == 'win32': |
---|
33 | home = environ['INUNDATIONHOME'] #Sandpit's parent dir |
---|
34 | else: |
---|
35 | home = expanduser('~') |
---|
36 | |
---|
37 | #Derive subdirectories and filenames |
---|
38 | meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep |
---|
39 | datadir = home+sep+scenario_dir_name+sep+'topographies'+sep |
---|
40 | outputdir = home+sep+scenario_dir_name+sep+'output'+sep |
---|
41 | polygondir = home+sep+scenario_dir_name+sep+'polygons'+sep |
---|
42 | boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep |
---|
43 | |
---|
44 | meshname = meshdir + basename |
---|
45 | |
---|
46 | coarsedemname = datadir + coarsename |
---|
47 | """ |
---|
48 | finedemname = datadir + finename |
---|
49 | combineddemname = datadir + 'onslow_combined_elevation' |
---|
50 | """ |
---|
51 | |
---|
52 | outputname = outputdir + basename #Used by post processing |
---|
53 | |
---|
54 | #!gauge_filename = outputdir + 'onslow_gauges.xya' |
---|
55 | #!gauge_outname = outputdir + 'gauges_max_output.xya' |
---|
56 | |
---|
57 | #Georeferencing |
---|
58 | from coordinate_transforms.redfearn import degminsec2decimal_degrees |
---|
59 | |
---|
60 | refzone = 50 |
---|
61 | |
---|
62 | #Main Domain of Onslow: first run NB 21/2/06 |
---|
63 | d0 = [305000, 7635000] |
---|
64 | d1 = [280000, 7635000] |
---|
65 | d2 = [250000, 7615000] |
---|
66 | d3 = [250000, 7590000] |
---|
67 | d4 = [310000, 7580000] |
---|
68 | d5 = [330000, 7610000] |
---|
69 | |
---|
70 | polyAll = [d0, d1, d2, d3, d4, d5] |
---|
71 | |
---|
72 | #Interior region - Onslow town |
---|
73 | |
---|
74 | i0 = [304000, 7608000] |
---|
75 | i1 = [302000, 7605000] |
---|
76 | i2 = [303000, 7602000] |
---|
77 | i3 = [305000, 7601000] |
---|
78 | i4 = [309000, 7603000] |
---|
79 | i5 = [307000, 7606500] |
---|
80 | |
---|
81 | poly_onslow = [i0, i1, i2, i3, i4, i5] |
---|
82 | |
---|
83 | #Thevenard Island |
---|
84 | j0 = [294000, 7629000] |
---|
85 | j1 = [285000, 7625000] |
---|
86 | j2 = [294000, 7621000] |
---|
87 | j3 = [299000, 7625000] |
---|
88 | |
---|
89 | poly_thevenard = [j0, j1, j2, j3] |
---|
90 | |
---|
91 | # Direction Is |
---|
92 | k0 = [309000, 7619000] |
---|
93 | k1 = [304000, 7619000] |
---|
94 | k2 = [304000, 7616500] |
---|
95 | k3 = [309000, 7616500] |
---|
96 | |
---|
97 | poly_direction = [k0, k1, k2, k3] |
---|
98 | |
---|
99 | #!slump_origin = [385000.0, 6255000.0] #Absolute UTM |
---|