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 | Output: |
---|
12 | |
---|
13 | - building_filename (.csv) augmented to include maximum depth, momentum and |
---|
14 | velocity and stored in same location as swwfile |
---|
15 | Name = augmented_buildings.csv |
---|
16 | |
---|
17 | """ |
---|
18 | |
---|
19 | from os import sep |
---|
20 | |
---|
21 | from anuga.damage_modelling.inundation_damage import add_depth_and_momentum2csv, inundation_damage |
---|
22 | import project |
---|
23 | |
---|
24 | # Inputs |
---|
25 | #timestamp_dir = '20070615_024233_run_final_1.4_dampier_nbartzis' # HAT dampier |
---|
26 | #timestamp_dir = '20070615_024322_run_final_0_dampier_nbartzis' # MSL dampier |
---|
27 | #timestamp_dir = '20070604_015217_run_final_1.4_exmouth_nbartzis' # HAT exmouth parallel 4 |
---|
28 | #timestamp_dir = '20070615_023718_run_final_0_exmouth_nbartzis' # MSL exmouth parallel 2 |
---|
29 | #timestamp_dir = '20070615_023954_run_final_1.4_onslow_nbartzis' # HAT onslow |
---|
30 | #timestamp_dir = '20070615_023908_run_final_0_onslow_nbartzis' # MSL onslow parallel 2 |
---|
31 | |
---|
32 | file_loc = project.output_dir + timestampdir + sep |
---|
33 | swwfile = file_loc + project.scenario_name + '.sww' |
---|
34 | buildings_filename = project.buildings_filename |
---|
35 | buildings_filename_out = file_loc + project.buildings_filename_out |
---|
36 | |
---|
37 | #add_depth_and_momentum2csv(swwfile, buildings_filename, buildings_filename_out) |
---|
38 | inundation_damage(swwfile, buildings_filename, buildings_filename_out) |
---|
39 | |
---|
40 | print '\n Augmented building file written to %s \n' \ |
---|
41 | %buildings_filename_out |
---|