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_urs |
---|
23 | |
---|
24 | # Inputs |
---|
25 | #time_dir = '20070615_063022_run_final_4.9_exmouth_nbartzis' # HAT exmouth |
---|
26 | #time_dir = '20070615_062730_run_final_0_exmouth_nbartzis' # MSL exmouth |
---|
27 | #time_dir = '20070618_064014_run_final_4.9_onslow_nbartzis' # HAT onslow |
---|
28 | #time_dir = '20070622_004008_run_final_0_onslow_nbartzis' # MSL onslow |
---|
29 | time_dir = '20070615_063137_run_final_4.9_dampier_nbartzis' # HAT dampier |
---|
30 | #time_dir = '20070621_002922_run_final_0_dampier_nbartzis' # MSL dampier |
---|
31 | |
---|
32 | file_loc = project_urs.output_dir + time_dir + sep |
---|
33 | swwfile = file_loc + project_urs.scenario_name #+ '.sww' |
---|
34 | buildings_filename = project_urs.buildings_filename |
---|
35 | buildings_filename_out = file_loc + project_urs.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 | |
---|
41 | print '\n Augmented building file written to %s \n' \ |
---|
42 | %buildings_filename_out |
---|