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 = 'gippsland_storm_surge_2005' |
---|
11 | |
---|
12 | basename = 'test' |
---|
13 | |
---|
14 | if sys.platform == 'win32': |
---|
15 | home = '..\..\..\..\..\..' #Sandpit's parent dir |
---|
16 | else: |
---|
17 | home = expanduser('~') |
---|
18 | |
---|
19 | |
---|
20 | #Derive subdirectories and filenames |
---|
21 | meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep |
---|
22 | datadir = home+sep+scenario_dir_name+sep+'topographies'+sep |
---|
23 | outputdir = home+sep+scenario_dir_name+sep+'output'+sep |
---|
24 | boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep |
---|
25 | |
---|
26 | meshname = meshdir + basename |
---|
27 | demname = datadir + basename |
---|
28 | boundaryname = boundarydir + boundary_basename |
---|
29 | outputname = outputdir + basename #Used by post processing |
---|
30 | |
---|
31 | gauge_filename = 'all_bld_ind.csv' |
---|
32 | |
---|
33 | |
---|
34 | #Georeferencing |
---|
35 | from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees |
---|
36 | |
---|
37 | #Origin of existing dem (FIXME: Temporary measure) |
---|
38 | #mesh_origin = (50, 421544.35127423, 7677669.5257159) #250m |
---|
39 | #mesh_origin = (50, 420468.31429902, 7677669.5257159) #100m |
---|
40 | |
---|
41 | |
---|
42 | #south = degminsec2decimal_degrees(-20,45,0) |
---|
43 | #north = degminsec2decimal_degrees(-20,15,0) |
---|
44 | #west = degminsec2decimal_degrees(116,30,0) |
---|
45 | #east = degminsec2decimal_degrees(117,0,0) |
---|
46 | |
---|
47 | north = -37.75 |
---|
48 | south = -38.0 |
---|
49 | west = 147.0 |
---|
50 | east = 148.0 |
---|
51 | |
---|
52 | p0 = [north, west] |
---|
53 | p1 = [north, east] |
---|
54 | p2 = [south, east] |
---|
55 | p3 = [south, west] |
---|
56 | |
---|
57 | |
---|
58 | polygon = [p0, p1, p2, p3] |
---|
59 | refzone = 50 |
---|
60 | |
---|