![]() |
Tsunami Inundation Models for the GOSFORD region |
This page describes the scripts and shows how to use them. Note that due to the ad-hoc nature of the scripts,
you must modify these scripts before they can be used to extract information from any SWW files you
generate.
export_results_max.py
The export_results_max.py script can be used to create an ASC file that contains the maximum
of an ANUGA variable or expression for each point in a user-defined raster on the simulation region.
You must change certain values within the export_results_max.py file to get what you want:
time_dir1 = '20090505_150430_run_final_0.8_58292_None_kvanputt' time_dir2 = '20090505_150517_run_final_0_58292_None_kvanputt' time_dir3 = '20090505_150711_run_final_0_58280_None_kvanputt' time_dir4 = '20090505_150805_run_final_0.8_58280_None_kvanputt' time_dir5 = '20090505_151322_run_final_0.8_64477_None_kvanputt' time_dir6 = '20090505_151447_run_final_0_64477_None_kvanputt'as necessary. Then modify the line:
time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]to include each of the variables you defined above.
cellsize = 20 # raster cell size in metres
timestep = 1000 #timestep = None # over all timesteps
Note that if you specify a particular timestep here you may not need to include all SWW files in the time_dirs list above. For example, if you wanted data from timestep 0 only then you would need to include only the first SWW file in the list.
area = ['Hobart', 'NW', 'South']Note that the name strings you put into the area list must match the names used in the project.py file. That is, if you use a name such as 'NW', then the project.py file must have lines like:
xminNW = 548000 xmaxNW = 561000 yminNW = 5250000 ymaxNW = 5258000which set the maximum and minimum eastings and northings that define a rectangular region.
If you don't want to clip to a region of interest, then do this:
area = ['All'] # no region of interest
var = ['depth', 'speed']Note that the strings you supply must be defined in the var_equations dictionary prior to your definition of var:
var_equations = {'stage': 'stage', 'momentum': '(xmomentum**2 + ymomentum**2)**0.5', 'depth': 'stage-elevation', 'speed': '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6)', 'elevation': 'elevation' }This dictionary maps your var strings to a variable or expression.
You must change certain values within the get_runup.py file to get what you want:
time_dir1 = '20090505_150430_run_final_0.8_58292_None_kvanputt' time_dir2 = '20090505_150517_run_final_0_58292_None_kvanputt' time_dir3 = '20090505_150711_run_final_0_58280_None_kvanputt' time_dir4 = '20090505_150805_run_final_0.8_58280_None_kvanputt' time_dir5 = '20090505_151322_run_final_0.8_64477_None_kvanputt' time_dir6 = '20090505_151447_run_final_0_64477_None_kvanputt'as necessary. Then modify the line:
time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]to include each of the variables you defined above.
You must change certain values within the get_timeseries.py file to get what you want:
time_dir1 = '20090505_150430_run_final_0.8_58292_None_kvanputt' time_dir2 = '20090505_150517_run_final_0_58292_None_kvanputt' time_dir3 = '20090505_150711_run_final_0_58280_None_kvanputt' time_dir4 = '20090505_150805_run_final_0.8_58280_None_kvanputt' time_dir5 = '20090505_151322_run_final_0.8_64477_None_kvanputt' time_dir6 = '20090505_151447_run_final_0_64477_None_kvanputt'as necessary. Then modify the line:
time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]to include each of the variables you defined above.