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 | |
---|
13 | scenario_dir_name = 'gippsland_storm_surge_scenario_2005' |
---|
14 | basename = 'lakes_100' |
---|
15 | boundary_basename = 'csiro_bondary' |
---|
16 | |
---|
17 | if sys.platform == 'win32': |
---|
18 | home = environ["INUNDATIONHOME"] #Sandpit's parent dir |
---|
19 | else: |
---|
20 | home = expanduser('~') |
---|
21 | |
---|
22 | |
---|
23 | #Derive subdirectories and filenames |
---|
24 | meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep |
---|
25 | datadir = home+sep+scenario_dir_name+sep+'topographies'+sep |
---|
26 | outputdir = home+sep+scenario_dir_name+sep+'output'+sep |
---|
27 | boundarydir = home+sep+scenario_dir_name+sep+'boundaries'+sep |
---|
28 | bath_dir = boundarydir + 'bathymetry_expanded' |
---|
29 | elevation_dir = boundarydir + 'elev_expanded' |
---|
30 | ucur_dir = boundarydir + 'ucur_expanded' |
---|
31 | vcur_dir = boundarydir + 'vcur_expanded' |
---|
32 | |
---|
33 | meshname = meshdir + basename + '.tsh' |
---|
34 | mesh_elevname = meshdir + basename + '_elev' + '.tsh' |
---|
35 | demname = datadir + basename + '.dem' |
---|
36 | #demname = datadir + 'lakes_100' |
---|
37 | pointname = datadir + basename + '.pts' |
---|
38 | boundaryname = boundarydir + boundary_basename + '.sww' |
---|
39 | outputname = outputdir + basename + '.sww' #Used by post processing |
---|
40 | |
---|
41 | gauge_filename = 'gauges.csv' |
---|
42 | |
---|
43 | tide = 0.0 |
---|
44 | |
---|
45 | |
---|
46 | #------------------------------------------------------------- |
---|
47 | if __name__ == "__main__": |
---|
48 | print "mesh_elevname",mesh_elevname |
---|
49 | update_names(999) |
---|
50 | print "mesh_elevname",mesh_elevname |
---|