[2041] | 1 | """Common filenames and locations for topographic data, meshes and outputs. |
---|
| 2 | """ |
---|
| 3 | |
---|
| 4 | |
---|
| 5 | from os import sep |
---|
[2058] | 6 | from os import environ |
---|
[2041] | 7 | from os.path import expanduser |
---|
| 8 | import sys |
---|
| 9 | |
---|
| 10 | #Making assumptions about the location of scenario data |
---|
[2058] | 11 | # Assumes the INUNDATIONHOME environ variable exists |
---|
[2076] | 12 | |
---|
[2093] | 13 | scenario_dir_name = 'gippsland_storm_surge_scenario_2005' |
---|
| 14 | basename = 'lakes_100' |
---|
| 15 | boundary_basename = 'csiro_bondary' |
---|
[2044] | 16 | |
---|
[2093] | 17 | if sys.platform == 'win32': |
---|
| 18 | home = environ["INUNDATIONHOME"] #Sandpit's parent dir |
---|
| 19 | else: |
---|
| 20 | home = expanduser('~') |
---|
[2041] | 21 | |
---|
| 22 | |
---|
[2093] | 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' |
---|
[2041] | 32 | |
---|
[2093] | 33 | meshname = meshdir + basename + '.msh' |
---|
| 34 | mesh_elevname = meshdir + basename + '_elev' + '.msh' |
---|
| 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 |
---|
[2041] | 40 | |
---|
[2093] | 41 | gauge_filename = 'all_bld_ind.csv' |
---|
[2041] | 42 | |
---|
[2093] | 43 | tide = 0.0 |
---|
[2041] | 44 | |
---|
| 45 | |
---|
[2084] | 46 | #------------------------------------------------------------- |
---|
| 47 | if __name__ == "__main__": |
---|
| 48 | print "mesh_elevname",mesh_elevname |
---|
| 49 | update_names(999) |
---|
| 50 | print "mesh_elevname",mesh_elevname |
---|