Changeset 4750 for anuga_validation/UQ_runup_2006/project.py
- Timestamp:
- Oct 23, 2007, 4:00:41 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_validation/UQ_runup_2006/project.py
r4748 r4750 2 2 Also includes origin for slump scenario. 3 3 """ 4 5 from os import sep, environ, getenv, getcwd 6 import sys 7 from time import localtime, strftime 8 from os import mkdir, access, F_OK 9 10 #Making assumptions about the location of scenario data 11 scenario_dir_name = 'data'+sep+'flumes'+sep+'dam_2007' 12 13 #swollen/ all data output 14 basename = 'source' 15 16 if sys.platform == 'win32': 17 try: 18 home = environ['INUNDATIONHOME'] #Sandpit's parent dir 19 except: 20 home = '.' 21 else: 22 home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'1'+sep+'cit'+sep+'risk_assessment_methods_project'+sep+'inundation') 4 basename = "uq" 5 depth_filename = "depth.csv" 6 velocity_x_filename = "velocity_x.csv" 7 velocity_y_filename = "velocity_y.csv" 23 8 24 9 25 if not access(home, F_OK): 26 home = '.' 27 28 #Derive subdirectories and filenames 29 time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir 30 # time = "boom" 31 scenariodir = home+sep+scenario_dir_name 32 outputdir = scenariodir+sep+'output'+sep 33 outputtimedir = outputdir+time+sep 34 meshdir = scenariodir+sep+'meshes'+sep 10 mesh_filename = 'uq-mesh.tsh' 35 11 36 depth_filename = outputtimedir + "depth.csv"37 velocity_x_filename = outputtimedir + "velocity_x.csv"38 velocity_y_filename = outputtimedir + "velocity_y.csv"39 40 41 # creates copy of output dir structure, if it doesn't exist42 if not access(scenariodir,F_OK):43 mkdir (scenariodir)44 45 if not access(meshdir,F_OK):46 mkdir (meshdir)47 48 if not access(outputdir,F_OK):49 mkdir (outputdir)50 51 if not access(outputtimedir,F_OK):52 mkdir (outputtimedir)53 54 codedir = getcwd()+sep55 56 codedirname = codedir + 'project.py'57 58 meshname = meshdir + basename59 60 outputname = outputtimedir + basename #Used by post processing61 62 mesh_filename = meshname+'.tsh'63
Note: See TracChangeset
for help on using the changeset viewer.