Changeset 7300 for DVD_images/extra_files/BatemansBay/analysis.html
- Timestamp:
- Jul 3, 2009, 4:47:17 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DVD_images/extra_files/BatemansBay/analysis.html
r7265 r7300 39 39 <li> You must determine how many SWW files your simulation produced and create as many lines like this: 40 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> 41 time_dir2 = '20090505_150517_run_final_0_58292_None_kvanputt'</font></pre> 46 42 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>43 <pre><font color="brown"> time_dirs = [time_dir1, time_dir2]</font></pre> 48 44 to include each of the variables you defined above. 49 45 <p> 46 <li> Your SWW output will have a name like <font color="red">batemans_bay.sww</font>. For a large model you 47 may have more than one output file with extra filenames like <font color="red">batemans_bay_37860_0.sww</font>, 48 where the <b>37860</b> tells us that the timestep at the start of this file is 37860 sec. The 49 <font color="red">export_results_max.py</font> script needs to examine all SWW output files, so we specify 50 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> 54 <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> 58 <pre><font color="brown"> times = []</font></pre> 59 <p> 50 60 <li> Modify the <b>cellsize</b> value to set the size of the raster you require. For example: 51 61 <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> 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. 64 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 raster over all timesteps: 66 <pre><font color="brown"> timestep = None # over all timesteps 67 #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 the 70 first SWW file. 57 71 <p> 58 Note that if you specify a particular timestep here you may not need to include all SWW files in the59 <b>time_dirs</b> list above. For example, if you wanted data from timestep 0 only then you would need60 to include only the first SWW file in the list.61 62 72 <li> If you want to clip the raster to one or more small regions then put the names of the regions of interest 63 73 into the <b>area</b> list: 64 <pre><font color="brown"> area = [' Hobart', 'NW', 'South']</font></pre>74 <pre><font color="brown"> area = ['Batemans_Bay', 'NW', 'South']</font></pre> 65 75 Note that the name strings you put into the <b>area</b> list must match the names used in the 66 76 <font color="red">project.py</font> file. That is, if you use a name such as 'NW', then the … … 74 84 If you don't want to clip to a region of interest, then do this: 75 85 <pre><font color="brown"> area = ['All'] # no region of interest</font></pre> 76 77 <li> Nowyou 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:86 <p> 87 <li> Finally you must decide which variable or expression values you want sampled on your raster. 88 Define a list <b>var</b> that contains strings defining the required variable or expression: 79 89 <pre><font color="brown"> var = ['depth', 'speed']</font></pre> 80 90 Note that the strings you supply must be defined in the <b>var_equations</b> dictionary … … 96 106 <li> You must determine how many SWW files your simulation produced and create as many lines like this: 97 107 <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> 108 time_dir2 = '20090505_150517_run_final_0_58292_None_kvanputt'</font></pre> 103 109 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>110 <pre><font color="brown"> time_dirs = [time_dir1, time_dir2]</font></pre> 105 111 to include each of the variables you defined above. 106 112 <p> 107 113 <li> Make sure that the <b>gauges</b> list in <font color="red">projects.py</font> contains one or more CSV files 108 114 defining the gauges within the simulation that you want the timeseries data for. 115 The gauge file must have this format: 116 <pre><font color="brown"> easting,northing,name,elevation 117 559134.8963,5251176.875,Connelly,2 118 532441.5164,5239639.686,Opossum,2</font></pre> 109 119 </ul> 110 120 </body>
Note: See TracChangeset
for help on using the changeset viewer.