""" Generate time series of nominated "gauges" Note, this script will only work if pylab is installed on the platform Inputs: production dirs: dictionary of production directories with a association to that simulation run, eg high tide, magnitude, etc. Outputs: * figures stored in same directory as sww file * time series data stored in csv files in same directory as sww file * elevation at nominated gauges (elev_output) """ from os import getcwd, sep, altsep, mkdir, access, F_OK import project from anuga.abstract_2d_finite_volumes.util import sww2timeseries # nominate directory location of sww file with associated attribute production_dirs = {#'slide': 'Slide', 'fixed_wave': 'Fixed Wave'} # Generate figures swwfiles = {} for label_id in production_dirs.keys(): file_loc = label_id + sep swwfile = file_loc + label_id + 'source.sww' swwfiles[swwfile] = label_id texname, elev_output = sww2timeseries(swwfiles, project.gauge_filename, production_dirs, report = False, reportname = '', plot_quantity = ['stage', 'speed'], generate_fig = False, surface = False, time_min = None, time_max = None, title_on = True, verbose = True)