Changeset 1836


Ignore:
Timestamp:
Sep 15, 2005, 5:37:00 PM (18 years ago)
Author:
ole
Message:

Added points where timeseries is plottet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • production/karratha_2005/get_timeseries.py

    r1821 r1836  
    1313#timestep = 0.05
    1414
     15gauges = [[60000, 83000],
     16          [60000, 80000],
     17          [60000, 75000],                   
     18          [60000, 70000],         
     19          [60000, 60000],
     20          [60000, 50000],         
     21          [60000, 40000],
     22          [60000, 30000],         
     23          [60000, 20000],
     24          [60000, 10000],         
     25          [60000, 0]]
     26#gauge_names = ['SW', 'N', 'N2', ]
     27 
    1528
    1629#Read model output
    17 f = file_function(swwfile,
    18                   quantities = 'stage',
    19                   #interpolation_points = gauges,
    20                   verbose = True)
     30from caching import cache
     31#f = file_function(swwfile,
     32#                  quantities = 'stage',
     33#                  interpolation_points = gauges,
     34#                  verbose = True)
     35
     36f = cache(file_function, swwfile,
     37          {'quantities': 'stage',
     38           'interpolation_points': gauges,
     39           'verbose': True},
     40          dependencies = [swwfile],
     41          verbose = True)
    2142
    2243print f
     44model_time = f.T
    2345
    2446
    25 for k, name in enumerate(gauge_names):
     47for k, g in enumerate(gauges):
    2648    model_values = []
    27     for i, t in enumerate(reference_time):
     49    for i, t in enumerate(f.T):
    2850        val = f(t, point_id = k)[0]
    29         model.append(val)
     51        model_values.append(val)
    3052
    3153    from pylab import *
     
    3355    hold(False)
    3456    plot(model_time, model_values, '-b')
     57    name = str(g)
    3558    title('Gauge %s' %name)
    3659    savefig(name, dpi = 300)
Note: See TracChangeset for help on using the changeset viewer.