Ignore:
Timestamp:
Jun 13, 2006, 1:44:17 PM (19 years ago)
Author:
sexton
Message:

update sww2timeseries to have a reportname as an input

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/util.py

    r3094 r3141  
    546546                   production_dirs,
    547547                   report = None,
     548                   reportname = None,
    548549                   plot_quantity = None,
    549550                   time_min = None,
     
    576577                    - if False, figures are already stored with sww file
    577578                    - default to False
     579
     580    reportname      - name for report if wishing to generate report
    578581   
    579582    plot_quantity   - list containing quantities to plot, they must
     
    626629                        production_dirs,
    627630                        report,
     631                        reportname,
    628632                        plot_quantity,
    629633                        time_min,
     
    638642                    production_dirs,
    639643                    report = None,
     644                    reportname = None,
    640645                    plot_quantity = None,
    641646                    time_min = None,
     
    722727    if verbose: print 'Inputs OK - going to generate figures'
    723728
    724     return generate_figures(plot_quantity, file_loc, report, leg_label,
     729    return generate_figures(plot_quantity, file_loc, report, reportname, leg_label,
    725730                            f_list, gauges, locations, elev, production_dirs,
    726731                            time_min, time_max, title_on, label_id, verbose)
     
    784789    return bearing
    785790
    786 def generate_figures(plot_quantity, file_loc, report, leg_label, f_list, gauges,
     791def generate_figures(plot_quantity, file_loc, report, reportname, leg_label, f_list, gauges,
    787792                     locations, elev, production_dirs, time_min, time_max,
    788793                     title_on, label_id, verbose):
     
    801806            label_id1 = label_id[0].replace(sep,'')
    802807            label_id2 = label_id1.replace('_','')
    803             texfile = texdir+'latexoutput%s' %(label_id2)
    804             texfile2 = 'latexoutput%s' %(label_id2)
    805             texfilename = texfile + '.tex' 
     808            texfile = texdir+reportname+'%s' %(label_id2)
     809            texfile2 = reportname+'%s' %(label_id2)
     810            texfilename = texfile + '.tex'
    806811            if verbose: print '\n Latex output printed to %s \n' %texfilename
    807812            fid = open(texfilename, 'w')
    808813        else:
    809             texfile = texdir+'latexoutput'
    810             texfile2 = 'latexoutput'
     814            texfile = texdir+reportname
     815            texfile2 = reportname
    811816            texfilename = texfile + '.tex'
    812817            if verbose: print '\n Latex output printed to %s \n' %texfilename
Note: See TracChangeset for help on using the changeset viewer.