Changeset 2957


Ignore:
Timestamp:
May 24, 2006, 2:35:03 PM (18 years ago)
Author:
ole
Message:

Using new interface to interpolation function and some restructuring

Location:
development/stochastic_study
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • development/stochastic_study/project.py

    r2448 r2957  
    99basename = 'simulation'
    1010mesh_filename = basename + '.msh'
     11
     12
     13# Gauges (3 timeseries (Ch 5-7-9))
     14gauges = [[4.521, 1.196],  [4.521, 1.696],  [4.521, 2.196]]
     15gauge_names = ['ch5', 'ch7', 'ch9']
     16
    1117
    1218# Stats (Suresh ?)
  • development/stochastic_study/run_model.py

    r2866 r2957  
    5757print domain.statistics()
    5858
    59 import sys; sys.exit()
    60 
    6159
    6260domain.set_datadir('.')
     
    8886finaltime = 22.5
    8987timestep = 0.05
    90 
    9188
    9289
     
    124121            # Now extract the 3 timeseries (Ch 5-7-9) and store them
    125122            # in three files for this realisation
    126             gauges = [[4.521, 1.196],  [4.521, 1.696],  [4.521, 2.196]]
    127             gauge_names = ['ch5', 'ch7', 'ch9']
    128 
    129            
    130123            f = file_function(domain.filename + '.sww',
    131124                              quantities='stage',
    132                               interpolation_points=gauges,
    133                               verbose = True)
     125                              interpolation_points=project.gauges,
     126                              verbose=True)
    134127
    135128
    136129            simulation_name = domain.filename + '_realisation_%d' %realisation
    137130
    138             for k, name in enumerate(gauge_names):
     131            for k, name in enumerate(project.gauge_names):
    139132                fid = open(simulation_name + '_' + name + '.txt', 'w')
    140                 for t in f.T:
     133                for t in f.get_time():
    141134                    #For all precomputed timesteps
    142135                    val = f(t, point_id = k)[0]
Note: See TracChangeset for help on using the changeset viewer.