Changeset 7363
- Timestamp:
- Aug 14, 2009, 9:03:48 AM (16 years ago)
- Location:
- DVD_images/extra_files/GoldCoast
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
DVD_images/extra_files/GoldCoast/analysis.html
r7301 r7363 16 16 </td> 17 17 <td> 18 <H1>Tsunami Inundation Models for the G OLD COASTregion</H1>18 <H1>Tsunami Inundation Models for the Gold Coast region</H1> 19 19 </td> 20 20 </tr> … … 27 27 from SWW files, but are offered as an example of one way to do it. 28 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, 29 This page describes the scripts and shows how to use them. Note that due to the ad-hoc nature of the scripts, 30 30 you <b>must</b> modify these scripts before they can be used to extract information from any SWW files you 31 31 generate. … … 33 33 <a name="export_results_max.py scripts"><h3><b>export_results_max.py</b></h3></a> 34 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 rasteron the simulation region.35 of an ANUGA variable or expression for each point in a user-defined ArcGIS grid on the simulation region. 36 36 <p> 37 37 You must change certain values within the <font color="red">export_results_max.py</font> file to get what you want: 38 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'</font></pre> 42 as necessary. Then modify the line: 39 <li> List the output folder names here, with one for each simulation you have run: 40 <pre><font color="brown"> time_dir1 = '20090522_165600_run_final_1.1_51423_lfountai' 41 time_dir2 = '20090522_164640_run_final_1.1_51392_lfountai'</font></pre> 42 For information on <a href="modifications.html#output">output_folder_name</a>. 43 <p>Then modify the line: 43 44 <pre><font color="brown"> time_dirs = [time_dir1, time_dir2]</font></pre> 44 45 to include each of the variables you defined above. 45 <p> 46 <li> Your SWW output will have a name like <font color="red">gold_coast.sww</font>. For a large model you 47 may have more than one output file with extra filenames like <font color="red">gold_coast_ 37860_0.sww</font>,48 where the <b> 37860</b> tells us that the timestep at the start of this file is 37860 sec. The46 <p> 47 <li> Your SWW output will have a name like <font color="red">gold_coast.sww</font>. For a large model you 48 may have more than one output file with extra filenames like <font color="red">gold_coast_28860_0.sww</font>, 49 where the <b>28860</b> tells us that the timestep at the start of this file is 28860 sec. The 49 50 <font color="red">export_results_max.py</font> script needs to examine all SWW output files, so we specify 50 51 all the files produced by the model run to create a maximum over the entire time. 51 We do this by specifying the start times of all the extra SWW files: 52 <p> 53 <pre><font color="brown"> times = [37860]</font></pre> 52 We do this by specifying the start times of all the extra SWW files: 54 53 <p> 55 Note we do not have to specify the first SWW file, only the extra file start times. If there are no extra SWW files, 56 just do: 57 <p> 54 <pre><font color="brown"> times = [28860, 57720] </font></pre> 55 <p> 56 <i>Note we do not have to specify the first SWW file, only the extra file start times. If there are no extra SWW files, 57 just do:</i> 58 <p> 58 59 <pre><font color="brown"> times = []</font></pre> 59 60 <p> 60 <li> Modify the <b>cellsize</b> value to set the size of the raster you require. For example: 61 <pre><font color="brown"> cellsize = 20 # raster cell size in metres</font></pre> 62 <p> 63 <li> You can get the maximum of a variable or expression over the entire model time, or for a single time in the simulation. 61 <li> Modify the <b>cellsize</b> value to set the size of the ArcGIS grid you require. For example: 62 <pre><font color="brown"> cellsize = 20 # ArcGIS grid cell size in metres</font></pre> 63 <p> 64 <i>Note: That this value should not go beyond the most refined part of the mesh 65 i.e. if mesh resolution is 500m<sup>2</sup>, cellsize = (500 </i>x<i> 2)<sup>1/2</sup> = 32m</i> 66 <p> 67 <li> You can get the maximum of a variable or expression over the entire model time, or for a single time in the simulation. 64 68 Set <b>timestep</b> to the required time you want the maximum for, or set it to <b>None</b> to indicate that you want 65 the maximum values in the rasterover all timesteps:69 the maximum values over all timesteps: 66 70 <pre><font color="brown"> timestep = None # over all timesteps 67 71 #timestep = 0</font></pre> 68 <p>69 Note that if you want the elevation use <b>timestep = 0</b>. Elevation does not change over time and you only need the70 first SWW file.71 72 <p> 72 <li> If you want to clip the raster to one or more small regions then put the names of the regions of interest 73 <i>Note that if you want the elevation use <b>timestep = 0</b>. Elevation does not change over time and you only need the 74 first SWW file.</i> 75 <p> 76 <li> If you want to clip the ArcGIS grid to one or more small regions then put the names of the regions of interest 73 77 into the <b>area</b> list: 74 <pre><font color="brown"> area = ['Gold_Coast', 'NW', 'South']</font></pre> 75 Note that the name strings you put into the <b>area</b> list must match the names used in the 76 <font color="red">project.py</font> file. That is, if you use a name such as 'NW', then the 77 <font color="red">project.py</font> file must have lines like: 78 <pre><font color="brown"> xminNW = 548000 79 xmaxNW = 561000 80 yminNW = 5250000 81 ymaxNW = 5258000</font></pre> 78 <pre><font color="brown"> area = ['PalmBeach', 'MainBeach', 'CBD']</font></pre> 79 <p> 80 <i>Note that the name strings you put into the <b>area</b> list must match the names used in the 81 <font color="red">project.py</font> file. That is, if you use a name such as 'PalmBeach', then the 82 <font color="red">project.py</font> file must have lines like:</i> 83 <pre><font color="brown"> xminPalmBeach = 548000 84 xmaxPalmBeach = 561000 85 yminPalmBeach = 5250000 86 ymaxPalmBeach = 5258000</font></pre> 82 87 which set the maximum and minimum eastings and northings that define a rectangular region. 83 88 <p> … … 85 90 <pre><font color="brown"> area = ['All'] # no region of interest</font></pre> 86 91 <p> 87 <li> Finally you must decide which variable or expression values you want sampled on your raster.92 <li> Finally you must decide which variable or expression values you want sampled on your ArcGIS grid. 88 93 Define a list <b>var</b> that contains strings defining the required variable or expression: 89 94 <pre><font color="brown"> var = ['depth', 'speed']</font></pre> 90 Note that the strings you supply must be defined in the <b>var_equations</b> dictionary91 prior to your definition of <b>var</b>: 95 <i>Note that the strings you supply must be defined in the <b>var_equations</b> dictionary 96 prior to your definition of <b>var</b>:</i> 92 97 <pre><font color="brown"> var_equations = {'stage': 'stage', 93 98 'momentum': '(xmomentum**2 + ymomentum**2)**0.5', … … 100 105 <a name="get_timeseries.py"><h3><b>get_timeseries.py</b></h3></a> 101 106 The <font color="red">get_timeseries.py</font> script is used to get timeseries data for a selection of variable 102 data at one or more gauge points in a simulation.107 data at one or more timeseries gauge points in a simulation. 103 108 <p> 104 109 You must change certain values within the <font color="red">get_timeseries.py</font> file to get what you want: 105 110 <ul> 106 <li> You must determine how many SWW files your simulation produced and create as many lines like this:107 <pre><font color="brown"> time_dir1 = '200905 05_150430_run_final_0.8_58292_None_kvanputt'108 time_dir2 = '200905 05_150517_run_final_0_58292_None_kvanputt'</font></pre>111 <li> Depending on how many simulations you have run will determine the number of output folder names you insert here: 112 <pre><font color="brown"> time_dir1 = '20090522_165600_run_final_1.1_51423_lfountai' 113 time_dir2 = '20090522_164640_run_final_1.1_51392_lfountai'</font></pre> 109 114 as necessary. Then modify the line: 110 115 <pre><font color="brown"> time_dirs = [time_dir1, time_dir2]</font></pre> 111 116 to include each of the variables you defined above. 112 117 <p> 113 <li> Make sure that the <b>gauges</b> list in <font color="red">projects.py</font> contains one or more CSV files118 <li> Make sure that the <b>gauges</b> list specified in <font color="red">projects.py</font> contains one or more CSV files 114 119 defining the gauges within the simulation that you want the timeseries data for. 115 120 The gauge file must have this format: 116 121 <pre><font color="brown"> easting,northing,name,elevation 117 55 9134.8963,5251176.875,Connelly,2118 5 32441.5164,5239639.686,Opossum,2</font></pre>122 550154.557,6885684.489,Coolangatta,-5 123 546917.144,6889565.504,PalmBeach,-5</font></pre> 119 124 </ul> 120 125 </body> -
DVD_images/extra_files/GoldCoast/index.html
r7357 r7363 23 23 24 24 <a name="introduction"><h3><b>Introduction</b></h3></a> 25 26 The information on this DVD and the associated report is intended to assist emergency managers in developing preparation and27 response plans that can be used during a tsunami threat or emergency.28 25 <p> 29 26 The Attorney General's Department (AGD) has supported Geoscience Australia (GA) in developing a range of products to support … … 32 29 <p> 33 30 While the associated report provides background, model results and interpretations, the DVD contains all data, scripts and 34 software necessary to reproduce and potentially augment the models underpinning the report. This will allow the Jurisdiction35 31 to rerun the models with minor modifications or new elevation data as needed and also potentially replicate the methodology 36 32 to other locations within the model extent, if desired. … … 51 47 </ul> 52 48 <p> 53 The tsunami wave data on this disk are all derived from events available in the Australian Tsunami54 Hazard Map. As this dataset is very large, this DVD only contains the events55 49 described in the report. 56 50 -
DVD_images/extra_files/GoldCoast/installation.html
r7301 r7363 16 16 </td> 17 17 <td> 18 <H1>Tsunami Inundation Models for the G OLD COASTregion</H1>18 <H1>Tsunami Inundation Models for the Gold Coast region</H1> 19 19 </td> 20 20 </tr> … … 31 31 32 32 The tsunami inundation simulations are based on the Open Source software package called ANUGA. 33 For more information about ANUGA visit <a href="https://datamining.anu.edu.au/anuga">https://datamining.anu.edu.au/anuga</a>. 33 For more information about ANUGA visit <a href="https://datamining.anu.edu.au/anuga">https://datamining.anu.edu.au/anuga</a>. 34 34 <p> 35 ANUGA has been developed and tested under the Windows XP and Linux (Ubuntu, Mint and Red Hat) operating systems. 35 ANUGA has been developed and tested under the Windows XP and Linux (Ubuntu, Mint and Red Hat) operating systems. 36 36 ANUGA may also be installed on a Windows Vista system and Debian Linux, but these have not been extensively tested. 37 37 <p> … … 40 40 41 41 <a name="installing"><h3><b>Installing ANUGA</b></h3></a> 42 42 <a href="http://sourceforge.net/projects/anuga/">Download Software</a><i>: please note Internet Explorer has the habit of renaming the 43 .tgz file to .gz - the remedy is to rename them back or use another browser such as Firefox.</i> 44 <p> 43 45 You must install ANUGA according to the <a href="documents/anuga_installation_guide.pdf">Installation Guide</a>. 44 46 As the installation procedure comprises a number of steps we suggest that it is carried out by someone with a 45 basic understanding of how to install software packages on the operating system of choice. 47 basic understanding of how to install software packages on the operating system of choice. 46 48 47 49 <a name="simulating"><h3><b>How to run a simulation</b></h3></a> … … 52 54 can be used to get help. 53 55 <p> 54 56 55 57 <p> 56 58 <hr align="left" width="100"> … … 61 63 <hr align="left" width="100"> 62 64 <p> 63 Next, you must copy the entire contents of the DVD to a place in your filesystem. Let's assume 64 that you want to put the data into <b>C:\ANUGA</b>. You would do this in a Command Prompt window: 65 <table class="code"><tr><td> 66 C:<br> 67 cd \<br> 68 mkdir ANUGA<br> 65 Next, you must copy the entire contents of the DVD to a place in your file system. Let's assume 66 that you want to put the data into <b>C:\ANUGA</b>. You could drag all files from the DVD into this folder with Explorer. 67 Or through the Command Prompt window: 68 <pre><font color="brown"> 69 C: 70 cd 71 mkdir ANUGA 69 72 xcopy /e X:\ ANUGA 70 </td></tr></table> 71 <p> 72 Of course, you could just drag all files on the DVD (X:\ is the assumed drive letter) to the desired target directory with Explorer. 73 </font></pre> 74 X:\ is the assumed to be the CD drive letter. 73 75 <p> 74 76 <hr align="left" width="100"> 75 77 <p> 76 78 Now you must create an environment variable <b>ANUGADATA</b> that points to the directory you just created: 77 < table class="code"><tr><td>79 <pre><font color="brown"> 78 80 set ANUGADATA=C:\ANUGA 79 </td></tr></table> 80 <p> 81 </font></pre> 81 82 Doing the above in a Command Prompt window is temporary - if you open another 82 83 window you will not have the ANUGADATA environment variable defined. To make … … 84 85 tool (<b>Advanced</b> tab). See the <a href="documents/anuga_installation_guide.pdf">Installation Guide</a> 85 86 if you don't know how to do this. 86 <p>87 87 <hr align="left" width="100"> 88 <p>89 88 Next, you prepare and execute the model: 90 < table class="code"><tr><td>91 cd C:\ANUGA <br>92 cd project <br>93 python setup_model.py <br >89 <pre><font color="brown"> 90 cd C:\ANUGA 91 cd project 92 python setup_model.py 94 93 python run_model.py 95 </td></tr></table> 96 <p> 94 </font></pre> 97 95 <hr align="left" width="100"> 98 <p>99 96 This should all run to completion though it may take several days, depending on 100 97 the hardware used. … … 105 102 drilling down from that point until you find a directory called <b>outputs</b>. 106 103 The latest directory in <b>outputs</b> should contain a file called <font color="red">screen_error.txt</font> 107 with an explanation of the error at the end. 104 with an explanation of the error at the end. 108 105 <p> 109 106 Once the simulation has completed you may view the results using the ANUGA 110 viewer as described in the <a href="documents/anuga_installation_guide.pdf">Installation Guide</a> 107 viewer as described in the <a href="documents/anuga_installation_guide.pdf">Installation Guide</a> 111 108 and <a href="documents/anuga_user_manual.pdf">User Manual</a>. You may also 112 109 generate rasters suitable for GIS mapping or write dedicated scripts extracting timeseries at selected … … 120 117 After you have run a simulation you may wish to extract information from the generated SWW file. 121 118 On this disk there are a selection of example analysis scripts that you can use or modify. 122 The <a href="analysis.html">analysis scripts</a> page explains how to use the scripts.119 The <a href="analysis.html">analysis</a> page explains how to use the scripts. 123 120 124 121 <a name="modifications"><h3><b>How to modify a simulation</b></h3></a> … … 138 135 <a name="FAQ"><h3><b>Frequently Asked Questions</b></h3></a> 139 136 140 There is a <b>Frequently Asked Questions</b> (FAQ) page at 141 <a href="https://datamining.anu.edu.au/anuga/wiki/FrequentlyAskedQuestions">https://datamining.anu.edu.au/anuga/wiki/FrequentlyAskedQuestions</a>. 142 Look in there and search the mailing list archives before asking questions on the ANUGA user's mailing list. 143 Someone may already have asked your question! 137 Look in <b><a href="https://datamining.anu.edu.au/anuga/wiki/FrequentlyAskedQuestions">Frequently Asked Questions</a></b> (FAQ) and search the mailing list archives before asking questions on the ANUGA user's mailing list. 138 Someone may already have asked and answered your question! 144 139 <p> 145 140 Note that you can edit the FAQ pages, so it is helpful if you can update the FAQ with your question and its answer if you feel -
DVD_images/extra_files/GoldCoast/modifications.html
r7301 r7363 16 16 </td> 17 17 <td> 18 <H1>Tsunami Inundation Models for the G OLD COASTregion</H1>18 <H1>Tsunami Inundation Models for the Gold Coast region</H1> 19 19 </td> 20 20 </tr> … … 24 24 <a name="modifications"><h2><b>Modifying a simulation</b></h2></a> 25 25 26 Here we talk about how you change a simulation. Why would you need to change a simulation? Well,27 you might have some better elevation data ,you want to run the simulation on a finer mesh in certain28 areas ,or maybe you want to see the result for different events.29 <p> 30 First we describe the us es of the script files you might change, then we walk through a few examples31 of changes you might make .26 Here we talk about how to change a simulation. Why would you need to change a simulation? Well, 27 you might have some better elevation data; you want to run the simulation on a finer mesh in certain 28 areas; or maybe you want to see the result for different events. 29 <p> 30 First we describe the usage of the model script files you might change, then we walk through a few examples 31 of changes you might make within these. 32 32 <p> 33 33 … … 37 37 <table class="code"> 38 38 <tr><td><font color="red">project.py</font></td><td>Defines the input data used, where to place output, etc.</td></tr> 39 <tr><td><font color="red">build_elevation.py</font></td><td> Builds a PTS file of all elevation data specified by <font color="red">project.py</font></td></tr>39 <tr><td><font color="red">build_elevation.py</font></td><td>Combines the elevation data specified by <font color="red">project.py</font> into one file; with the extension .PTS</td></tr> 40 40 <tr><td><font color="red">setup_model.py</font></td><td>Prepares the simulation before actually running it</td></tr> 41 41 <tr><td><font color="red">run_model.py</font></td><td>Runs the simulation</td></tr> … … 48 48 For further details on changing parameters see <a href="#change">Making changes to a simulation</a>. 49 49 50 <!-- This file is the heart of the simulation. Here we specify many things, including the tide level, the simulation51 start and stop times, input data files, and so on. Because we are using python as the programming language in52 these files, we can use the power of the language to speed up our development. We use this by <i>parameterising</i>53 data as much as possible.54 <p>55 Parameters that you might change56 As an example, let's look at the <b>scenario_name</b> variable we define in <font color="red">project.py</font>:57 <table class="code">58 <tr><td>scenario_name = 'hobart' # name of the scenario</td></tr>59 </table>60 <p>61 We define this variable solely to quickly change other input filenames. Where we want a different input files for62 a different scenario,63 depending on whether we want a 'small' or 'large' model, we build the filenames using the <b>model</b> variable.64 Some examples are:65 <p>66 <table class="code">67 <tr height="25"><td>bounding_polygon_filename = 'bounding_polygon_'+ model + '.csv'</td></tr>68 <tr height="25"><td>land_initial_conditions_filename = [['initial_conditions_' + model +'.csv', 0]]</td></tr>69 <tr height="25"><td>landward_boundary_filename = 'landward_boundary_'+ model +'.csv'</td></tr>70 </table>71 <p>72 We must, of course, ensure that there are input files <font color="red">bounding_polygon_small.csv</font>73 and <font color="red">bounding_polygon_large.csv</font>, and so on.74 <p>75 Now, if we need to change the simulation model from 'small' to 'large', we need only change the76 value of the <b>model</b> variable, and all the input files that depend on the model will change.77 This speeds up development and make errors less likely. If you want to add another model to the two78 we show above, just set <b>model</b> to 'medium' and create appropriate input files with the string79 'medium' in the filename. -->80 81 50 <a name="build_elevation.py"><h4><b>build_elevation.py</b></h4></a> 82 51 83 This script combines all input elevation files into one PTS file.52 This script combines all input elevation files into a single elevation point file (PTS file). 84 53 We have provided you with the PTS file used to create the outputs on this DVD. 85 If you would like to change the elevation see <a href="#change">Making changes to a simulation</a>.54 If you would like to change the elevation, see <a href="#change">Making changes to a simulation</a>. 86 55 <p> 87 56 … … 89 58 90 59 This script is used to transform data into a specific format for <font color="red">run_model.py</font>, 91 if required, and to generate warning messages if you are missing data.60 if required, and to generate warning messages if you are missing required types of data (though not it will not alert you if you have data gaps e.g. missing data in your elevation grid). 92 61 <p> 93 62 … … 95 64 96 65 This script runs a tsunami inundation scenario. It relies on the parameters set in <font color="red">project.py</font> 97 as well as the PTS and STS files.98 An STS file has been generated for each event listed in the boundariesdirectory. For further details on events see66 as well as the elevation and event input files (PTS and STS files respectively). 67 An STS file has been generated for each event listed in the <u>boundaries</u> directory. For further details on events see 99 68 <a href="#change">Making changes to a simulation</a>. 100 69 <p> … … 106 75 <p> 107 76 77 <a name="output"><h4><b>Output Folder Name</b></h4></a> 78 79 The <b>output folder name</b> should be unique between different runs on different data. 80 The list of items below will be used to create the folder in your <u>output</u> directory. 81 Your user name and time+date will be automatically added. For example, 82 <pre><font color="brown"> 83 output_comments = [setup, tide, event_number]</font></pre> 84 will result in a folder name like 85 <pre><font color="brown"> 86 20090212_091046_run_final_0_27283_rwilson</font> 87 Where you (<u>rwilson</u>) ran a <u>run</u> script at <u>9:10.46</u> in the morning on the <u>2/12/09</u>, <b>setup</b> = <u>final</u>, 88 <b>tide</b> = <u>0</u>, <b>event_number</b> = <u>27283</u> - refer below for more information on these parameters </pre> 89 <p> 90 You can also add strings to this list 91 <pre><font color="brown"> 92 output_comments = [setup, tide, event_number, 'large']</font></pre> 93 will result in a folder name like 94 <pre><font color="brown"> 95 20090212_091046_run_final_0_27283_large_rwilson</font></pre> 96 <p> 97 <p> 98 <a name="setup"><h4><b>Setup</b></h4></a> 99 100 The <b>setup</b> parameter determines the type of run. This can be one of three values: 101 <pre><font color="brown"> 102 'trial' <font color="black">- coarsest mesh, fast </font> 103 'basic' <font color="black">- coarse mesh</font> 104 'final' <font color="black">- fine mesh, slowest</font> 105 </pre></font> 106 Note: <b>'final'</b> must be used if determining the best estimate of inundation for your area of interest. 107 <p> 108 108 <a name="tide"><h4><b>Tide</b></h4></a> 109 109 110 The <b>tide</b> parameter is used to change the mean stageof the simulation. When <b>tide</b> is set to 0110 The <b>tide</b> parameter is used to change the mean inital water level of the simulation. When <b>tide</b> is set to 0 111 111 the initial water level will be at Mean Sea Level. If you increase the <b>tide</b> value the water level will become deeper. 112 However land is masked out using initial conditions. Within ANUGA <b>tide</b> is modelled as a constant. 112 This setting will also increase non tidal lakes and rivers inside the model. To compensate a mask is used on land called 113 <b>initial conditions</b> which brings the internal water bodies back to 0. Within ANUGA <b>tide</b> is modelled as a constant throughout the duration of the simulation. 113 114 <p> 114 115 … … 116 117 117 118 The <b>event_number</b> variable contains the event number that initiates the tsunami we are modelling. 118 You can change <b>event_number</b> to any event number in the anuga/boundaries directory. 119 As we said above, a new STS file must be generated for <font color="red">run_model.py</font> to work. 120 <p> 121 The event numbers correspond to a quake ID from the probabilistic tsunami hazard map of Australia. 122 <table class="code"> 123 <tr><td><pre>event_number = 51436 # 1 in 10000 yr event from New Hebrides</pre></td></tr> 124 </table> 119 You can change <b>event_number</b> to any event number in the <u>boundaries</u> directory. 120 <a href="data/queensland/gold_coast_tsunami_scenario_2009/anuga/boundaries/events_chosen.xls">Click here</a> for more information on the events. 121 An STS file has been generated for all events listed in the <u>boundaries</u> directory. 122 <p> 123 The event numbers correspond to a quake ID from the Probabilistic Tsunami Hazard Map Assessment of Australia. 124 125 <pre><font color="brown"> 126 event_number = 51469 # 1 in 10000 yr event from New Hebrides Trench</font></pre> 127 125 128 <p> 126 129 127 130 <a name="elevation"><h4><b>Elevation</b></h4></a> 128 131 129 Elevation data can be changed in the <font color="red">project.py</font> elevation script.132 Elevation data can be changed in the <font color="red">project.py</font> script under ELEVATION DATA. 130 133 Elevation data can be read as either a point file, comma delimited, or as an ASCII grid file 131 (ASC) with an accompanying projection file (PRJ). All elevation input must be projected in the correct UTM zone.134 (ASC) with an accompanying projection file (PRJ). All elevation input should sit in <u>topographies</u> and must be projected in the correct UTM zone. 132 135 <p> 133 136 134 137 A header for a CSV file has the format: 135 <table class="code"> 136 <tr><td><pre>x,y,elevation</pre></td></tr> 137 </table> 138 139 <pre><font color="brown"> 140 x,y,elevation</font></pre> 141 138 142 <p> 139 143 140 144 An ASC file header has the format: 141 <table class="code"> 142 <tr><td><pre>ncols 868 143 nrows 856 144 xllcorner 418933.86055096 145 yllcorner 5151810.6668096 146 cellsize 250 147 NODATA_value -9999</pre></td></tr> 148 </table> 145 146 <pre><font color="brown"> 147 ncols 868 148 nrows 856 149 xllcorner 418933.86055096 150 yllcorner 5151810.6668096 151 cellsize 250 152 NODATA_value -9999</font></pre> 153 149 154 <p> 150 155 151 156 The header of a PRJ file has the format: 152 <table class="code"> 153 <tr><td><pre>Projection UTM 154 Zone 55 155 Datum D_GDA_1994 156 Zunits NO 157 Units METERS 158 Spheroid GRS_1980 159 Xshift 500000 160 Yshift 10000000 161 Parameters</pre></td></tr> 162 </table> 163 <p> 164 165 The elevation filenames must be listed in either <b>point_filenames</b> or <b>ascii_grid_filenames</b> 157 158 <pre><font color="brown"> 159 Projection UTM 160 Zone 55 161 Datum D_GDA_1994 162 Zunits NO 163 Units METERS 164 Spheroid GRS_1980 165 Xshift 500000 166 Yshift 10000000 167 Parameters</font></pre> 168 169 <p> 170 171 The elevation filenames in <font color="red">project.py</font> must be listed in either <b>point_filenames</b> or <b>ascii_grid_filenames</b> 166 172 depending on their format. Point files need to have their extension shown however the ascii grid files have the .asc extension assumed: 167 <table class="code"> 168 <tr><td><pre>point_filenames = ['SD100031996_jgriffin_clip.csv', 169 'tomaga_offshore_AHD_MGA_1997.csv', 170 'Batemans_BBHD_MGA_1995.csv', 171 'moruya_AHD_MGA_2000.csv'] 172 173 ascii_grid_filenames = ['sd100031996_p', 174 'sd100031996_p2', 175 'sd100031996_p3', 176 'sd100031996_p4']</pre></td></tr> 177 </table> 173 174 <pre><font color="brown"> 175 point_filenames = ['point1.csv', 176 'point2.csv', 177 'point3.csv'] 178 179 ascii_grid_filenames = ['grid1', 180 'grid2', 181 'grid3']</font></pre> 182 178 183 <p> 179 184 … … 183 188 <a name="interior_regions"><h4><b>Interior regions</b></h4></a> 184 189 185 The <b>interior_regions</b> parameter allows you to change the mesh of the model. 190 The user can specify a number of internal polygons within each of which the resolution of the mesh can be specified. 191 Mesh resolution is the maximum allowable area specified for each region, defining the largest area an indivdual 192 triangular element of the mesh can take (and therefore the minimum mesh resolution). 193 These polygons need to be nested within each other with no overlapping edges. 194 <p> 195 The <b>interior regions</b> can be changed in the <font color="red">project.py</font> script under INTERIOR REGIONS. 196 Interior regions can be read as either seperate CSV files for each polygon displayed as a listed paired with its 197 resolution and/or one CSV file for all polygons, where its resolution is defined within the csv under 'id'. 198 All file inputs should sit in <u>polygons</u> and must be projected in the correct UTM zone. 199 <p> 200 The format for a CSV file with ONE polygon has the format: 201 <pre><font color="brown"> 202 easting,northing </font><font color="black"> Note: NO Header </font></pre> 203 204 205 The header for a CSV file with MANY polygons has the format: 206 <pre><font color="brown"> 207 easting,northing,id,value</font></pre> 208 <p> 209 Where id = polygon number and value = maximum allowable area. 210 <p> 211 The <font color="red">project.py</font> script for this section looks like this: 212 213 214 <pre><font color="brown"> 215 interior_regions_list = [['aos1.csv', 1500], 216 ['aos2.csv', 1500], 217 ['sw.csv', 30000]] 218 </font></pre> 219 220 <p> 221 222 For further information on ANUGA file formats please see the ANUGA User Manual, section 5.1. 186 223 <p> 187 224 </body> 188 225 </html> 226 -
DVD_images/extra_files/GoldCoast/project/project.py
r7300 r7363 26 26 # Model specific parameters. 27 27 # One or all can be changed each time the run_model script is executed 28 29 # difference between MSL and HAT in metres 30 central_meridian = None # Central meridian for projection (optional) 31 zone = 56 32 import sys 33 if len(sys.argv) > 1: 34 event_number = int(sys.argv[1]) 35 else: 36 event_number = 51469 # the event number or the mux file name 37 38 event_number_list = [51469, 51392, 50863] # To piggy back multiple events 39 28 tide = 0 # Mean Sea Level = 0, 29 # Highest Astronomical Tide = 1.1 m for Gold Coast 30 zone = 56 # Specify UTM zone of model 31 event_number = 51469 # See details below 32 alpha = 0.1 # smoothing parameter for mesh 33 friction = 0.01 # manning's friction coefficient 34 starttime = 0 # start time for simulation 35 finaltime = 80000 # final time for simulation 36 37 setup = 'final' # This can be one of three values 38 # trial - coarsest mesh, fast 39 # basic - coarse mesh 40 # final - fine mesh, slowest 40 41 # Event Details: 41 42 # Event 1 (51469) … … 54 55 # Wave height at 100 m = 0.3 m 55 56 56 tide = 0 # Mean Sea Level = 0,57 # Highest Astronomical Tide = 1.1 m for Gold Coast58 alpha = 0.1 # smoothing parameter for mesh59 friction = 0.01 # manning's friction coefficient60 starttime = 0 # start time for simulation61 finaltime = 80000 # final time for simulation62 63 setup = 'final' # This can be one of three values64 # trial - coarsest mesh, fast65 # basic - coarse mesh66 # final - fine mesh, slowest67 68 57 #------------------------------------------------------------------------------- 69 58 # Output filename … … 102 91 interior_regions_data = [['area_of_interest.csv', 500], 103 92 ['intermediate.csv', 25000]] 93 # If there are several priority areas of interest these can be defined 94 # in a single .csv file with headers 'easting, northing, id, value' where 95 # id defines each polygon, and the value is the mesh resolution 96 PriorityArea_filename = None 104 97 105 98 # LAND - used to set the initial stage/water to be offcoast only … … 112 105 gauges_filename = 'gauges.csv' 113 106 114 # BUILDINGS EXPOSURE - for identifying inundated houses115 # Used in run_building_inundation.py116 # Format latitude,longitude etc (geographic)117 building_exposure_filename = '' # from NEXIS118 119 # AREA OF IMAGES - Extent of each image to find out highest runup120 # Headerr: easting, northing, id, value121 # Used in get_runup.py122 images_filename = 'images.csv'123 124 107 # BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively 125 108 # NOTE: when files are put together the points must be in sequence … … 127 110 # Check the run_model.py for boundary_tags 128 111 129 130 112 # Thinned ordering file from Hazard Map (geographic) 131 113 # Format is index,latitude,longitude (with header) … … 135 117 # Format easting,northing (no header) 136 118 landward_boundary_filename = 'landward_boundary.csv' 137 138 # MUX input filename.139 # If a meta-file from EventSelection is used, set 'multi-mux' to True.140 # If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.141 ##mux_input_filename = event_number # to be found in event_folder142 # (ie boundaries/event_number/)143 ##multi_mux = False144 mux_input_filename = 'event.list'145 multi_mux = True146 119 147 120 #------------------------------------------------------------------------------- … … 250 223 251 224 225 -
DVD_images/extra_files/GoldCoast/project/run_model.py
r7205 r7363 1 """Run a tsunami inundation scenario for Busselton, WA, Australia.1 """Run a tsunami inundation scenario for Gold Coast, Queensland, Australia. 2 2 3 3 The scenario is defined by a triangular mesh created from project.polygon, the … … 68 68 # Create the STS file 69 69 if not os.path.exists(project.event_sts + '.sts'): 70 bub.build_urs_boundary(project.mux_input_filename, project.event_sts)70 print 'sts file has not been generated' 71 71 72 72 # Read in boundary from ordered sts file -
DVD_images/extra_files/GoldCoast/project/setup_model.py
r7300 r7363 11 11 from os.path import join, exists 12 12 from anuga.utilities.polygon import read_polygon, number_mesh_triangles 13 13 from anuga.shallow_water.data_manager import csv2polygons 14 14 import project 15 15 … … 48 48 if not exists(project.home): 49 49 print "Sorry, data directory '%s' doesn't exist" % project.home 50 sanity_error = True 51 50 sanity_error = True 51 52 52 if not exists(project.anuga_folder): 53 53 print "Sorry, ANUGA directory '%s' doesn't exist" % project.anuga_folder … … 78 78 79 79 #----- 80 # If this directory do n't exist, EventSelection hasn't been run.80 # If this directory doesn't exist, EventSelection hasn't been run. 81 81 #----- 82 82 … … 128 128 # Create list of land polygons with initial conditions 129 129 project.land_initial_conditions = [] 130 for filename, MSL in project.land_initial_conditions_filename: 131 polygon = read_polygon(join(project.polygons_folder, filename)) 132 project.land_initial_conditions.append([polygon, MSL]) 133 130 # if it's a list, then it's a list of land condition filenames 131 # else it's a string - a single file, multiple land conditions 132 if isinstance(project.land_initial_conditions_filename, list): 133 for filename, MSL in project.land_initial_conditions_filename: 134 polygon = read_polygon(join(project.polygons_folder, filename)) 135 project.land_initial_conditions.append([polygon, MSL]) 136 elif isinstance(project.land_initial_conditions_filename, basestring): 137 polygons, MSL = csv2polygons(join(project.polygons_folder, 138 project.land_initial_conditions_filename)) 139 for i, key in enumerate(polygons): 140 if i%100==0: print i 141 poly = polygons[key] 142 land = float(MSL[key]) 143 project.land_initial_conditions.append([poly, land]) 144 else: 145 msg = ('project.land_initial_conditions_filename must be a list or ' 146 'string, got %s' 147 % type(project.land_initial_conditions_filename)) 148 raise Exception, msg 149 134 150 # Create list of interior polygons with scaling factor 135 151 project.interior_regions = [] 152 153 if project.PriorityArea_filename is not None: 154 polygons, maxareas = csv2polygons(project.PriorityAreas) 155 print 'Creating %d internal polygons' % len(polygons) 156 #def create_polygon_function(polygons, geo_reference=None): 157 project.interior_regions = [] 158 for i, key in enumerate(polygons): 159 if i%100==0: print i 160 poly = polygons[key] 161 maxarea = float(maxareas[key]) 162 project.interior_regions.append([poly, 163 maxarea*project.scale_factor]) 164 136 165 for filename, maxarea in project.interior_regions_data: 137 166 polygon = read_polygon(join(project.polygons_folder, filename))
Note: See TracChangeset
for help on using the changeset viewer.