1 | """Common filenames and locations for topographic data, meshes and outputs. |
---|
2 | """ |
---|
3 | |
---|
4 | |
---|
5 | from os import sep |
---|
6 | from os import environ |
---|
7 | from os.path import expanduser |
---|
8 | import sys |
---|
9 | |
---|
10 | #Making assumptions about the location of scenario data |
---|
11 | # Assumes the INUNDATIONHOME environ variable exists |
---|
12 | scenario_dir_name = 'gippsland_storm_surge_scenario_2005' |
---|
13 | |
---|
14 | basename = 'test' |
---|
15 | |
---|
16 | boundary_basename = 'csiro_bondary' |
---|
17 | |
---|
18 | if sys.platform == 'win32': |
---|
19 | home = environ["INUNDATIONHOME"] #Sandpit's parent dir |
---|
20 | else: |
---|
21 | home = expanduser('~') |
---|
22 | |
---|
23 | |
---|
24 | #Derive subdirectories and filenames |
---|
25 | meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep |
---|
26 | datadir = home+sep+scenario_dir_name+sep+'topographies'+sep |
---|
27 | outputdir = home+sep+scenario_dir_name+sep+'output'+sep |
---|
28 | boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep |
---|
29 | bath_dir = boundarydir + 'bathymetry_expanded' |
---|
30 | elevation_dir = boundarydir + 'elev_expanded' |
---|
31 | ucur_dir = boundarydir + 'ucur_expanded' |
---|
32 | vcur_dir = boundarydir + 'vcur_expanded' |
---|
33 | |
---|
34 | meshname = meshdir + basename |
---|
35 | demname = datadir + basename |
---|
36 | boundaryname = boundarydir + boundary_basename |
---|
37 | outputname = outputdir + basename #Used by post processing |
---|
38 | |
---|
39 | gauge_filename = 'all_bld_ind.csv' |
---|
40 | |
---|
41 | tide = 0.0 |
---|
42 | |
---|
43 | #Georeferencing |
---|
44 | from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees |
---|
45 | |
---|
46 | #Origin of existing dem (FIXME: Temporary measure) |
---|
47 | #mesh_origin = (50, 421544.35127423, 7677669.5257159) #250m |
---|
48 | #mesh_origin = (50, 420468.31429902, 7677669.5257159) #100m |
---|
49 | |
---|
50 | |
---|
51 | #south = degminsec2decimal_degrees(-20,45,0) |
---|
52 | #north = degminsec2decimal_degrees(-20,15,0) |
---|
53 | #west = degminsec2decimal_degrees(116,30,0) |
---|
54 | #east = degminsec2decimal_degrees(117,0,0) |
---|
55 | |
---|
56 | north = -37.75 |
---|
57 | south = -38.0 |
---|
58 | west = 147.0 |
---|
59 | east = 148.0 |
---|
60 | |
---|
61 | p0 = [north, west] |
---|
62 | p1 = [north, east] |
---|
63 | p2 = [south, east] |
---|
64 | p3 = [south, west] |
---|
65 | |
---|
66 | |
---|
67 | polygon = [p0, p1, p2, p3] |
---|
68 | refzone = 50 |
---|
69 | |
---|