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