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/onslow_2006
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.