Changeset 9208


Ignore:
Timestamp:
Jun 22, 2014, 10:17:08 AM (10 years ago)
Author:
steve
Message:

Updated cairns demo

Location:
trunk/anuga_core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/demos/cairns/get_timeseries.py

    r9204 r9208  
    1313import anuga
    1414
    15 anuga.sww2csv_gauges('cairns_slide.sww',
     15try:
     16    anuga.sww2csv_gauges('cairns_slide.sww',
    1617                project.gauge_filename,
    1718                quantities=['stage','speed','depth','elevation'],
    1819                verbose=True)
    19                
    20 anuga.sww2csv_gauges('cairns_fixed_wave.sww',
     20except:
     21    print 'Failed to process cairns_slide'
     22
     23try:               
     24    anuga.sww2csv_gauges('cairns_fixed_wave.sww',
    2125               project.gauge_filename,
    2226               quantities=['stage', 'speed','depth','elevation'],
    2327               verbose=True)
     28except:
     29    print 'Failed to process cairns_fixed_wave'
    2430
    2531try:
    2632    import pylab
    27     anuga.csv2timeseries_graphs(directories_dic={'slide'+sep: ['Slide',0, 0],
    28                                            'fixed_wave'+sep: ['Fixed Wave',0,0]},
     33    anuga.csv2timeseries_graphs(directories_dic={'fixed_wave'+sep: ['Fixed Wave',0,0]},
    2934                          output_dir='fixed_wave'+sep,
    3035                          base_name='gauge_',
     
    3843    #ANUGA does not rely on pylab to work
    3944    print 'must have pylab installed to generate plots'
     45
     46
     47try:
     48    import pylab
     49    anuga.csv2timeseries_graphs(directories_dic={'slide'+sep: ['Slide',0, 0]},
     50                          output_dir='slide'+sep,
     51                          base_name='gauge_',
     52                          plot_numbers='',
     53                          quantities=['stage','speed','depth'],
     54                          extra_plot_name='',
     55                          assess_all_csv_files=True,                           
     56                          create_latex=False,
     57                          verbose=True)
     58except ImportError:
     59    #ANUGA does not rely on pylab to work
     60    print 'must have pylab installed to generate plots'
  • trunk/anuga_core/source/anuga/__init__.py

    r9170 r9208  
    4141
    4242from anuga.abstract_2d_finite_volumes.util import file_function, \
    43                                         sww2timeseries, sww2csv_gauges
     43                                        sww2timeseries, sww2csv_gauges, \
     44                                        csv2timeseries_graphs
    4445
    4546from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular_cross, \
Note: See TracChangeset for help on using the changeset viewer.