Rev | Line | |
---|
[2927] | 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 = 'momentum_sink_2005' |
---|
| 14 | basename = 'buildings' |
---|
| 15 | |
---|
| 16 | if sys.platform == 'win32': |
---|
| 17 | home = environ["INUNDATIONHOME"] #Sandpit's parent dir |
---|
| 18 | else: |
---|
| 19 | home = expanduser('~') |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | #Derive subdirectories and filenames |
---|
| 23 | meshdir = home+sep+scenario_dir_name+sep+'meshes'+sep |
---|
| 24 | outputdir = home+sep+scenario_dir_name+sep+'output'+sep |
---|
| 25 | building_dir = home+sep+scenario_dir_name+sep+'output'+sep |
---|
| 26 | friction_dir = home+sep+scenario_dir_name+sep+'output'+sep |
---|
| 27 | meshname = meshdir + basename + '.tsh' |
---|
| 28 | outputname = outputdir + basename + '.sww' #Used by post processing |
---|
| 29 | |
---|
| 30 | #------------------------------------------------------------- |
---|
| 31 | if __name__ == "__main__": |
---|
| 32 | print "mesh_elevname",mesh_elevname |
---|
| 33 | update_names(999) |
---|
| 34 | print "mesh_elevname",mesh_elevname |
---|
Note: See
TracBrowser
for help on using the repository browser.