Changeset 2983
- Timestamp:
- May 26, 2006, 2:26:21 PM (18 years ago)
- Location:
- production
- Files:
-
- 9 added
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
production/onslow_2006/make_report.py
r2960 r2983 34 34 * an introduction must be written in introduction.tex; a basic outline and 35 35 some of the core inputs are already in place 36 * an results.tex file needs to be written for the particular scenario 37 * the tsunami-genic event should be discussed in tsunami_scenario.tex 36 * the tsunami-genic event should be discussed in tsunami_scenario.tex 37 * a computational_setup.tex file needs to be written for the particular scenario 38 * the interpretation of the results needs to be written to interpretation.tex 39 * maximum inundation maps need to be included in HAT_map and LAT_map etc. 40 * damage modelling maps need to be included in HAT_damage and LAT_damage etc. 38 41 * a summary must be written into summary.tex 39 42 * metadata for the scenario data to be included in metadata.tex … … 44 47 from os import getcwd, sep, altsep, mkdir, access, F_OK 45 48 import project 46 from pyvolution.util import sww2timeseries 49 from pyvolution.util import sww2timeseries, get_gauges_from_file 47 50 48 51 # Derive scenario name … … 54 57 scenario_name = '%s %s' %(test[0], test[1]) 55 58 59 # Create report directory 60 reportdir = getcwd()+sep+'report'+sep 61 if access(reportdir,F_OK) == 0: 62 mkdir (reportdir) 63 56 64 # User defined inputs 57 65 report_title = 'Tsunami impact modelling for the North West shelf: %s' %scenario_name.title() … … 60 68 '20060426_004237': 'Lowest Astronomical Tide'} 61 69 70 max_maps = {'Highest Astronomical Tide': 'HAT_map', 71 'Lowest Astronomical Tide': 'LAT_map'} 72 73 damage_maps = {'Highest Astronomical Tide': 'HAT_damage', 74 'Lowest Astronomical Tide': 'LAT_damage'} 75 62 76 # Create sections and graphs for each designated production directory 63 77 latex_output = [] … … 80 94 81 95 96 82 97 # Start report generation 83 reportdir = getcwd()+sep+'report'+sep84 if access(reportdir,F_OK) == 0:85 mkdir (reportdir)86 98 report_name = reportdir + scenario + '_report.tex' 87 99 fid = open(report_name, 'w') … … 94 106 % * an introduction must be written in introduction.tex; a basic outline and 95 107 % some of the core inputs are already in place 96 % * an results.tex file needs to be written for the particular scenario97 108 % * the tsunami-genic event should be discussed in tsunami_scenario.tex 109 % * an computational_setup.tex file needs to be written for the particular scenario 110 % * the interpretation of the results needs to be written to interpretation.tex 111 % * maximum inundation maps need to be included in HAT_map.tex and LAT_map.tex etc. 112 % * damage modelling maps need to be included in HAT_damage and LAT_damage etc. 98 113 % * a summary must be written into summary.tex 99 114 % * metadata for the scenario data to be included in metadata.tex … … 151 166 \section{Inundation modelling results} 152 167 \label{sec:results} 153 \input{ results}168 \input{computational_setup} 154 169 155 170 """ 171 fid.write(s) 172 173 # Generate latex output for gauges 174 s = '\\begin{center} \n \\begin{tabular}{|l|l|l|}\hline \n \\bf{Gauge Name} & \\bf{Easting} & \\bf{Northing} \\\\ \hline \n' 175 fid.write(s) 176 177 gauges, locations = get_gauges_from_file(project.gauge_filename) 178 179 for name, gauges in zip(locations, gauges): 180 east = gauges[0] 181 north = gauges[1] 182 s = '%s & %.2f & %.2f \\\\ \hline \n' %(name.replace('_',' '), east, north) 183 fid.write(s) 184 185 s = '\\end{tabular} \n \\end{center} \n \n' 186 fid.write(s) 187 188 s = '\input{interpretation} \n' 156 189 fid.write(s) 157 190 … … 162 195 s = '\subsection{%s} \n \n' %production_dirs[name] 163 196 fid.write(s) 164 197 198 s = '\input{%s} \n \clearpage \n \n' %max_maps[production_dirs[name]] 199 fid.write(s) 200 165 201 s = '\input{%s} \n \clearpage \n \n' %latex_output[i] 166 202 fid.write(s) 167 168 203 169 204 # Closing … … 172 207 \section{Damage modelling} 173 208 \input{damage} 174 209 """ 210 fid.write(s) 211 212 for i, name in enumerate(production_dirs.keys()): 213 214 s = '\subsection{%s} \n \n' %production_dirs[name] 215 fid.write(s) 216 217 s = '\input{%s} \n \clearpage \n \n' %damage_maps[production_dirs[name]] 218 fid.write(s) 219 220 221 s = """ 175 222 \section{Summary} 176 223 \input{summary} -
production/onslow_2006/plot_data_extent.py
r2947 r2983 115 115 ylabel('Northings') 116 116 savefig(figname) 117 figure(4) 118 figname = 'onslow_gauges' 119 x, y = read_file(project.gauge_filename) 120 plot(x1,y1,'r-',x,y,'r+') 121 savefig(figname) 117 122 118 123 close('all') -
production/onslow_2006/report/onslow_2006_report.tex
r2980 r2983 6 6 % * an introduction must be written in introduction.tex; a basic outline and 7 7 % some of the core inputs are already in place 8 % * an results.tex file needs to be written for the particular scenario 8 % * the tsunami-genic event should be discussed in tsunami_scenario.tex 9 % * an computational_setup.tex file needs to be written for the particular scenario 10 % * the interpretation of the results needs to be written to interpretation.tex 9 11 % * maximum inundation maps need to be included in HAT_map.tex and LAT_map.tex etc. 10 12 % * damage modelling maps need to be included in HAT_damage and LAT_damage etc. 11 % * the tsunami-genic event should be discussed in tsunami_scenario.tex12 13 % * a summary must be written into summary.tex 13 14 % * metadata for the scenario data to be included in metadata.tex … … 60 61 \section{Inundation modelling results} 61 62 \label{sec:results} 62 \input{ results}63 \input{computational_setup} 63 64 64 65 \begin{center} … … 82 83 \end{center} 83 84 85 \input{interpretation} 84 86 \subsection{Lowest Astronomical Tide} 85 87 -
production/pt_hedland_2006/report/tsunami_scenario.tex
r2950 r2983 31 31 \begin{figure}[hbt] 32 32 33 \centerline{ \includegraphics[width= 75mm, height=75mm]{../report_figures/mw9.jpg}}33 \centerline{ \includegraphics[width=100mm, height=75mm]{../report_figures/mw9.jpg}} 34 34 35 35 \caption{Maximum wave height (in cms) for a Mw 9 event off the
Note: See TracChangeset
for help on using the changeset viewer.