Ignore:
Timestamp:
Jun 20, 2006, 5:59:42 PM (18 years ago)
Author:
sexton
Message:

make gauges to compare MOST and ANUGA time series

File:
1 edited

Legend:

Unmodified
Added
Removed
  • production/onslow_2006/MOST_timeseries.py

    r3159 r3188  
    44Inputs:
    55
    6 output dirs: dictionary of output directories with a
    7              association to simulation, eg 50m boundary, 100m boundary
    8                    
     6production dirs: dictionary of output directories with a
     7                 association to simulation, eg 50m boundary, 100m boundary
     8
     9gauge_map:       graphical output from make_gauges.py
     10
    911Outputs:
    1012
     
    2224
    2325# User defined inputs
    24 production_dirs = {'SU-AU_clip': 'MOST'}
     26production_dirs = {'20060515_001733': '100m boundary',
     27                   #'20060530_102753': '50m boundary'}#,
     28                   'MOST': 'MOST'}
    2529
    2630gauge_map = 'boundarycomparison.png'
    27 plot_quantity = ['stage', 'speed']
    2831
    2932# Create sections and graphs for each designated production directory
     
    3235for label_id in production_dirs.keys():
    3336   
    34     file_loc = project.boundarydir
    35     swwfile = file_loc + project.boundary_basename + '.sww'
     37    file_loc = project.outputdir + label_id + sep
     38    swwfile = file_loc + project.basename + '.sww'
     39    if label_id == 'MOST':
     40        swwfile = project.boundarydir + project.boundary_basename + '.sww'
    3641    swwfiles[swwfile] = label_id
     42
     43print 'swwfiles', swwfiles
    3744
    3845texname, vec = sww2timeseries(swwfiles,
     
    4047                              production_dirs,
    4148                              report = True,
    42                               reportname = 'latexoutput_MOST_input',
    43                               plot_quantity = plot_quantity,
     49                              reportname = 'latexoutput_MOST_ANUGA_comparison',
     50                              plot_quantity = ['stage', 'speed'],
     51                              surface = False,
    4452                              time_min = None,
    4553                              time_max = None,
     
    4957latex_output.append(texname)
    5058
     59from shutil import copy, move
     60copy ('report' + sep + texname + '.tex', project.comparereportdir + sep + texname + '.tex')
    5161
    5262# Start report generation
    53 reportdir = getcwd()+sep+'report'+sep
    54 if access(reportdir,F_OK) == 0:
    55     mkdir (reportdir)
    56 input_name = reportdir + sep + 'MOST_input_onslow.tex'
     63input_name = project.comparereportdir + sep + 'comparison_onslow.tex'
    5764fid = open(input_name, 'w')
     65
     66s = '\\begin{figure}[hbt] \n \centerline{ \includegraphics[width=150mm, height=100mm]{../report_figures/%s}}' %gauge_map
     67fid.write(s)
     68
     69s  = """
     70\caption{Point locations used to compare MOST and ANUGA for Onslow region.} 
     71\label{fig:comparisonpoints}
     72\end{figure}
     73"""
     74fid.write(s)
     75   
     76s = '\input{%s} \n \clearpage \n \n' %latex_output[0]
     77fid.write(s)
     78
    5879
    5980# Generate latex output for location points
     
    81102#s = '\\end{tabular} \n  \end{center} \n \end{table} \n \n'
    82103#fid.write(s)
    83 
    84 s = '\\begin{figure}[hbt] \n \centerline{ \includegraphics[width=150mm, height=100mm]{../report_figures/%s}}' %gauge_map
    85 fid.write(s)
    86 
    87 s  = """
    88 \caption{Point locations used for MOST input for Onslow region.} 
    89 \label{fig:boundarypoints}
    90 \end{figure}
    91 """
    92 fid.write(s)
    93    
    94 s = '\input{%s} \n \clearpage \n \n' %latex_output[0]
    95 fid.write(s)
Note: See TracChangeset for help on using the changeset viewer.