Line | |
---|
1 | """ Script for calculating maximum inundation at building locations |
---|
2 | |
---|
3 | Inputs: |
---|
4 | |
---|
5 | swwfile - name of sww file |
---|
6 | - assume that all conserved quantities have been stored |
---|
7 | |
---|
8 | buildings_filename - name of file containing building data, sourced |
---|
9 | from NBED |
---|
10 | |
---|
11 | time_min - beginning of user defined time range |
---|
12 | - default will be first available time found in swwfile |
---|
13 | |
---|
14 | time_max - end of user defined time range |
---|
15 | - default will be last available time found in swwfile |
---|
16 | |
---|
17 | Output: |
---|
18 | |
---|
19 | - building_filename (.csv) augmented to include maximum depth, momentum and |
---|
20 | velocity and stored in same location as swwfile |
---|
21 | Name = augmented_buildings.csv |
---|
22 | |
---|
23 | """ |
---|
24 | |
---|
25 | from os import sep |
---|
26 | |
---|
27 | from damage.inundation_damage import add_depth_and_momentum2csv |
---|
28 | import project |
---|
29 | |
---|
30 | # Inputs |
---|
31 | #timestampdir = '20060704_063005' # HAT |
---|
32 | #timestampdir = '20060704_063112' # LAT |
---|
33 | timestampdir = '20060704_063234' # MSL |
---|
34 | file_loc = project.outputdir + timestampdir + sep |
---|
35 | swwfile = file_loc + project.basename + '.sww' |
---|
36 | buildings_filename = project.buildings_filename |
---|
37 | |
---|
38 | add_depth_and_momentum2csv(swwfile, buildings_filename, |
---|
39 | project.buildings_filename_out) |
---|
40 | |
---|
41 | |
---|
42 | print '\n Augmented building file written to %s \n' \ |
---|
43 | %project.buildings_filename_out |
---|
Note: See
TracBrowser
for help on using the repository browser.