[7205] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
---|
| 2 | <html> |
---|
| 3 | <head> |
---|
| 4 | <title>Geoscience Australia</title> |
---|
| 5 | <link rel="stylesheet" href="browser_files/style.css"> |
---|
| 6 | <link REL="SHORTCUT ICON" HREF="browser_files/favicon.ico"> |
---|
| 7 | </head> |
---|
| 8 | <body> |
---|
| 9 | <table cellspacing="10" border="0"> |
---|
| 10 | <tr> |
---|
| 11 | <td> |
---|
| 12 | <img src="browser_files/logo.jpg" alt="Australian Government, Geoscience Australia" width="327" height="80" border="0"/> |
---|
| 13 | </td> |
---|
| 14 | <td width="50"> |
---|
| 15 | |
---|
| 16 | </td> |
---|
| 17 | <td> |
---|
| 18 | <H1>Tsunami Inundation Models for the GOSFORD region</H1> |
---|
| 19 | </td> |
---|
| 20 | </tr> |
---|
| 21 | </table> |
---|
| 22 | <hr> |
---|
| 23 | |
---|
[7265] | 24 | <a name="auxiliary scripts"><h2><b>Auxiliary Scripts</b></h2></a> |
---|
[7205] | 25 | There are number of auxiliary scripts on this disk that you can use to extract information from the SWW files |
---|
| 26 | produced by a simulation run. These scripts are not meant to be the definitive answer on how to get information |
---|
| 27 | from SWW files, but are offered as an example of one way to do it. |
---|
| 28 | <p> |
---|
| 29 | This page describes the scripts and shows how to use them. Note that due to the ad-hoc nature of the scripts, |
---|
| 30 | you <b>must</b> modify these scripts before they can be used to extract information from any SWW files you |
---|
| 31 | generate. |
---|
| 32 | |
---|
[7265] | 33 | <a name="export_results_max.py scripts"><h3><b>export_results_max.py</b></h3></a> |
---|
[7205] | 34 | The <font color="red">export_results_max.py</font> script can be used to create an ASC file that contains the maximum |
---|
| 35 | of an ANUGA variable or expression for each point in a user-defined raster on the simulation region. |
---|
| 36 | <p> |
---|
| 37 | You must change certain values within the <font color="red">export_results_max.py</font> file to get what you want: |
---|
| 38 | <ul> |
---|
| 39 | <li> You must determine how many SWW files your simulation produced and create as many lines like this: |
---|
| 40 | <pre><font color="brown"> time_dir1 = '20090505_150430_run_final_0.8_58292_None_kvanputt' |
---|
| 41 | time_dir2 = '20090505_150517_run_final_0_58292_None_kvanputt' |
---|
| 42 | time_dir3 = '20090505_150711_run_final_0_58280_None_kvanputt' |
---|
| 43 | time_dir4 = '20090505_150805_run_final_0.8_58280_None_kvanputt' |
---|
| 44 | time_dir5 = '20090505_151322_run_final_0.8_64477_None_kvanputt' |
---|
| 45 | time_dir6 = '20090505_151447_run_final_0_64477_None_kvanputt'</font></pre> |
---|
| 46 | as necessary. Then modify the line: |
---|
| 47 | <pre><font color="brown"> time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]</font></pre> |
---|
| 48 | to include each of the variables you defined above. |
---|
| 49 | |
---|
| 50 | <li> Modify the <b>cellsize</b> value to set the size of the raster you require. For example: |
---|
| 51 | <pre><font color="brown"> cellsize = 20 # raster cell size in metres</font></pre> |
---|
| 52 | |
---|
| 53 | <li> Now set the timestep at which you want the raster generated. Either set the actual timestep required or use |
---|
| 54 | <b>None</b> to indicate that you want the maximum values in the raster over all timesteps: |
---|
| 55 | <pre><font color="brown"> timestep = 1000 |
---|
| 56 | #timestep = None # over all timesteps</font></pre> |
---|
| 57 | <p> |
---|
| 58 | Note that if you specify a particular timestep here you may not need to include all SWW files in the |
---|
[7206] | 59 | <b>time_dirs</b> list above. For example, if you wanted data from timestep 0 only then you would need |
---|
[7205] | 60 | to include only the first SWW file in the list. |
---|
| 61 | |
---|
| 62 | <li> If you want to clip the raster to one or more small regions then put the names of the regions of interest |
---|
| 63 | into the <b>area</b> list: |
---|
| 64 | <pre><font color="brown"> area = ['Hobart', 'NW', 'South']</font></pre> |
---|
| 65 | Note that the name strings you put into the <b>area</b> list must match the names used in the |
---|
| 66 | <font color="red">project.py</font> file. That is, if you use a name such as 'NW', then the |
---|
| 67 | <font color="red">project.py</font> file must have lines like: |
---|
| 68 | <pre><font color="brown"> xminNW = 548000 |
---|
| 69 | xmaxNW = 561000 |
---|
| 70 | yminNW = 5250000 |
---|
| 71 | ymaxNW = 5258000</font></pre> |
---|
| 72 | which set the maximum and minimum eastings and northings that define a rectangular region. |
---|
| 73 | <p> |
---|
| 74 | If you don't want to clip to a region of interest, then do this: |
---|
| 75 | <pre><font color="brown"> area = ['All'] # no region of interest</font></pre> |
---|
| 76 | |
---|
| 77 | <li> Now you must decide which variable or expression values you want sampled on your raster. |
---|
| 78 | Define a list <b>var</b> that contains strings defining the required variable/expression: |
---|
| 79 | <pre><font color="brown"> var = ['depth', 'speed']</font></pre> |
---|
| 80 | Note that the strings you supply must be defined in the <b>var_equations</b> dictionary |
---|
| 81 | prior to your definition of <b>var</b>: |
---|
| 82 | <pre><font color="brown"> var_equations = {'stage': 'stage', |
---|
| 83 | 'momentum': '(xmomentum**2 + ymomentum**2)**0.5', |
---|
| 84 | 'depth': 'stage-elevation', |
---|
| 85 | 'speed': '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6)', |
---|
| 86 | 'elevation': 'elevation' }</font></pre> |
---|
| 87 | This dictionary maps your <b>var</b> strings to a variable or expression. |
---|
| 88 | </ul> |
---|
| 89 | |
---|
[7265] | 90 | <a name="get_runup.py"><h3><b>get_runup.py</b></h3></a> |
---|
[7205] | 91 | The <font color="red">get_runup.py</font> script is used to get the maximum runup height in a specified region |
---|
| 92 | or regions. |
---|
| 93 | <p> |
---|
| 94 | You must change certain values within the <font color="red">get_runup.py</font> file to get what you want: |
---|
| 95 | <ul> |
---|
| 96 | <li> You must determine how many SWW files your simulation produced and create as many lines like this: |
---|
| 97 | <pre><font color="brown"> time_dir1 = '20090505_150430_run_final_0.8_58292_None_kvanputt' |
---|
| 98 | time_dir2 = '20090505_150517_run_final_0_58292_None_kvanputt' |
---|
| 99 | time_dir3 = '20090505_150711_run_final_0_58280_None_kvanputt' |
---|
| 100 | time_dir4 = '20090505_150805_run_final_0.8_58280_None_kvanputt' |
---|
| 101 | time_dir5 = '20090505_151322_run_final_0.8_64477_None_kvanputt' |
---|
| 102 | time_dir6 = '20090505_151447_run_final_0_64477_None_kvanputt'</font></pre> |
---|
| 103 | as necessary. Then modify the line: |
---|
| 104 | <pre><font color="brown"> time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]</font></pre> |
---|
| 105 | to include each of the variables you defined above. |
---|
| 106 | |
---|
| 107 | <li> Make sure that the <b>images</b> list in <font color="red">projects.py</font> contains one or more CSV files |
---|
| 108 | defining the regions within the simulation that you want the maximum runup for. |
---|
| 109 | </ul> |
---|
| 110 | |
---|
[7265] | 111 | <a name="get_timeseries.py"><h3><b>get_timeseries.py</b></h3></a> |
---|
[7205] | 112 | The <font color="red">get_timeseries.py</font> script is used to get timeseries data for a selection of variable |
---|
| 113 | data at one or more gauge points in a simulation. |
---|
| 114 | <p> |
---|
| 115 | You must change certain values within the <font color="red">get_timeseries.py</font> file to get what you want: |
---|
| 116 | <ul> |
---|
| 117 | <li> You must determine how many SWW files your simulation produced and create as many lines like this: |
---|
| 118 | <pre><font color="brown"> time_dir1 = '20090505_150430_run_final_0.8_58292_None_kvanputt' |
---|
| 119 | time_dir2 = '20090505_150517_run_final_0_58292_None_kvanputt' |
---|
| 120 | time_dir3 = '20090505_150711_run_final_0_58280_None_kvanputt' |
---|
| 121 | time_dir4 = '20090505_150805_run_final_0.8_58280_None_kvanputt' |
---|
| 122 | time_dir5 = '20090505_151322_run_final_0.8_64477_None_kvanputt' |
---|
| 123 | time_dir6 = '20090505_151447_run_final_0_64477_None_kvanputt'</font></pre> |
---|
| 124 | as necessary. Then modify the line: |
---|
| 125 | <pre><font color="brown"> time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]</font></pre> |
---|
| 126 | to include each of the variables you defined above. |
---|
| 127 | |
---|
| 128 | <li> Make sure that the <b>gauges</b> list in <font color="red">projects.py</font> contains one or more CSV files |
---|
| 129 | defining the gauges within the simulation that you want the timeseries data for. |
---|
| 130 | </ul> |
---|
| 131 | </body> |
---|
| 132 | </html> |
---|