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 | #timestampdir = '20070419_065050_run' # HAT 1 in 10000 yr Dampier event |
---|
26 | #timestampdir = '20070419_065018_run' # MSL 1 in 10000 yr Dampier event |
---|
27 | #timestampdir = '20070618_063824_run_final_2.4_onslow_nbartzis' # HAT onslow |
---|
28 | #timestampdir = '20070618_050232_run_final_0.0_onslow_nbartzis' # MSL onslow |
---|
29 | #timestampdir = '20070620_044352_run_final_0.0_exmouth_nbartzis' # MSL exmouth |
---|
30 | timestampdir = '20070620_044413_run_final_2.4_exmouth_nbartzis' # HAT exmouth |
---|
31 | file_loc = project.output_dir + timestampdir + sep |
---|
32 | swwfilebasename = file_loc + project.scenario_name #+ '.sww' |
---|
33 | buildings_filename = project.buildings_filename |
---|
34 | buildings_filename_out = file_loc + project.buildings_filename_out |
---|
35 | print 'hello', swwfilebasename |
---|
36 | add_depth_and_momentum2csv(swwfilebasename, buildings_filename, buildings_filename_out) |
---|
37 | inundation_damage(swwfilebasename, buildings_filename, buildings_filename_out) |
---|
38 | |
---|
39 | print '\n Augmented building file written to %s \n' \ |
---|
40 | %buildings_filename_out |
---|