source: development/dam_2006/project.py @ 3420

Last change on this file since 3420 was 3321, checked in by duncan, 19 years ago

Adding gauge stuff

File size: 2.1 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'
40
41
42# creates copy of output dir structure, if it doesn't exist
43if not access(scenariodir,F_OK):
44    mkdir (scenariodir)
45
46if not access(meshdir,F_OK):
47    mkdir (meshdir)
48
49if not access(outputdir,F_OK):
50    mkdir (outputdir)
51       
52if not access(outputtimedir,F_OK):
53    mkdir (outputtimedir)
54
55if not access(gaugedir,F_OK):
56    mkdir (gaugedir)
57
58# boundary source data
59#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
60
61codedir = getcwd()+sep
62                               
63codedirname = codedir + 'project.py'
64
65meshname = meshdir + basename
66
67outputname = outputtimedir + basename  #Used by post processing
68
69mesh_filename = meshname+'.msh'
70
Note: See TracBrowser for help on using the repository browser.