Changeset 3082 for production
- Timestamp:
- Jun 5, 2006, 3:54:01 PM (19 years ago)
- Location:
- production
- Files:
-
- 7 added
- 2 deleted
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
production/onslow_2006/get_building_inundation.py
r2944 r3082 29 29 30 30 # Inputs 31 timestampdir = '20060426_004129' # HAT31 #timestampdir = '20060426_004129' # HAT 32 32 #timestampdir = '20060426_004237' # LAT 33 timestampdir = '20060515_001733' # MSL 33 34 file_loc = project.outputdir + timestampdir + sep 34 35 swwfile = file_loc + project.basename + '.sww' -
production/onslow_2006/make_report.py
r3064 r3082 21 21 22 22 * Introduction 23 * Tsunami scenario 24 * Inundation model 23 25 * Data sources 24 * Tsunami scenario 25 * Inundation modelling results 26 * Damage modelling 26 * Modelling results 27 * Impact modelling 27 28 * Summary 28 29 * References 29 30 * Appendix: Metadata 31 * Appendix: Time series outputs 30 32 31 33 Other files included in document which require manual intervention: … … 34 36 * an introduction must be written in introduction.tex; a basic outline and 35 37 some of the core inputs are already in place 36 * the tsunami-genic event should be discussed in tsunami_scenario.tex 38 * the tsunami-genic event should be discussed in tsunami_scenario.tex 39 * a discussion of the ANUGA model is required in anuga.tex 37 40 * a computational_setup.tex file needs to be written for the particular scenario 38 41 * the interpretation of the results needs to be written to interpretation.tex 39 * maximum inundation map s need to be included in HAT_map and LAT_map etc.40 * damage modelling map s need to be included in HAT_damage and LAT_damage etc.42 * maximum inundation map names need to be included in HAT_map and LAT_map etc. 43 * damage modelling map names need to be included in HAT_damage and LAT_damage etc. 41 44 * a summary must be written into summary.tex 42 45 * metadata for the scenario data to be included in metadata.tex 43 46 44 May 200647 May, June 2006 45 48 """ 46 49 … … 65 68 report_title = 'Tsunami impact modelling for the North West shelf: %s' %scenario_name.title() 66 69 67 production_dirs = {'20060426_004129': 'Highest Astronomical Tide', 68 '20060426_004237': 'Lowest Astronomical Tide'} 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 70 production_dirs = {'20060426_004129': '1.5 AHD', 71 '20060426_004237': '-1.5 AHD', 72 '20060515_001733': '0 AHD'} 73 74 max_maps = {'1.5 AHD': 'HAT_map', 75 '-1.5 AHD': 'LAT_map', 76 '0 AHD': 'MSL_map'} 77 78 damage_maps = {'1.5 AHD': 'HAT_damage', 79 '-1.5 AHD': 'LAT_damage', 80 '0 AHD': 'MSL_damage'} 81 82 gauge_map = 'onslow_gauge_map.jpg' 83 76 84 # Create sections and graphs for each designated production directory 77 85 latex_output = [] 86 swwfiles = {} 78 87 for label_id in production_dirs.keys(): 79 88 80 89 file_loc = project.outputdir + label_id + sep 81 90 swwfile = file_loc + project.basename + '.sww' 82 83 texname = sww2timeseries(swwfile, 84 project.gauge_filename,85 label_id,86 report = True,87 plot_quantity = ['stage', 'speed'],88 time_min = None,89 time_max = None,90 title_on = False,91 verbose = True)92 93 latex_output.append(texname)94 95 91 swwfiles[swwfile] = label_id 92 93 texname = sww2timeseries(swwfiles, 94 project.gauge_filename, 95 #label_id, 96 production_dirs, 97 report = True, 98 plot_quantity = ['stage', 'speed'], 99 time_min = None, 100 time_max = None, 101 title_on = False, 102 verbose = True) 103 104 latex_output.append(texname) 96 105 97 106 # Start report generation 107 # Future: generate_report(reportdir, scenario, report_title, 108 # project.gauge_filename, max_maps, damage_maps, production_dirs, latex_output) 98 109 report_name = reportdir + scenario + '_report.tex' 99 110 fid = open(report_name, 'w') … … 155 166 \label{sec:intro} 156 167 \input{introduction} 157 168 169 \section{Tsunami scenarios} 170 \label{sec:tsunamiscenarios} 171 \input{tsunami_scenario} 172 173 \section{Inundation Model} 174 \label{sec:anuga} 175 \input{anuga} 176 \input{computational_setup} 177 158 178 \section{Data sources} 159 179 \label{sec:data} 160 180 \input{data} 161 181 162 \section{Tsunami scenarios} 163 \label{sec:tsunami_scenarios} 164 \input{tsunami_scenario} 165 166 \section{Inundation modelling results} 182 \section{Modelling results} 167 183 \label{sec:results} 168 \input{computational_setup} 169 170 """ 171 fid.write(s) 172 173 # Generate latex output for gauges 174 s = '\\begin{table} \label{table:gaugelocations} \n' 175 fid.write(s) 176 s = '\caption{Defined gauge locations for %s study area.}' %scenario_name.title() 184 185 """ 186 fid.write(s) 187 188 # Generate latex output for location points 189 s = '\\begin{table} \label{table:locations} \n' 190 fid.write(s) 191 s = '\caption{Defined point locations for %s study area.}' %report_title 177 192 fid.write(s) 178 193 s = """ 179 194 \\begin{center} 180 195 \\begin{tabular}{|l|l|l|l|}\hline 181 \\bf{ GaugeName} & \\bf{Easting} & \\bf{Northing} & \\bf{Elevation}\\\\ \hline182 """ 183 fid.write(s) 184 185 gauges, locations = get_gauges_from_file(project.gauge_filename)186 187 for name, gauges in zip(locations, gauges):196 \\bf{Point Name} & \\bf{Easting} & \\bf{Northing} & \\bf{Elevation}\\\\ \hline 197 """ 198 fid.write(s) 199 200 gauges, locations, elevation = get_gauges_from_file(project.gauge_filename) 201 202 for name, gauges, elev in zip(locations, gauges, elevation): 188 203 east = gauges[0] 189 204 north = gauges[1] 190 elev = 0.0191 #elev = gauges[2]192 205 s = '%s & %.2f & %.2f & %.2f \\\\ \hline \n' %(name.replace('_',' '), east, north, elev) 193 206 fid.write(s) … … 196 209 fid.write(s) 197 210 211 s = '\\begin{figure}[hbt] \n \centerline{ \includegraphics[width=150mm, height=100mm]{../report_figures/%s}}' %gauge_map 212 fid.write(s) 213 214 s = """ 215 \caption{Point locations used for Onslow study.} 216 \label{fig:points} 217 \end{figure} 218 """ 219 fid.write(s) 220 198 221 s = '\input{interpretation} \n' 199 222 fid.write(s) 200 223 201 # Assign titles to each production section 224 # Assign titles to each production section 202 225 # Must specify one name per section 203 226 for i, name in enumerate(production_dirs.keys()): 204 205 s = '\subsection{%s} \n \n' %production_dirs[name]206 fid.write(s)227 # 228 # s = '\subsection{%s} \n \n' %production_dirs[name] 229 # fid.write(s) 207 230 208 231 s = '\input{%s} \n \clearpage \n \n' %max_maps[production_dirs[name]] 209 232 fid.write(s) 210 233 211 s = '\input{%s} \n \clearpage \n \n' %latex_output[i]212 fid.write(s)213 214 234 # Closing 215 235 216 236 s = """ 217 237 \section{Damage modelling} 238 \label{sec:damage} 218 239 \input{damage} 219 240 """ … … 221 242 222 243 for i, name in enumerate(production_dirs.keys()): 223 224 s = '\subsection{%s} \n \n' %production_dirs[name]225 fid.write(s)226 244 227 245 s = '\input{%s} \n \clearpage \n \n' %damage_maps[production_dirs[name]] 228 246 fid.write(s) 229 230 247 231 248 s = """ … … 240 257 \input{metadata} 241 258 242 \end{document} 243 """ 244 fid.write(s) 259 \section{Time series} 260 \label{sec:timeseries} 261 """ 262 fid.write(s) 263 264 s = '\input{%s} \n \clearpage \n \n' %latex_output[0] 265 fid.write(s) 266 267 s = '\end{document}' 268 fid.write(s) -
production/onslow_2006/report/onslow_2006_report.tex
r3079 r3082 52 52 53 53 \section{Tsunami scenarios} 54 \label{sec:tsunamiscenario }54 \label{sec:tsunamiscenarios} 55 55 \input{tsunami_scenario} 56 56 … … 106 106 107 107 108 \section{Damage modelling}109 \label{sec:damage}108 \section{Damage modelling} 109 \label{sec:damage} 110 110 \input{damage} 111 112 111 \input{MSL_damage} 113 112 \clearpage -
production/pt_hedland_2006/make_report.py
r3015 r3082 21 21 22 22 * Introduction 23 * Tsunami scenario 24 * Inundation model 23 25 * Data sources 24 * Tsunami scenario 25 * Inundation modelling results 26 * Damage modelling 26 * Modelling results 27 * Impact modelling 27 28 * Summary 28 29 * References 29 30 * Appendix: Metadata 31 * Appendix: Time series outputs 30 32 31 33 Other files included in document which require manual intervention: … … 34 36 * an introduction must be written in introduction.tex; a basic outline and 35 37 some of the core inputs are already in place 36 * the tsunami-genic event should be discussed in tsunami_scenario.tex 38 * the tsunami-genic event should be discussed in tsunami_scenario.tex 39 * a discussion of the ANUGA model is required in anuga.tex 37 40 * a computational_setup.tex file needs to be written for the particular scenario 38 41 * the interpretation of the results needs to be written to interpretation.tex 39 * maximum inundation map s need to be included in HAT_map and LAT_map etc.40 * damage modelling map s need to be included in HAT_damage and LAT_damage etc.42 * maximum inundation map names need to be included in HAT_map and LAT_map etc. 43 * damage modelling map names need to be included in HAT_damage and LAT_damage etc. 41 44 * a summary must be written into summary.tex 42 45 * metadata for the scenario data to be included in metadata.tex 43 46 44 May 200647 May, June 2006 45 48 """ 46 49 … … 65 68 report_title = 'Tsunami impact modelling for the North West shelf: %s' %scenario_name.title() 66 69 67 production_dirs = {'': 'Highest Astronomical Tide', 68 '': 'Lowest Astronomical Tide'} 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 70 production_dirs = {'': '1.5 AHD', 71 '': '-1.5 AHD', 72 '': '0 AHD'} 73 74 max_maps = {'1.5 AHD': 'HAT_map', 75 '-1.5 AHD': 'LAT_map', 76 '0 AHD': 'MSL_map'} 77 78 damage_maps = {'1.5 AHD': 'HAT_damage', 79 '-1.5 AHD': 'LAT_damage', 80 '0 AHD': 'MSL_damage'} 81 82 gauge_map = 'pt_hedland_gauge_map.jpg' 83 76 84 # Create sections and graphs for each designated production directory 77 85 latex_output = [] 86 swwfiles = {} 78 87 for label_id in production_dirs.keys(): 79 88 80 89 file_loc = project.outputdir + label_id + sep 81 90 swwfile = file_loc + project.basename + '.sww' 82 83 texname = sww2timeseries(swwfile, 84 project.gauge_filename,85 label_id,86 report = True,87 plot_quantity = ['stage', 'velocity'],88 time_min = None,89 time_max = None,90 title_on = False,91 verbose = True)92 93 latex_output.append(texname)94 95 91 swwfiles[swwfile] = label_id 92 93 texname = sww2timeseries(swwfiles, 94 project.gauge_filename, 95 #label_id, 96 production_dirs, 97 report = True, 98 plot_quantity = ['stage', 'speed'], 99 time_min = None, 100 time_max = None, 101 title_on = False, 102 verbose = True) 103 104 latex_output.append(texname) 96 105 97 106 # Start report generation 107 # Future: generate_report(reportdir, scenario, report_title, 108 # project.gauge_filename, max_maps, damage_maps, production_dirs, latex_output) 98 109 report_name = reportdir + scenario + '_report.tex' 99 110 fid = open(report_name, 'w') … … 155 166 \label{sec:intro} 156 167 \input{introduction} 157 168 169 \section{Tsunami scenarios} 170 \label{sec:tsunamiscenarios} 171 \input{tsunami_scenario} 172 173 \section{Inundation Model} 174 \label{sec:anuga} 175 \input{anuga} 176 \input{computational_setup} 177 158 178 \section{Data sources} 159 179 \label{sec:data} 160 180 \input{data} 161 181 162 \section{Tsunami scenarios} 163 \label{sec:tsunami_scenarios} 164 \input{tsunami_scenario} 165 166 \section{Inundation modelling results} 182 \section{Modelling results} 167 183 \label{sec:results} 168 \input{computational_setup} 169 170 """ 171 fid.write(s) 172 173 # Generate latex output for gauges 174 s = '\\begin{table} \label{table:gaugelocations} \n' 175 fid.write(s) 176 s = '\caption{Defined gauge locations for %s study area.}' %scenario_name.title() 184 185 """ 186 fid.write(s) 187 188 # Generate latex output for location points 189 s = '\\begin{table} \label{table:locations} \n' 190 fid.write(s) 191 s = '\caption{Defined point locations for %s study area.}' %report_title 177 192 fid.write(s) 178 193 s = """ 179 194 \\begin{center} 180 195 \\begin{tabular}{|l|l|l|l|}\hline 181 \\bf{ GaugeName} & \\bf{Easting} & \\bf{Northing} & \\bf{Elevation}\\\\ \hline182 """ 183 fid.write(s) 184 185 gauges, locations = get_gauges_from_file(project.gauge_filename)186 187 for name, gauges in zip(locations, gauges):196 \\bf{Point Name} & \\bf{Easting} & \\bf{Northing} & \\bf{Elevation}\\\\ \hline 197 """ 198 fid.write(s) 199 200 gauges, locations, elevation = get_gauges_from_file(project.gauge_filename) 201 202 for name, gauges, elev in zip(locations, gauges, elevation): 188 203 east = gauges[0] 189 204 north = gauges[1] 190 elev = 0.0191 #elev = gauges[2]192 205 s = '%s & %.2f & %.2f & %.2f \\\\ \hline \n' %(name.replace('_',' '), east, north, elev) 193 206 fid.write(s) … … 196 209 fid.write(s) 197 210 211 s = '\\begin{figure}[hbt] \n \centerline{ \includegraphics[width=150mm, height=100mm]{../report_figures/%s}}' %gauge_map 212 fid.write(s) 213 214 s = """ 215 \caption{Point locations used for Pt Hedland study.} 216 \label{fig:points} 217 \end{figure} 218 """ 219 fid.write(s) 220 198 221 s = '\input{interpretation} \n' 199 222 fid.write(s) 200 223 201 # Assign titles to each production section 224 # Assign titles to each production section 202 225 # Must specify one name per section 203 226 for i, name in enumerate(production_dirs.keys()): 204 205 s = '\subsection{%s} \n \n' %production_dirs[name]206 fid.write(s)227 # 228 # s = '\subsection{%s} \n \n' %production_dirs[name] 229 # fid.write(s) 207 230 208 231 s = '\input{%s} \n \clearpage \n \n' %max_maps[production_dirs[name]] 209 232 fid.write(s) 210 233 211 s = '\input{%s} \n \clearpage \n \n' %latex_output[i]212 fid.write(s)213 214 234 # Closing 215 235 216 236 s = """ 217 237 \section{Damage modelling} 238 \label{sec:damage} 218 239 \input{damage} 219 240 """ … … 221 242 222 243 for i, name in enumerate(production_dirs.keys()): 223 224 s = '\subsection{%s} \n \n' %production_dirs[name]225 fid.write(s)226 244 227 245 s = '\input{%s} \n \clearpage \n \n' %damage_maps[production_dirs[name]] 228 246 fid.write(s) 229 230 247 231 248 s = """ … … 240 257 \input{metadata} 241 258 242 \end{document} 243 """ 244 fid.write(s) 259 \section{Time series} 260 \label{sec:timeseries} 261 """ 262 fid.write(s) 263 264 s = '\input{%s} \n \clearpage \n \n' %latex_output[0] 265 fid.write(s) 266 267 s = '\end{document}' 268 fid.write(s) -
production/pt_hedland_2006/project.py
r2963 r3082 108 108 # region to export (used from export_results.py) 109 109 110 #e_min_area = 300000111 #e_max_area = 310000112 #n_min_area = 7600000113 #n_max_area = 7610000110 e_min_area = 633000 111 e_max_area = 690000 112 n_min_area = 7740000 113 n_max_area = 7761000 114 114 115 115 refzone = 50 # confirm with Hamish
Note: See TracChangeset
for help on using the changeset viewer.