""" 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, remove from anuga.abstract_2d_finite_volumes.util import sww2timeseries # nominate directory location of sww file with associated attribute production_dirs = {'': 'gradual_lgflat'} # Generate figures swwfiles = {} for label_id in production_dirs.keys(): file_loc = label_id swwfile = file_loc + 'gradual_lgflat'+'.sww' swwfiles[swwfile] = label_id print 'hello', swwfile texname, elev_output = sww2timeseries(swwfiles, sep+'d'+sep+'cit'+sep+'1'+sep+'cit'+sep+'natural_hazard_impacts'+sep+'inundation'+sep+'sandpits'+sep+'jbrowning'+sep+'anuga'+sep+'anuga_work'+sep+'development'+sep+'idealised_bathymetry_study'+sep+'final_models'+sep+'general'+sep+'gauges_lgflat.csv', production_dirs, report = False, reportname = '', plot_quantity = ['stage', 'speed'], generate_fig = False, surface = False, time_min = None, time_max = None, #time_unit = 'secs', title_on = True, verbose = True)