Changeset 3082


Ignore:
Timestamp:
Jun 5, 2006, 3:54:01 PM (18 years ago)
Author:
sexton
Message:

updates

Location:
production
Files:
7 added
2 deleted
33 edited

Legend:

Unmodified
Added
Removed
  • production/onslow_2006/get_building_inundation.py

    r2944 r3082  
    2929
    3030# Inputs
    31 timestampdir = '20060426_004129' # HAT
     31#timestampdir = '20060426_004129' # HAT
    3232#timestampdir = '20060426_004237' # LAT
     33timestampdir = '20060515_001733' # MSL
    3334file_loc = project.outputdir + timestampdir + sep
    3435swwfile = file_loc + project.basename + '.sww'
  • production/onslow_2006/make_report.py

    r3064 r3082  
    2121
    2222* Introduction
     23* Tsunami scenario
     24* Inundation model
    2325* Data sources
    24 * Tsunami scenario
    25 * Inundation modelling results
    26 * Damage modelling
     26* Modelling results
     27* Impact modelling
    2728* Summary
    2829* References
    2930* Appendix: Metadata
     31* Appendix: Time series outputs
    3032
    3133Other files included in document which require manual intervention:
     
    3436* an introduction must be written in introduction.tex; a basic outline and
    3537  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
    3740* a computational_setup.tex file needs to be written for the particular scenario
    3841* 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.
     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.
    4144* a summary must be written into summary.tex
    4245* metadata for the scenario data to be included in metadata.tex
    4346
    44 May 2006                   
     47May, June 2006                   
    4548"""
    4649
     
    6568report_title = 'Tsunami impact modelling for the North West shelf: %s' %scenario_name.title()
    6669
    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  
     70production_dirs = {'20060426_004129': '1.5 AHD',
     71                   '20060426_004237': '-1.5 AHD',
     72                   '20060515_001733': '0 AHD'}
     73
     74max_maps = {'1.5 AHD': 'HAT_map',
     75            '-1.5 AHD': 'LAT_map',
     76            '0 AHD': 'MSL_map'}
     77
     78damage_maps = {'1.5 AHD': 'HAT_damage',
     79               '-1.5 AHD': 'LAT_damage',
     80               '0 AHD': 'MSL_damage'}
     81
     82gauge_map = 'onslow_gauge_map.jpg'
     83
    7684# Create sections and graphs for each designated production directory
    7785latex_output = []
     86swwfiles = {}
    7887for label_id in production_dirs.keys():
    7988   
    8089    file_loc = project.outputdir + label_id + sep
    8190    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
     93texname = 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
     104latex_output.append(texname)
    96105
    97106# Start report generation
     107# Future: generate_report(reportdir, scenario, report_title,
     108# project.gauge_filename, max_maps, damage_maps, production_dirs, latex_output)
    98109report_name = reportdir + scenario + '_report.tex'
    99110fid = open(report_name, 'w')
     
    155166    \label{sec:intro}
    156167  \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   
    158178  \section{Data sources}
    159179    \label{sec:data}
    160180    \input{data}
    161181   
    162   \section{Tsunami scenarios}
    163     \label{sec:tsunami_scenarios}
    164     \input{tsunami_scenario}
    165    
    166   \section{Inundation modelling results}
     182  \section{Modelling results}
    167183     \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"""
     186fid.write(s)
     187
     188# Generate latex output for location points
     189s = '\\begin{table} \label{table:locations} \n'
     190fid.write(s)
     191s = '\caption{Defined point locations for %s study area.}' %report_title
    177192fid.write(s)
    178193s = """
    179194\\begin{center}
    180195\\begin{tabular}{|l|l|l|l|}\hline
    181 \\bf{Gauge Name} & \\bf{Easting} & \\bf{Northing} & \\bf{Elevation}\\\\ \hline
    182 """
    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"""
     198fid.write(s)
     199
     200gauges, locations, elevation = get_gauges_from_file(project.gauge_filename)
     201
     202for name, gauges, elev in zip(locations, gauges, elevation):
    188203    east = gauges[0]
    189204    north = gauges[1]
    190     elev = 0.0
    191     #elev = gauges[2]
    192205    s = '%s & %.2f & %.2f & %.2f \\\\ \hline \n' %(name.replace('_',' '), east, north, elev)
    193206    fid.write(s)
     
    196209fid.write(s)
    197210
     211s = '\\begin{figure}[hbt] \n \centerline{ \includegraphics[width=150mm, height=100mm]{../report_figures/%s}}' %gauge_map
     212fid.write(s)
     213
     214s  = """
     215\caption{Point locations used for Onslow study.} 
     216\label{fig:points}
     217\end{figure}
     218"""
     219fid.write(s)
     220   
    198221s = '\input{interpretation} \n'
    199222fid.write(s)
    200223
    201 # Assign titles to each production section
     224# Assign titles to each production section 
    202225# Must specify one name per section
    203226for 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)
    207230
    208231    s = '\input{%s} \n \clearpage \n \n' %max_maps[production_dirs[name]]
    209232    fid.write(s)
    210233
    211     s = '\input{%s} \n \clearpage \n \n' %latex_output[i]
    212     fid.write(s)
    213 
    214234# Closing
    215235
    216236s = """
    217237   \section{Damage modelling}
     238    \label{sec:damage}
    218239     \input{damage}
    219240"""
     
    221242
    222243for i, name in enumerate(production_dirs.keys()):
    223 
    224     s = '\subsection{%s} \n \n' %production_dirs[name]     
    225     fid.write(s)
    226244
    227245    s = '\input{%s} \n \clearpage \n \n' %damage_maps[production_dirs[name]]
    228246    fid.write(s)
    229 
    230247
    231248s = """
     
    240257     \input{metadata}
    241258
    242 \end{document}
    243 """
    244 fid.write(s)
     259   \section{Time series}
     260     \label{sec:timeseries}
     261"""
     262fid.write(s)
     263
     264s = '\input{%s} \n \clearpage \n \n' %latex_output[0]
     265fid.write(s)
     266     
     267s = '\end{document}'
     268fid.write(s)
  • production/onslow_2006/report/onslow_2006_report.tex

    r3079 r3082  
    5252   
    5353  \section{Tsunami scenarios}
    54     \label{sec:tsunamiscenario}
     54    \label{sec:tsunamiscenarios}
    5555    \input{tsunami_scenario}
    5656
     
    106106 
    107107
    108   \section{Damage modelling}
    109    \label{sec:damage}
     108   \section{Damage modelling}
     109    \label{sec:damage}
    110110     \input{damage}
    111 
    112111\input{MSL_damage}
    113112 \clearpage
  • production/pt_hedland_2006/make_report.py

    r3015 r3082  
    2121
    2222* Introduction
     23* Tsunami scenario
     24* Inundation model
    2325* Data sources
    24 * Tsunami scenario
    25 * Inundation modelling results
    26 * Damage modelling
     26* Modelling results
     27* Impact modelling
    2728* Summary
    2829* References
    2930* Appendix: Metadata
     31* Appendix: Time series outputs
    3032
    3133Other files included in document which require manual intervention:
     
    3436* an introduction must be written in introduction.tex; a basic outline and
    3537  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
    3740* a computational_setup.tex file needs to be written for the particular scenario
    3841* 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.
     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.
    4144* a summary must be written into summary.tex
    4245* metadata for the scenario data to be included in metadata.tex
    4346
    44 May 2006                   
     47May, June 2006                   
    4548"""
    4649
     
    6568report_title = 'Tsunami impact modelling for the North West shelf: %s' %scenario_name.title()
    6669
    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  
     70production_dirs = {'': '1.5 AHD',
     71                   '': '-1.5 AHD',
     72                   '': '0 AHD'}
     73
     74max_maps = {'1.5 AHD': 'HAT_map',
     75            '-1.5 AHD': 'LAT_map',
     76            '0 AHD': 'MSL_map'}
     77
     78damage_maps = {'1.5 AHD': 'HAT_damage',
     79               '-1.5 AHD': 'LAT_damage',
     80               '0 AHD': 'MSL_damage'}
     81
     82gauge_map = 'pt_hedland_gauge_map.jpg'
     83
    7684# Create sections and graphs for each designated production directory
    7785latex_output = []
     86swwfiles = {}
    7887for label_id in production_dirs.keys():
    7988   
    8089    file_loc = project.outputdir + label_id + sep
    8190    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
     93texname = 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
     104latex_output.append(texname)
    96105
    97106# Start report generation
     107# Future: generate_report(reportdir, scenario, report_title,
     108# project.gauge_filename, max_maps, damage_maps, production_dirs, latex_output)
    98109report_name = reportdir + scenario + '_report.tex'
    99110fid = open(report_name, 'w')
     
    155166    \label{sec:intro}
    156167  \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   
    158178  \section{Data sources}
    159179    \label{sec:data}
    160180    \input{data}
    161181   
    162   \section{Tsunami scenarios}
    163     \label{sec:tsunami_scenarios}
    164     \input{tsunami_scenario}
    165    
    166   \section{Inundation modelling results}
     182  \section{Modelling results}
    167183     \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"""
     186fid.write(s)
     187
     188# Generate latex output for location points
     189s = '\\begin{table} \label{table:locations} \n'
     190fid.write(s)
     191s = '\caption{Defined point locations for %s study area.}' %report_title
    177192fid.write(s)
    178193s = """
    179194\\begin{center}
    180195\\begin{tabular}{|l|l|l|l|}\hline
    181 \\bf{Gauge Name} & \\bf{Easting} & \\bf{Northing} & \\bf{Elevation}\\\\ \hline
    182 """
    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"""
     198fid.write(s)
     199
     200gauges, locations, elevation = get_gauges_from_file(project.gauge_filename)
     201
     202for name, gauges, elev in zip(locations, gauges, elevation):
    188203    east = gauges[0]
    189204    north = gauges[1]
    190     elev = 0.0
    191     #elev = gauges[2]
    192205    s = '%s & %.2f & %.2f & %.2f \\\\ \hline \n' %(name.replace('_',' '), east, north, elev)
    193206    fid.write(s)
     
    196209fid.write(s)
    197210
     211s = '\\begin{figure}[hbt] \n \centerline{ \includegraphics[width=150mm, height=100mm]{../report_figures/%s}}' %gauge_map
     212fid.write(s)
     213
     214s  = """
     215\caption{Point locations used for Pt Hedland study.} 
     216\label{fig:points}
     217\end{figure}
     218"""
     219fid.write(s)
     220   
    198221s = '\input{interpretation} \n'
    199222fid.write(s)
    200223
    201 # Assign titles to each production section
     224# Assign titles to each production section 
    202225# Must specify one name per section
    203226for 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)
    207230
    208231    s = '\input{%s} \n \clearpage \n \n' %max_maps[production_dirs[name]]
    209232    fid.write(s)
    210233
    211     s = '\input{%s} \n \clearpage \n \n' %latex_output[i]
    212     fid.write(s)
    213 
    214234# Closing
    215235
    216236s = """
    217237   \section{Damage modelling}
     238    \label{sec:damage}
    218239     \input{damage}
    219240"""
     
    221242
    222243for i, name in enumerate(production_dirs.keys()):
    223 
    224     s = '\subsection{%s} \n \n' %production_dirs[name]     
    225     fid.write(s)
    226244
    227245    s = '\input{%s} \n \clearpage \n \n' %damage_maps[production_dirs[name]]
    228246    fid.write(s)
    229 
    230247
    231248s = """
     
    240257     \input{metadata}
    241258
    242 \end{document}
    243 """
    244 fid.write(s)
     259   \section{Time series}
     260     \label{sec:timeseries}
     261"""
     262fid.write(s)
     263
     264s = '\input{%s} \n \clearpage \n \n' %latex_output[0]
     265fid.write(s)
     266     
     267s = '\end{document}'
     268fid.write(s)
  • production/pt_hedland_2006/project.py

    r2963 r3082  
    108108# region to export (used from export_results.py)
    109109
    110 #e_min_area = 300000
    111 #e_max_area = 310000
    112 #n_min_area = 7600000
    113 #n_max_area = 7610000
     110e_min_area = 633000
     111e_max_area = 690000
     112n_min_area = 7740000
     113n_max_area = 7761000
    114114
    115115refzone = 50 # confirm with Hamish
Note: See TracChangeset for help on using the changeset viewer.