Changeset 4151 for anuga_work


Ignore:
Timestamp:
Jan 9, 2007, 3:26:53 PM (18 years ago)
Author:
sexton
Message:

(1) updates to make_report script to handle multiple events for multiple return periods (2) take Onslow changes through to Port Hedland and Dampier

Location:
anuga_work/production
Files:
2 added
2 deleted
16 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/dampier_2006/build_dampier.py

    r4147 r4151  
    121121
    122122print'clip combined geospatial object by bounding polygon'
    123 G_clipped = G.clip(project.bounding_polygon)
     123G_clipped = G.clip(project.poly_all)
    124124#FIXME: add a clip function to pts
    125125#print'shape of clipped data', G_clipped.get_data_points().shape
     
    128128if access(project.topographies_dir,F_OK) == 0:
    129129    mkdir (project.topographies_dir)
    130 G_clipped.export_points_file(project.combined_dir_name + '.pts')
    131 #G_clipped.export_points_file(project.combined_dir_name + '.xya')
    132 
    133 '''
    134 #-------------------------------------------------------------------------
    135 # Convert URS to SWW file for boundary conditions
    136 #-------------------------------------------------------------------------
    137 print 'starting to create boundary conditions'
    138 boundaries_in_dir_name = project.boundaries_in_dir_name
    139 
    140 from anuga.shallow_water.data_manager import urs2sww
    141 
    142 print 'minlat=project.north_boundary, maxlat=project.south_boundary',project.north_boundary, project.south_boundary
    143 print 'minlon= project.west_boundary, maxlon=project.east_boundary',project.west_boundary, project.east_boundary
    144 
    145 #import sys; sys.exit()
    146 
    147 #if access(project.boundaries_dir,F_OK) == 0:
    148 #    mkdir (project.boundaries_dir)
    149 
    150 from caching import cache
    151 cache(urs2sww,
    152       (boundaries_in_dir_name,
    153        project.boundaries_dir_name1),
    154       {'verbose': True,
    155        'minlat': project.south_boundary,
    156        'maxlat': project.north_boundary,
    157        'minlon': project.west_boundary,
    158        'maxlon': project.east_boundary,
    159 #       'minlat': project.south,
    160 #       'maxlat': project.north,
    161 #       'minlon': project.west,
    162 #       'maxlon': project.east,
    163        'mint': 0, 'maxt': 40000,
    164 #       'origin': domain.geo_reference.get_origin(),
    165        'mean_stage': project.tide,
    166 #       'zscale': 1,                 #Enhance tsunami
    167        'fail_on_NaN': False},
    168        verbose = True,
    169        )
    170 #       dependencies = source_dir + project.boundary_basename + '.sww')
     130#G_clipped.export_points_file(project.combined_dir_name + '.pts')
     131G_clipped.export_points_file(project.combined_dir_name + '.xya')
  • anuga_work/production/dampier_2006/make_report.py

    r4134 r4151  
    7373report_title = 'Tsunami impact modelling for %s' %scenario_name.title()
    7474
    75 # WA DLI data
    76 production_dirs = {#'20061101_053132_run': 'big event'} # parallel
    77                     #'20061101_054432_run': 'big event'} # sequential
    78                     #'20061107_070805_run': 'Mw 9.0',
    79                     '20061116_055135_run': 'Mw 9.0'} # multiple interior regions
    80                     #'20061116_062924_run': 'Mw 9.0'} # one interior region
    81 
    8275is_parallel = True
    8376if is_parallel == True:
    8477    nodes = 8
    85 
    86 max_maps = {'Mw 9.0': 'mw9_map'}
    87 
     78   
     79return_periods = [1000, 100000]
     80
     81# output directories
     82production_dirs_1000 = {'20061116_055135_run': 'Mw 9.0'} # RP 1000 years
     83production_dirs_100000 = {'20061116_055135': 'Mw 8.0'} # RP 100000 years
     84
     85all_prod_dirs = [production_dirs_1000, production_dirs_100000]
     86                         
     87max_maps_1000 = {'Mw 6.0': 'mw6_map'}
     88max_maps_100000 = {'Mw 9.0': 'mw9_map'}
     89
     90all_maps = [max_maps_1000, max_maps_100000]
     91
     92# gauge map names
    8893gauge_map1 = 'dampier_gauges_1.jpg'
    8994gauge_map2 = 'dampier_gauges_2.jpg'
     
    9196# Create sections and graphs for each designated production directory
    9297latex_output = []
    93 report_name = 'latexoutput_cipma'
     98report_name = 'latexoutput'
    9499
    95100if is_parallel == True:
    96 
    97     for i in range(nodes):
    98         print 'Sending node %d of %d' %(i,nodes)
     101   
     102    for j, production_dirs in enumerate(all_prod_dirs):
     103       
     104        for i in range(nodes):
     105            print 'Sending node %d of %d' %(i,nodes)
     106            reportname = report_name + '%s' + 'rp%s' %(i,j)
     107            swwfiles = {}
     108           
     109            for label_id in production_dirs.keys():
     110                file_loc = project.output_dir + label_id + sep
     111                sww_extra = '_P%s_%s' %(i,nodes)
     112                swwfile = file_loc + project.scenario_name + sww_extra + '.sww'
     113                swwfiles[swwfile] = label_id
     114
     115                texname, elev_output = sww2timeseries(swwfiles,
     116                                                      project.gauge_filename,
     117                                                      production_dirs,
     118                                                      report = True,
     119                                                      reportname = reportname,
     120                                                      plot_quantity = ['stage', 'momentum'],
     121                                                      surface = False,
     122                                                      time_min = None,
     123                                                      time_max = None,
     124                                                      title_on = False,
     125                                                      verbose = True)
     126               
     127                latex_output.append(texname)
     128   
     129else:
     130
     131    for i, production_dirs in enumerate(all_prod_dirs):
     132
    99133        swwfiles = {}
    100         reportname = report_name + '_%s' %(i)
     134        reportname = report_name + 'rp%s' %(i)
     135       
    101136        for label_id in production_dirs.keys():
     137
    102138            file_loc = project.output_dir + label_id + sep
    103             sww_extra = '_P%s_%s' %(i,nodes)
    104             swwfile = file_loc + project.scenario_name + sww_extra + '.sww'
     139            swwfile = file_loc + project.scenario_name + '.sww'
    105140            swwfiles[swwfile] = label_id
    106 
    107             texname, elev_output = sww2timeseries(swwfiles,
    108                                                   project.gauge_filename,
    109                                                   production_dirs,
    110                                                   report = True,
    111                                                   reportname = reportname,
    112                                                   plot_quantity = ['stage', 'momentum'],
    113                                                   surface = False,
    114                                                   time_min = None,
    115                                                   time_max = None,
    116                                                   title_on = False,
    117                                                   verbose = True)
    118141           
    119             latex_output.append(texname)
    120    
    121 else:
    122    
    123     for label_id in production_dirs.keys():
    124 
    125         file_loc = project.output_dir + label_id + sep
    126         swwfile = file_loc + project.scenario_name + '.sww'
    127         swwfiles[swwfile] = label_id
    128        
    129     texname, elev_output = sww2timeseries(swwfiles,
    130                                           project.gauge_filename,
    131                                           production_dirs,
    132                                           report = True,
    133                                           reportname = report_name,
    134                                           plot_quantity = ['stage', 'momentum'],
    135                                           surface = False,
    136                                           time_min = None,
    137                                           time_max = None,
    138                                           title_on = False,
    139                                           verbose = True)
     142        texname, elev_output = sww2timeseries(swwfiles,
     143                                              project.gauge_filename,
     144                                              production_dirs,
     145                                              report = True,
     146                                              reportname = reportname,
     147                                              plot_quantity = ['stage', 'momentum'],
     148                                              surface = False,
     149                                              time_min = None,
     150                                              time_max = None,
     151                                              title_on = False,
     152                                              verbose = True)
     153        latex_output.append(texname)
    140154
    141155# Start report generation
    142156# Future: generate_report(reportdir, scenario, report_title,
    143157# project.gauge_filename, max_maps, damage_maps, production_dirs, latex_output)
    144 report_name = reportdir + scenario + '_report_CIPMA.tex'
     158report_name = reportdir + scenario + '_report.tex'
    145159fid = open(report_name, 'w')
    146160
     
    200214s = '%s} '%report_title
    201215fid.write(s)
     216
    202217s = """
    203218  \maketitle
     
    207222  \input{execsum}
    208223
     224\clearpage
     225
    209226  \\tableofcontents
    210227 
     228  \section{Introduction}
     229    \label{sec:intro}
     230  \input{introduction}
     231
    211232   \section{Modelling methodology}
    212233    \label{sec:methodology}
    213234    \input{modelling_methodology}
     235   
     236  \section{Tsunami scenarios}
     237    \label{sec:tsunamiscenario}
     238    \input{tsunami_scenario}
    214239
    215240  \section{Data sources}
    216241    \label{sec:data}
    217242    \input{data}
    218    
    219    %\section{Inundation model}
    220    % \label{sec:anuga}
    221    % \input{anuga}
    222    % \input{computational_setup}
    223243       
    224244  \section{Inundation modelling results}
     
    227247"""
    228248fid.write(s)
    229 
    230 # Generate latex output for location points
    231 ##s = '\\begin{table} \\begin{center} \n'
    232 ##fid.write(s)
    233 ##s = '\caption{Defined point locations for %s study area.}' %scenario_name
    234 ##fid.write(s)
    235 ##s = """
    236 ##\label{table:locations}
    237 ##\\begin{tabular}{|l|l|l|l|}\hline
    238 ##\\bf{Point Name} & \\bf{Easting} & \\bf{Northing} & \\bf{Elevation (m)}\\\\ \hline
    239 ##"""
    240 ##fid.write(s)
    241 ##
    242 ##gauges, locations, elevation = get_gauges_from_file(project.gauge_filename)
    243 ##
    244 ##for name, gauges, elev in zip(locations, gauges, elevation):
    245 ##    east = gauges[0]
    246 ##    north = gauges[1]
    247 ##    s = '%s & %.2f & %.2f & %.2f \\\\ \hline \n' %(name.replace('_',' '), east, north, elev)
    248 ##    fid.write(s)
    249 ##
    250 ##s = '\\end{tabular} \n  \end{center} \n \end{table} \n \n'
    251 ##fid.write(s)
    252 ##
    253 
    254 s = '\\begin{figure}[hbt] \centerline{\includegraphics[scale = 0.5]{../report_figures/%s}}' %gauge_map2
    255 fid.write(s)
    256 s  = """
    257 \caption{Point locations used for Dampier study; surrounding the facility.
    258 See Appendix \\ref{sec:timeseries} for stage and momentum results.
    259 
    260 \label{fig:points2}
    261 \end{figure}
    262 """
    263 fid.write(s)
    264 s = '\\begin{figure}[hbt] \centerline{\includegraphics[scale=0.5]{../report_figures/%s}}' %gauge_map3
    265 fid.write(s)
    266 s  = """
    267 \caption{Point locations used for Dampier study; section
    268 of the pipeline towards the boundary of the region and other boundary gauges.
    269 See Appendix \\ref{sec:timeseries} for stage and momentum results.} 
    270 \label{fig:points3}
    271 \end{figure}
    272 """
    273 fid.write(s)
    274    
    275 #s = '\input{interpretation} \n'
    276 #fid.write(s)
     249   
     250s = '\input{interpretation} \n'
     251fid.write(s)
    277252
    278253# Assign titles to each production section
    279254# Must specify one name per section
    280 for i, name in enumerate(production_dirs.keys()):
    281 
    282     s = '\input{%s} \n \clearpage \n \n' %max_maps[production_dirs[name]]
     255for i, max_maps in enumerate(all_maps):
     256
     257    s = '\subsection{Return Period: %s years} \n \n' %return_periods[i]     
    283258    fid.write(s)
    284259
     260    production_dirs = all_prod_dirs[i]
     261    for name in enumerate(production_dirs.keys()):
     262        s = '\input{%s} \n \clearpage \n \n' %max_maps[production_dirs[name]]
     263        fid.write(s)
     264
     265# Generate latex output for location points
     266s = '\\begin{table} \\begin{center} \n'
     267fid.write(s)
     268s = '\caption{Defined point locations for %s study area.}' %scenario_name.title()
     269fid.write(s)
     270s = """
     271\label{table:locations}
     272\\begin{tabular}{|l|l|l|l|}\hline
     273\\bf{Point Name} & \\bf{Easting} & \\bf{Northing} & \\bf{Elevation (m)}\\\\ \hline
     274"""
     275fid.write(s)
     276
     277gauges, locations, elevation = get_gauges_from_file(project.gauge_filename)
     278
     279for name, gauges, elev in zip(locations, gauges, elevation):
     280    east = gauges[0]
     281    north = gauges[1]
     282    s = '%s & %.2f & %.2f & %.2f \\\\ \hline \n' %(name.replace('_',' '), east, north, elev)
     283    fid.write(s)
     284
     285s = '\\end{tabular} \n  \end{center} \n \end{table} \n \n'
     286fid.write(s)
     287
     288#s = '\\begin{figure}[h] \n \centerline{ \includegraphics[width=\paperwidth]{../report_figures/%s}}' %gauge_map
     289s = '\\begin{figure}[h] \n \centerline{ \includegraphics[scale=0.7]{../report_figures/%s}}' %gauge_map
     290fid.write(s)
     291
     292s  = """
     293\caption{Point locations used for Dampier study.} 
     294\label{fig:points}
     295\end{figure}
     296
     297\clearpage
     298"""
     299fid.write(s)
     300
    285301# Closing
    286302
    287 
    288 s = """
    289 
     303s = """
     304   \section{Impact modelling}
     305    \label{sec:impact}
     306     \input{damage}
     307"""
     308fid.write(s)
     309
     310s = """
    290311     \section{Summary}
    291312     \label{sec:summary}
    292313     \input{summary}
    293314
    294      %\section{Acknowledgements}
    295      %\input{acknowledgements}
     315     \section{Acknowledgements}
     316     \input{acknowledgements}
    296317     
    297318    \input{references}
    298319
     320\clearpage
     321
    299322    \\appendix
    300323
    301    \section{ANUGA modelling parameters}
    302 \label{sec:anugasetup}
    303 \input{anuga_setup}
     324    \section{ANUGA modelling parameters}
     325    \label{sec:anugasetup}
     326    \input{anuga_setup}
     327
     328\clearpage
    304329
    305330   \section{Metadata}
    306331     \label{sec:metadata}
    307332     \input{metadata}
    308      
    309 \section{ANUGA modelling parameters}
    310 \label{sec:anugasetup}
    311 \input{anuga_setup}
    312333
    313334\clearpage
     
    315336   \section{Time series}
    316337     \label{sec:timeseries}
     338     \input{timeseriesdiscussion}
     339     \clearpage
    317340"""
    318341fid.write(s)
     
    320343for i in range(len(latex_output)):
    321344    if latex_output[i] <> '':
     345        s = '\subsection{Return Period: %s years} \n' %return_periods[i]
     346        fid.write(s)
    322347        s = '\input{%s} \n \clearpage \n \n' %latex_output[i]   
    323348        fid.write(s)
    324349
    325350s="""
     351     \section{Damage modelling inputs}
     352     \label{sec:damageinputs}
     353     \input{damage_inputs}
     354     
    326355\end{document}
    327356"""
  • anuga_work/production/dampier_2006/run_dampier.py

    r4147 r4151  
    4545
    4646# filenames
    47 build_time = '20061107_063840_build'
    48 bound_time = '20061102_221245_build'
    49 
    5047boundaries_name = project.boundaries_name
    5148meshes_dir_name = project.meshes_dir_name+'.msh'
     
    135132    domain.set_quantity('stage', tide)
    136133    domain.set_quantity('friction', 0.01)
    137     #combined_time_dir_name = project.topographies_dir+build_time+project.combined_name
    138134    print 'Start Set quantity'
    139135
  • anuga_work/production/onslow_2006/make_report.py

    r4147 r4151  
    2525* Tsunami scenario
    2626* Data sources
    27 
    2827* Inundation modelling results
    2928* Impact modelling
     
    8180
    8281# WA DLI data
    83 production_dirs = {'20060704_063234': 'MSL',
    84                    '20060704_063005': 'HAT',
    85                    '20060706_235246': 'LAT'}
    86 
    87 max_maps = {'MSL': 'MSL_map',
     82production_dirs_test1 = {'20060704_063234': 'MSL',
     83                         '20060704_063005': 'HAT',
     84                         '20060706_235246': 'LAT'}
     85
     86production_dirs_test2 = production_dirs_test1
     87
     88return_periods = [1000, 1000000]
     89
     90all_prod_dirs = [production_dirs_test1, production_dirs_test2]
     91#all_prod_dirs = [production_dirs_test1]
     92
     93is_parallel = False
     94if is_parallel == True:
     95    nodes = 8
     96   
     97max_maps1 = {'MSL': 'MSL_map',
    8898            'HAT': 'HAT_map',
    8999            'LAT': 'LAT_map'}
    90100
     101max_maps2 = max_maps1
     102
     103all_maps = [max_maps1, max_maps2]
     104
    91105gauge_map = 'onslow_dli_gauge.jpg'
    92106
     
    95109# Create sections and graphs for each designated production directory
    96110latex_output = []
     111report_name = 'latexoutput'
    97112swwfiles = {}
    98 for label_id in production_dirs.keys():
    99    
    100     file_loc = project.outputdir + label_id + sep
    101     swwfile = file_loc + project.basename + '.sww'
    102     swwfiles[swwfile] = label_id
    103 
    104 texname, elev_output = sww2timeseries(swwfiles,
    105                                       project.gauge_filename,
    106                                       #project.gauge_filename_bindi,
    107                                       production_dirs,
    108                                       report = True,
    109                                       reportname = 'latexoutput',
    110                                       plot_quantity = ['stage', 'speed'],
    111                                       surface = False,
    112                                       time_min = None,
    113                                       time_max = None,
    114                                       title_on = False,
    115                                       verbose = True)
    116 
    117 latex_output.append(texname)
    118 
     113if is_parallel == True:
     114
     115    for j, production_dirs in enumerate(all_prod_dirs):
     116       
     117        for i in range(nodes):
     118            print 'Sending node %d of %d' %(i,nodes)
     119            swwfiles = {}
     120            reportname = report_name + '%s' + 'rp%s' %(i,j)
     121           
     122            for label_id in production_dirs.keys():
     123                file_loc = project.output_dir + label_id + sep
     124                sww_extra = '_P%s_%s' %(i,nodes)
     125                swwfile = file_loc + project.basename + sww_extra + '.sww'
     126                #swwfile = file_loc + project.scenario_name + sww_extra + '.sww'
     127                swwfiles[swwfile] = label_id
     128
     129                texname, elev_output = sww2timeseries(swwfiles,
     130                                                      project.gauge_filename,
     131                                                      production_dirs,
     132                                                      report = True,
     133                                                      reportname = reportname,
     134                                                      plot_quantity = ['stage', 'momentum'],
     135                                                      surface = False,
     136                                                      time_min = None,
     137                                                      time_max = None,
     138                                                      title_on = False,
     139                                                      verbose = True)
     140               
     141                latex_output.append(texname)
     142   
     143else:
     144
     145    for i, production_dirs in enumerate(all_prod_dirs):
     146
     147        swwfiles = {}
     148        reportname = report_name + 'rp%s' %(i)
     149       
     150        for label_id in production_dirs.keys():
     151
     152            file_loc = project.outputdir + label_id + sep
     153            swwfile = file_loc + project.basename + '.sww'
     154            #swwfile = file_loc + project.scenario_name + sww_extra + '.sww'
     155            swwfiles[swwfile] = label_id
     156           
     157        texname, elev_output = sww2timeseries(swwfiles,
     158                                              project.gauge_filename,
     159                                              production_dirs,
     160                                              report = True,
     161                                              reportname = reportname,
     162                                              plot_quantity = ['stage', 'speed'],
     163                                              surface = False,
     164                                              time_min = None,
     165                                              time_max = None,
     166                                              title_on = False,
     167                                              verbose = True)
     168       
     169        latex_output.append(texname)
     170   
    119171# Start report generation
    120172# Future: generate_report(reportdir, scenario, report_title,
     
    152204\usepackage{setspace}
    153205\usepackage{rotating}
     206\usepackage{pdfpages}
    154207\include{appendix}
    155208\setstretch{1.25}
     
    164217fid.write(s)
    165218
    166 #s = '\\title{%s} \n' %report_title
    167 #fid.write(s)
    168 
    169219s = """
    170220\date{\\today}
     
    218268# Assign titles to each production section
    219269# Must specify one name per section
    220 for i, name in enumerate(production_dirs.keys()):
    221 #
    222 #    s = '\subsection{%s} \n \n' %production_dirs[name]     
    223 #    fid.write(s)
    224 
    225     s = '\input{%s} \n \clearpage \n \n' %max_maps[production_dirs[name]]
     270for i, max_maps in enumerate(all_maps):
     271
     272    s = '\subsection{Return Period: %s years} \n \n' %return_periods[i]     
    226273    fid.write(s)
     274
     275    production_dirs = all_prod_dirs[i]
     276    for i, name in enumerate(production_dirs.keys()):
     277
     278        s = '\input{%s} \n \clearpage \n \n' %max_maps[production_dirs[name]]
     279        fid.write(s)
    227280
    228281# Generate latex output for location points
     
    308361fid.write(s)
    309362
    310 s = '\input{%s} \n \clearpage \n \n' %latex_output[0]
    311 fid.write(s)
     363for i in range(len(latex_output)):
     364    if latex_output[i] <> '':
     365        s = '\subsection{Return Period: %s years} \n' %return_periods[i]
     366        fid.write(s)
     367        s = '\input{%s} \n \clearpage \n \n' %latex_output[i]   
     368        fid.write(s)
    312369
    313370s="""
  • anuga_work/production/onslow_2006/project.py

    r4134 r4151  
    1717state = 'western_australia'
    1818scenario_dir_name = 'onslow_tsunami_scenario_2006'
     19scenario_name = 'onslow'
    1920
    2021# 250m data to be provided
  • anuga_work/production/onslow_2006/report/anuga_setup.tex

    r4145 r4151  
    1212 
    1313The initial conditions used for this scenario are MSL, HAT and LAT which were
    14 defined in Section \ref{sec:data}.
     14defined in Section \ref{sec:data}. Figure \ref{fig:IC} shows the MSL, HAT and
     15LAT contours to illustrate the water level for each of these inial conditions.
    1516The dynamics of
    1617tidal effects (that is, the changes in water height over time for
     
    2324in the scenario. The
    2425results are therefore likely to be over estimates.
     26
     27\begin{figure}[h]
     28
     29  \centerline{\includegraphics[width=\paperwidth]{../report_figures/onslow_dli_contour.jpg}}
     30
     31  \caption{Onslow region showing the initial conditions used for the study;
     32  -1.5m AHD (LAT), 0m AHD (MSL) and 1.5m AHD (HAT) contour lines.}
     33  \label{fig:IC}
     34\end{figure}
     35
    2536
    2637To set up a model for the tsunami scenario, a study area is first
     
    6980The final item to be addressed to complete the model setup is the
    7081definition of the boundary condition. As
    71 discussed in Section \ref{sec:methodology}, a range of events with
    72 different return periods will modelled. It must be
    73 remembered that tsunamis are typically made up of a series
     82discussed in Section \ref{sec:methodology}, a series of events corresponding
     83to a range of return periods are selected as the tsunami sources.
     84The resultant tsunami wave is made up of a series
    7485of waves with different amplitudes which is affected by the energy
    7586and style of the event as well as the bathymetry whilst it travels
    76 from its source to Onslow. The amplitude and velocity of each of these
     87from its source to Dampier. The amplitude and velocity of each of these
    7788waves are then provided to ANUGA as boundary conditions and propagated
    7889inshore.
  • anuga_work/production/onslow_2006/report/metadata.tex

    r3406 r4151  
    1 
    2 See Enclosure.
     1%\includepdf[pages={1-6}]{MetadataforATWSOnslowScenario}
  • anuga_work/production/onslow_2006/report/modelling_methodology.tex

    r4147 r4151  
    1 
    21Geoscience Australia aims to define the economic and social threat posed to urban communities
    32by a range of rapid onset natural hazards. Through the integration of natural hazard research, defining national exposure and
  • anuga_work/production/pt_hedland_2006/make_report.py

    r4134 r4151  
    5252from os import getcwd, sep, altsep, mkdir, access, F_OK
    5353import project
    54 from anuga.pyvolution.util import sww2timeseries, get_gauges_from_file
     54from anuga.abstract_2d_finite_volumes.util import sww2timeseries, get_gauges_from_file
    5555
    5656# Derive scenario name
     
    7070report_title = 'Tsunami impact modelling for the North West shelf: %s' %scenario_name.title()
    7171
     72is_parallel = False
     73if is_parallel == True:
     74    nodes = 8
     75   
    7276# WA DLI data
    7377production_dirs = {'20060707_001859': 'MSL',
     
    7579                   '20060707_003424': 'LAT'}
    7680
     81all_prod_dirs = [production_dirs]
     82
    7783max_maps = {'MSL': 'MSL_map',
    7884            'HAT': 'HAT_map',
     
    8389# Create sections and graphs for each designated production directory
    8490latex_output = []
     91report_name = 'latexoutput'
    8592swwfiles = {}
    86 for label_id in production_dirs.keys():
    87    
    88     file_loc = project.outputdir + label_id + sep
    89     swwfile = file_loc + project.basename + '.sww'
    90     swwfiles[swwfile] = label_id
    91 
    92 texname, elev_output = sww2timeseries(swwfiles,
    93                                       project.gauge_filename,
    94                                       production_dirs,
    95                                       report = True,
    96                                       reportname = 'latexoutput',
    97                                       plot_quantity = ['stage', 'speed'],
    98                                       surface = False,
    99                                       time_min = None,
    100                                       time_max = None,
    101                                       title_on = False,
    102                                       verbose = True)
    103 
    104 latex_output.append(texname)
    105 
     93if is_parallel == True:
     94
     95    for j, production_dirs in enumerate(all_prod_dirs):
     96       
     97        for i in range(nodes):
     98            print 'Sending node %d of %d' %(i,nodes)
     99            swwfiles = {}
     100            reportname = report_name + '%s' + 'rp%s' %(i,j)
     101           
     102            for label_id in production_dirs.keys():
     103                file_loc = project.output_dir + label_id + sep
     104                sww_extra = '_P%s_%s' %(i,nodes)
     105                swwfile = file_loc + project.basename + sww_extra + '.sww'
     106                #swwfile = file_loc + project.scenario_name + sww_extra + '.sww'
     107                swwfiles[swwfile] = label_id
     108
     109                texname, elev_output = sww2timeseries(swwfiles,
     110                                                      project.gauge_filename,
     111                                                      production_dirs,
     112                                                      report = True,
     113                                                      reportname = reportname,
     114                                                      plot_quantity = ['stage', 'momentum'],
     115                                                      surface = False,
     116                                                      time_min = None,
     117                                                      time_max = None,
     118                                                      title_on = False,
     119                                                      verbose = True)
     120               
     121                latex_output.append(texname)
     122   
     123else:
     124
     125    for i, production_dirs in enumerate(all_prod_dirs):
     126
     127        swwfiles = {}
     128        reportname = report_name + 'rp%s' %(i)
     129       
     130        for label_id in production_dirs.keys():
     131
     132            file_loc = project.outputdir + label_id + sep
     133            swwfile = file_loc + project.basename + '.sww'
     134            #swwfile = file_loc + project.scenario_name + sww_extra + '.sww'
     135            swwfiles[swwfile] = label_id
     136           
     137        texname, elev_output = sww2timeseries(swwfiles,
     138                                              project.gauge_filename,
     139                                              production_dirs,
     140                                              report = True,
     141                                              reportname = reportname,
     142                                              plot_quantity = ['stage', 'speed'],
     143                                              surface = False,
     144                                              time_min = None,
     145                                              time_max = None,
     146                                              title_on = False,
     147                                              verbose = True)
     148       
     149        latex_output.append(texname)
     150   
    106151# Start report generation
    107152# Future: generate_report(reportdir, scenario, report_title,
     
    139184\usepackage{setspace}
    140185\usepackage{rotating}
     186\usepackage{pdfpages}
    141187\include{appendix}
    142188\setstretch{1.25}
     
    151197fid.write(s)
    152198
    153 #s = '\\title{%s} \n' %report_title
    154 #fid.write(s)
    155 
    156199s = """
    157200\date{\\today}
     
    174217  \input{execsum}
    175218
     219\clearpage
     220
    176221  \\tableofcontents
    177222 
     
    191236    \label{sec:data}
    192237    \input{data}
    193    
    194    \section{Inundation model}
    195     \label{sec:anuga}
    196     \input{anuga}
    197     \input{computational_setup}
    198238       
    199239  \section{Inundation modelling results}
     
    202242"""
    203243fid.write(s)
     244   
     245s = '\input{interpretation} \n'
     246fid.write(s)
     247
     248# Assign titles to each production section
     249# Must specify one name per section
     250for i, max_maps in enumerate(all_maps):
     251
     252    s = '\subsection{Return Period: %s years} \n \n' %return_periods[i]     
     253    fid.write(s)
     254
     255    production_dirs = all_prod_dirs[i]
     256    for i, name in enumerate(production_dirs.keys()):
     257
     258        s = '\input{%s} \n \clearpage \n \n' %max_maps[production_dirs[name]]
     259        fid.write(s)
    204260
    205261# Generate latex output for location points
    206262s = '\\begin{table} \\begin{center} \n'
    207263fid.write(s)
    208 s = '\caption{Defined point locations for %s study area.}' %scenario_name
     264s = '\caption{Defined point locations for %s study area.}' %scenario_name.title()
    209265fid.write(s)
    210266s = """
     
    226282fid.write(s)
    227283
    228 s = '\\begin{sidewaysfigure} \n \centerline{ \includegraphics[width=\paperwidth]{../report_figures/%s}}' %gauge_map
     284#s = '\\begin{figure}[h] \n \centerline{ \includegraphics[width=\paperwidth]{../report_figures/%s}}' %gauge_map
     285s = '\\begin{figure}[h] \n \centerline{ \includegraphics[scale=0.7]{../report_figures/%s}}' %gauge_map
    229286fid.write(s)
    230287
     
    232289\caption{Point locations used for Port Hedland study.} 
    233290\label{fig:points}
    234 \end{sidewaysfigure}
    235 """
    236 fid.write(s)
    237    
    238 s = '\input{interpretation} \n'
    239 fid.write(s)
    240 
    241 # Assign titles to each production section
    242 # Must specify one name per section
    243 for i, name in enumerate(production_dirs.keys()):
    244 #
    245 #    s = '\subsection{%s} \n \n' %production_dirs[name]     
    246 #    fid.write(s)
    247 
    248     s = '\input{%s} \n \clearpage \n \n' %max_maps[production_dirs[name]]
    249     fid.write(s)
     291\end{figure}
     292
     293\clearpage
     294"""
     295fid.write(s)
    250296
    251297# Closing
     
    258304fid.write(s)
    259305
    260 #for i, name in enumerate(production_dirs.keys()):
    261 
    262 #    s = '\input{%s} \n \clearpage \n \n' %damage_maps[production_dirs[name]]
    263 #    fid.write(s)
    264 
    265 s = """
     306s = """
     307  % \section{Impact due to data accuracy}
     308  %   \input{discussion}
     309  %   \label{sec:issues}
     310
    266311     \section{Summary}
    267312     \label{sec:summary}
    268313     \input{summary}
     314
     315     \section{Acknowledgements}
     316     \input{acknowledgements}
    269317     
    270318    \input{references}
     319
     320\clearpage
    271321
    272322    \\appendix
     
    286336   \section{Time series}
    287337     \label{sec:timeseries}
    288 """
    289 fid.write(s)
    290 
    291 s = '\input{%s} \n \clearpage \n \n' %latex_output[0]
    292 fid.write(s)
     338     \input{timeseriesdiscussion}
     339     \clearpage
     340"""
     341fid.write(s)
     342
     343for i in range(len(latex_output)):
     344    if latex_output[i] <> '':
     345        s = '\subsection{Return Period: %s years} \n' %return_periods[i]
     346        fid.write(s)
     347        s = '\input{%s} \n \clearpage \n \n' %latex_output[i]   
     348        fid.write(s)
    293349
    294350s="""
    295 
    296 \pagebreak
    297351
    298352   \section{Damage modelling inputs}
  • anuga_work/production/pt_hedland_2006/report/damage_inputs.tex

    r3394 r4151  
    1 \begin{table}[p]
     1\begin{table}[h]
    22\begin{center}
    33\caption{Framed residential building collapse probability. $h$ is the
     
    1616\end{table}
    1717
    18 \begin{table}
     18\begin{table}[h]
    1919\begin{center}
    2020\caption{Mortality and injury state probability}
     
    3434\end{table}
    3535
    36 \begin{table}
     36\begin{table}[h]
    3737\begin{center}
    3838\caption{Injury level classificationse. Floor height is assumed to be 30cm}
  • anuga_work/production/pt_hedland_2006/report/execsum.tex

    r3479 r4151  
    11This report is being provided to the Fire and Emergency Services Authority
    22(FESA) as part of the Collaborative Research Agreement (CRA)
    3 with Geoscience Australia (GA).
    4 FESA recognises the potential vulnerability of the Western Australia
    5 coastline to tsunamigenic earthquakes originating from
    6 the Sunda Arc subduction zone that caused the December 2004 event.
    7 There is historic evidence of tsunami events affecting the
     3with Geoscience Australia (GA), Tsunami Impact Modelling for WA.
     4FESA has recognised the potential vulnerability of the Western Australia
     5coastline to tsunami originating from earthquakes on
     6the Sunda Arc subduction zone.
     7There is historic evidence of tsunami affecting the
    88Western Australia coastline, \cite{CB:ausgeo},
    99and FESA has sought to assess
     
    1111threat and develop detailed response plans for a range of plausible events.
    1212
    13 This report describes the modelling methodology and initial results
    14 for a specific tsunami-genic event as it impacts the Port Hedland township
    15 and its surrounds. In particular, maximum inundation maps are shown
    16 and discussed for the event occurring at mean sea level as well as highest and lowest astronomical tide.
    17 The inundation results allow estimation of the number of houses inundated and collapsed, as well as
     13This report describes the modelling methodology and results
     14for a number of tsunami-genic events with varied return periods
     15as they impact the Port Hedland region.
     16In particular, maximum inundation maps are shown
     17and discussed
     18for the event occurring at mean sea level as well as
     19highest and lowest astronomical tide. The inundation results allow
     20estimation of the number of houses inundated and collapsed, as well as
    1821the numbers of persons affected.
    19 For this specific event at high tide, one house is inundated and there are no injuries.
    2022
    21 Future studies
    22 will present a series of scenarios for a range of return periods to
    23 assist FESA in developing appropriate plans for a range of event impacts.
    24 This will also allow an assessment of the relative tsunami risk
     23The results of this study will allow an assessment of the relative tsunami risk
    2524to communities along the NW Shelf of WA.
    2625This report and the decision support tool are the
    27 June 2006 deliverables of the Collaborative Research Agreement,
    28 Tsunami Impact Modelling for WA, between FESA and GA.
     26June 2007 deliverables of the Collaborative Research Agreement
     27between FESA and GA.
    2928
    3029
     30
  • anuga_work/production/pt_hedland_2006/report/interpretation.tex

    r3477 r4151  
    1 The main features of the
    2 tsunami wave and resultant inundation ashore is described in this section.
    3 We have
    4 chosen a number of locations to illustrate the features
    5 of the tsunami as it approaches and impacts Port Hedland.
    6 These locations have been chosen as we believe they would
    7 either be critical
    8 in an emergency situation, (e.g. the hospital) or
    9 effect recovery efforts, (e.g. the airport and wharfs). These locations
    10 are described in Table \ref{table:locations} and shown in
    11 Figure \ref{fig:points}. The water's stage and speed
    12 at each of these locations are shown
    13 as a function of time in the series of graphs shown in
    14 Appendix \ref{sec:timeseries}. It is assumed that the earthquake is
    15 generated at the beginning of the simulation, i.e. time = 0 minutes.
    16 Stage is defined as the absolute
    17 water level (in metres) relative to AHD
    18 \footnote{For an offshore location such as Middle Channel,
    19 the initial water level will be that of the tidal scenario. In the
    20 case of MSL, this water level will be 0. As the tsunami wave moves
    21 through this point, the water height may grow and thus the stage will
    22 represent the amplitude of the wave. For an onshore location such as the
    23 Hospital, the actual water depth will be the difference between
    24 the stage and the elevation at that point. Therefore, at the beginning
    25 of the simulation, there will be no water onshore and therefore
    26 the stage and the elevation will be identical.}. Both stage and speed
    27 (in metres/second) for
    28 each scenario (HAT, MSL and LAT) are shown
    29 on consistent scales to allow comparison between point locations.
    30 As a useful benchmark, Table \ref{table:speedexamples}
    31 describes typical examples for a range of speeds found in the
    32 simulations.
    33 
    34 \begin{table}[h]
    35 \label{table:speedexamples}
    36 \caption{Examples of a range of velocities.}
    37 \begin{center}
    38 \begin{tabular}{|l|l|}\hline
    39 {\bf Velocity (m/s)} & {\bf Example} \\ \hline
    40 1 & leisurely stroll pace\\ \hline
    41 1.5 & average walking pace \\ \hline
    42 %2 & 100m Olympic male freestyle \\ \hline
    43 %3 & mackeral \\ \hline
    44 4 & average person can maintain running for 1000m \\ \hline
    45 %5 & blue whale \\ \hline
    46 10 & 100m Olympic male sprinter \\ \hline
    47 16 & car travelling in urban zones (60 km/hr) \\ \hline
    48 \end{tabular}
    49 \end{center}
    50 \end{table}
    51 
    52 A tsunami wave typically has a small amplitude and typically travels at
    53 100's of kilometres per hour.
    54 The low amplitude complicates the ability to detect
    55 the wave. As the water depth decreases,
    56 the speed of the wave
    57 decreases and the amplitude grows. Another important feature of tsunamis
    58 is drawdown. This means that the water is seen to retreat from the beaches
    59 before a tsunami wave
    60 impacts that location. Other features
    61 include reflections (where the wave is redirected due to the
    62 influence
    63 of the coast) and shoaling (where the wave's amplitude is amplified
    64 close to the coast due to wave interactions).
    65 These features are seen in the MSL scenario;
    66 there is a small wave, followed
    67 by a large drawdown and then a large secondary wave.
    68 There are variations in the behaviour for the
    69 HAT and LAT scenarios, and these will be explained below.
    70  
    71 The features described above will be
    72 illustrated for the MSL case by the Middel Channel location,
    73 Figure \ref{fig:gaugeMiddleChannel}.
    74 The first, small wave can be seen at around 230 mins (shown in red),
    75 with an amplitude of around 0.3 m\footnote{In this
    76 scenario, the initial water level is 0 m, which means that
    77 the actual amplitude is the difference between the stage value
    78 and the initial water level; 0.3 - 0}.
    79 The drawdown of around 2.6 m (i.e. 0.27 - -2.37) then occurs at around 270 mins
    80 (i.e. 4.5 hours after the event has been generated), before
    81 the second wave arrives at around 280 mins
    82 with an amplitude of around 1.8 m (i.e. 1.8 - 0). Subsequent waves
    83 are evident with decreased amplitudes.
    84 These features are replicated at each of the offshore points (those
    85 points with negative elevation as shown in Table \ref{table:locations}).
    86 The speed of the tsunami wave is greatest for those locations
    87 in shallowest water. Middle Channel is in shallower water
    88 than Mt Goldworthy Wharf - Berth
    89 and the maximum speeds measured are 1.93 m/s and 2.9 m/s respectively.
    90 
    91 There are variations in these behaviours for the HAT and LAT scenarios.
    92 Referring again to the Middle Channel location (Figure
    93 \ref{fig:gaugeMiddleChannel}),
    94 
    95 {\bf stuff to write in here about the HAT, LAT scenarios }
     1The inundation extent calculated at Port Hedland will be described in this section with
     2impact assessments following in Section \ref{sec:impact}.
     3% there will need to be something in here for when doing a range of events for each return period.
     4Figures \ref{fig:HAT_max_inundation}, \ref{fig:MSL_max_inundation} and
     5\ref{fig:LAT_max_inundation} illustrate the maximum inundation extent
     6for the Mw 9 event occurring at HAT, MSL and LAT respectively.
     7As expected, there is greater inundation for the HAT scenario with increased
     8extent. The major road from the south,
     9the Great Northern Highway, remains free of inundation for all tidal
     10scenarios. At HAT, the road feeding off the highway, Anderson Street,
     11suffers inundation in the tidal flat region. The inundation would
     12be enough to halt usage of the road.
     13The road servicing Finucane Station remains
     14free of inundation, however there is a small section of the railway which
     15receives under 0.2 m of water. Likewise, there
     16is inundation on a section of the railway which services Port Hedland Station.
     17There is not enough information regarding
     18the railway structure to determine whether it would halt its usage (i.e. how
     19high has it been built). The airport remains
     20free of inundation for each tidal scenario.
    9621
    9722The geography of the Port Hedland area has played a role in offering
     
    11035the region past the east of the headland.
    11136
    112 The tsunami wave has an amplitude of around 0.3 m for the MSL
    113 scenario as it enters the
    114 channel (Figure \ref{fig:gaugeMiddleChannel}. There seems to be
    115 limited or no amplification of the tsunami wave as it moves into
    116 the channel. The amplitude of the first tsunami wave is around 0.3 m at
    117 the Mt Goldworthy Wharf - Berth location (shown in red in Figure
    118 \ref{fig:gaugeMtGoldworthyWharf-Berth} and the maximum amplitude
    119 is around 1.7 m. At MSL and LAT, there is limited inundation in the
    120 areas surrounding the channel. At HAT, significantly increased
    121 inundation is evident surrounding the channel, however, this inundation
    122 is essentially caught in the tidal flat regions.
    123 
    124 As expected, there is greater inundation for the HAT scenario with increased
    125 extent, with minimal inundation found at the locations chosen.
    126 The major road from the south,
    127 the Great Northern Highway, remains free of inundation for all tidal
    128 scenarios. At HAT, the road feeding off the highway, Anderson Street,
    129 suffers inundation in the tidal flat region. The inundation would
    130 be enough to halt usage of the road.
    131 The road servicing Finucane Station remains
    132 free of inundation, however there is a small section of the railway which
    133 receives under 0.2 m of water. Likewise, there
    134 is inundation on a section of the railway which services Port Hedland Station.
    135 There is not enough information regarding
    136 the railway structure to determine whether it would halt its usage (i.e. how
    137 high has it been built). The airport remains
    138 free of inundation for each tidal scenario. Section \ref{sec:impact}
    139 details the impact estimates to the residential infrastructure.
     37In addition to describing the maximum inundation extent,
     38we have
     39chosen a number of locations to illustrate the features
     40of the tsunami as it approaches and impacts Port Hedland.
     41These locations have been chosen as we believe they would
     42either be critical
     43in an emergency situation, (e.g. the hospital) or
     44effect recovery efforts, (e.g. the airport and wharfs). These locations
     45are described in Table \ref{table:locations} and shown in
     46Figure \ref{fig:points}. The water's stage and speed
     47at each of these locations are shown
     48as a function of time in the series of graphs shown in
     49Appendix \ref{sec:timeseries}. Discussion of the main features of the
     50tsunami wave is also described in Appendix \ref{sec:timeseries}.
  • anuga_work/production/pt_hedland_2006/report/introduction.tex

    r3380 r4151  
    2323detailing critical infrastructure as well as damage modelling estimates.
    2424
    25 This report is the first in a series of tsunami assessments
    26 of the North West Shelf. The scenario used for this study has
    27 an unknown return period, but considered a plausible event (see
    28 Section \ref{sec:tsunamiscenario}).
    29 Subsequent assessments will use refined hazard models with
    30 associate return rates for other localities, as advised by FESA.
     25This report details the impact assessments for a range of tsunami events.
     26These events are based on the probabilistic hazard assessment conducted
     27for the Western Australian coastline. A number of events are selected for
     28return periods of 500, 1000 and 2000 years, see Section \ref{sec:tsunamiscenario}.
     29
    3130Port Hedland has a population of around 42000 (including South Hedland) and
    3231is part of the Pilbara region of Western Autralia
     
    3736
    3837The modelling technique to simulate the
    39 impact ashore will be discussed in Section \ref{sec:anuga} and data inputs
    40 discussed in Section \ref{sec:data}.
     38impact ashore will be discussed in Section \ref{sec:methodology} and
     39event and data inputs
     40discussed in Sections \ref{sec:tsunamiscenario} and \ref{sec:data} respectively.
    4141The inundation results are presented and discussed in Section \ref{sec:results}
    4242and the impact modelling results outlined in Section \ref{sec:impact}.
  • anuga_work/production/pt_hedland_2006/report/metadata.tex

    r2950 r4151  
    1 
    2 to be provided by Hamish and Kathryn
     1%\includepdf[pages={1-6}]{MetadataforATWSPortHedlandScenario}
  • anuga_work/production/pt_hedland_2006/report/references.tex

    r3477 r4151  
    1212Tsunami (MOST) model, NOAA Technical Memorandum ERL PMEL-112.
    1313
    14 %\bibitem{somerville:urs} Somerville, P., Thio, H.K. and Ichinose, G. (2005)
    15 %Probabilistic Tsunami Hazard Analysis. Report delivered to Geoscience
    16 %Australia 2005.
     14\bibitem{prob:fesa} Burbidge, D. and Cummins, P. (2006) Probabilistic
     15Tsunami Hazard Assessment of Western Australia. Report to the
     16Fire and Emergency Services Authority of Western Australia.
     17
     18\bibitem{somerville:urs} Somerville, P., Thio, H.K. and Ichinose, G. (2005)
     19Probabilistic Tsunami Hazard Analysis. Report delivered to Geoscience
     20Australia 2005.
    1721
    1822\bibitem{matsuyama:1999}
     
    4650HAZUS-MH User Manual, Washington DC, USA.
    4751
     52\bibitem{uq:friction} Duncan - do you have a reference for this?
     53
    4854\end{thebibliography}
  • anuga_work/production/pt_hedland_2006/report/tsunami_scenario.tex

    r3375 r4151  
    1 The tsunamigenic event used in this report was developed for a
    2 preliminary tsunami hazard assessment study delivered by GA
    3 to FESA in September 2005
    4 \cite{BC:FESA}. In the assessment, a suite of Mw 9 earthquakes
    5 were evenly spaced along the Sunda Arc subduction zone and there
    6 was no consideration of the likelihood of each event.
    7 Other less likely sources were not considered, such
    8 as intra-plate earthquakes near the WA coast, volcanoes, landslides
    9 or asteroids.
    10 In the preliminary assessment,
    11 the maximum magnitude of earthquakes off Java was considered to be
    12 at least 8.5 and could potentially be as high as 9.
    131
    14 FESA is interested in the ``most frequent worst case scenario''. Whilst
    15 we currently cannot determine exactly what that event may be, the Mw 9 event
    16 provides a plausible worst case scenario. To understand the
    17 frequency of these tsunami-genic events,
    18 GA is building probabilistic
    19 models to develop a more complete tsunami hazard assessment
    20 for the Sunda Arc subduction zone,
    21 due for completion in late 2006. In the preliminary assessment for
    22 example, it was suggested that while Mw 7 and 8 earthquakes are expected
    23 to occur with a greater frequency than Mw 9 events,
    24 they are likely to pose a comparatively low and more localised hazard to WA.
    25 
    26 Figure \ref{fig:mw9} shows the maximum wave height of a tsunami initiated
    27 by a Mw 9 event off
    28 the coast of Java. This event provides the source and
    29 boundary condition to the
    30 inundation model presented in Section \ref{sec:anuga}.
    31 
    32 
    33 \begin{figure}[hbt]
    34 
    35   \centerline{ \includegraphics[width=100mm, height=75mm]
    36 {../report_figures/mw9.jpg}}
    37 
    38   \caption{Maximum wave height (in cms) for a Mw 9 event off the
    39 coast of Java}
    40   \label{fig:mw9}
    41 \end{figure}
Note: See TracChangeset for help on using the changeset viewer.