![]() |
Tsunami Inundation Models for the BATEMANS BAY 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 ArcGIS grid 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'For information on output_folder_name.
Then modify the line:
time_dirs = [time_dir1, time_dir2]to include each of the variables you defined above.
times = [37860] or times = [20000, 40000, 60000]
Note we do not have to specify the first SWW file, only the extra file start times. If there are no extra SWW files, just do:
times = []
cellsize = 20 # ArcGIS grid cell size in metres
Note: That this value should not go beyond the most refined part of the mesh i.e. if mesh resolution is 500m2, cellsize = (500 x 2)1/2 = 32m
timestep = None # over all timesteps #timestep = 0
Note that if you want the elevation use timestep = 0. Elevation does not change over time and you only need the first SWW file.
area = ['Batemans_Bay', '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_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'as necessary. Then modify the line:
time_dirs = [time_dir1, time_dir2]to include each of the variables you defined above.
easting,northing,name,elevation 559134.8963,5251176.875,Connelly,2 532441.5164,5239639.686,Opossum,2