""" Generate images of "gauges" for production run Inputs: production dirs: dictionary of production directories with a association to that simulation run, eg high tide, low tide and MSL. Outputs: * figures used for report stored in the report_figure directory """ from os import getcwd, sep, altsep, mkdir, access, F_OK import project from anuga.abstract_2d_finite_volumes.util import sww2timeseries # Create report directory reportdir = getcwd()+sep+'report'+sep if access(reportdir,F_OK) == 0: mkdir (reportdir) # 2500 interior resolution for both events # use both to compare the events production_dirs = {'20061006_062319': 'Mw 8.5', '20061008_234702': 'Mw 8.7'} # Generate figures swwfiles = {} for label_id in production_dirs.keys(): file_loc = project.outputdir + label_id + sep swwfile = file_loc + project.basename + '.sww' swwfiles[swwfile] = label_id texname, elev_output = sww2timeseries(swwfiles, project.gauge_filename, production_dirs, report = False, reportname = '', plot_quantity = ['stage', 'speed'], surface = False, time_min = None, time_max = None, title_on = False, verbose = True)