source: development/dam_2006/project.py @ 3456

Last change on this file since 3456 was 3456, checked in by duncan, 18 years ago

change output from speed to velocity

File size: 2.3 KB
Line 
1"""Common filenames and locations for topographic data, meshes and outputs.
2Also includes origin for slump scenario.
3"""
4
5from os import sep, environ, getenv, getcwd
6import sys
7from time import localtime, strftime
8from os import mkdir, access, F_OK
9               
10#Making assumptions about the location of scenario data
11scenario_dir_name = 'dam_2006'
12
13#swollen/ all data output
14basename = 'source'
15
16if sys.platform == 'win32':
17    home = environ['INUNDATIONHOME']     #Sandpit's parent dir
18else:   
19    home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'1'+sep+'cit'+sep+'risk_assessment_methods_project'+sep+'inundation')     
20
21#Derive subdirectories and filenames
22time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
23scenariodir =  home+sep+scenario_dir_name
24outputdir = scenariodir+sep+'output'+sep
25outputtimedir = outputdir+time+sep
26meshdir = scenariodir+sep+'meshes'+sep
27datadir = scenariodir+sep+'topographies'+sep
28gaugedir = scenariodir+sep+'gauges'+sep
29polygondir = scenariodir+sep+'polygons'+sep
30boundarydir = scenariodir+sep+'boundaries'+sep
31#output dir without time
32outputdir = scenariodir+sep+'output'+sep
33tidedir = scenariodir+sep+'tide_data'+sep
34
35gauge_filename = gaugedir + 'gauge_location_dam.xya'
36#buildings_filename = gaugedir + 'onslow_res.csv'
37#community_filename = gaugedir + 'CHINS_v2.csv'
38#community_scenario = gaugedir + 'community_onslow.csv'
39#gaugetimeseries = gaugedir + 'onslow'
40depth_filename = outputtimedir + "depth.csv"
41velocity_x_filename = outputtimedir + "velocity_x.csv"
42velocity_y_filename = outputtimedir + "velocity_y.csv"
43
44
45# creates copy of output dir structure, if it doesn't exist
46if not access(scenariodir,F_OK):
47    mkdir (scenariodir)
48
49if not access(meshdir,F_OK):
50    mkdir (meshdir)
51
52if not access(outputdir,F_OK):
53    mkdir (outputdir)
54       
55if not access(outputtimedir,F_OK):
56    mkdir (outputtimedir)
57
58if not access(gaugedir,F_OK):
59    mkdir (gaugedir)
60
61# boundary source data
62#MOST_dir = 'f:'+sep+'3'+sep+'ehn'+sep+'users'+sep+'davidb'+sep+'tsunami'+sep+'WA_project'+sep+'SU-AU_90'+sep+'most_2'+sep+'detailed'+sep
63
64codedir = getcwd()+sep
65                               
66codedirname = codedir + 'project.py'
67
68meshname = meshdir + basename
69
70outputname = outputtimedir + basename  #Used by post processing
71
72mesh_filename = meshname+'.msh'
73
Note: See TracBrowser for help on using the repository browser.