Changeset 5697


Ignore:
Timestamp:
Aug 27, 2008, 1:19:26 PM (14 years ago)
Author:
duncan
Message:

Hinwood - fix for line overrunning graph in anuga report

Location:
anuga_work/development/Hinwood_2008
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/Hinwood_2008/calc_norm.py

    r5681 r5697  
    8080        #print "min(time_exp)", min(time_exp)
    8181        #print "max(time_exp)", max(time_exp)
    82        
    83         condition = get_max_min_condition_array(run_data['wave_times'][0],
     82
     83        # Trim the experimental data
     84        condition_exp = get_max_min_condition_array(run_data['wave_times'][0],
    8485                                                run_data['wave_times'][1],
    8586                                                time_exp)
    86         time_exp_cut = compress(condition, time_exp) #, axis=axis)
     87        time_exp_cut = compress(condition_exp, time_exp) #, axis=axis)
    8788        #print "min(time_exp_cut)", min(time_exp_cut)
    8889        #print "max(time_exp_cut)", max(time_exp_cut)
    8990       
    9091        #assert min(time_sim) < min(time_exp)
     92
     93        # Trim the simulation data
     94
     95
    9196       
    9297        print "Writing to ", file_err
     
    100105            quantity_exp = [float(x) for x in experiment[location_exp]]
    101106
    102             quantity_exp_cut = compress(condition, quantity_exp)
     107            quantity_exp_cut = compress(condition_exp, quantity_exp)
    103108
    104109            # Now let's do interpolation
     
    436441    outputdir_tags.append("_no_velocity_nolmts_wdth_0.1_z_0.0_ys_0.01_mta_0.0001_I")
    437442   
     443    outputdir_tags = []
     444    outputdir_tags.append("_lmts_wdth_0.1_z_0.0_ys_0.01_mta_0.01_I")
    438445    #outputdir_tag = "_test_limiterC"
    439446    #scenarios = [scenarios[0]] # !!!!!!!!!!!!!!!!!!!!!!
  • anuga_work/development/Hinwood_2008/plot.py

    r5681 r5697  
    66import project
    77from time import localtime, strftime
     8
     9from Numeric import compress
     10
     11from calc_norm import get_max_min_condition_array
    812
    913def plot_compare_csv(location_sim, file_sim, location_exp, file_exp,
     
    259263    time_exp = [float(x) for x in experiment['Time']]
    260264
     265
     266    # Trim the simulation data, due to strange anuga paper bug
     267    condition_sim = get_max_min_condition_array(run_data['wave_times'][0],
     268                                                run_data['wave_times'][1],
     269                                                time_sim)
     270    time_sim = compress(condition_sim, time_sim)
    261271   
    262272    if is_interactive:
     
    274284        quantity_exp = [float(x) for x in experiment[location_exp]]
    275285
     286        # Trim the simulation data, due to strange anuga paper bug
     287        quantity_sim = compress(condition_sim, quantity_sim)
     288
    276289   
    277290        l_sim, l_exp = plot(time_sim, quantity_sim, time_exp, quantity_exp)
     
    280293        grid(True)
    281294       
    282         # When the shore gauges out of the are used, don't
     295        # When the shore gauges are used, don't
    283296        # use the standard y axis scale
    284297        gauge_elev = run_data['gauge_bed_elevation'][i]
     
    303316            # the fudge -0.001 is to reduce the ytick's
    304317
    305         # need to drop the axis name being printed
    306         if x_axis is not None:
    307             axis(xmin=x_axis[0], xmax=x_axis[1])
     318        axis(xmin=x_axis[0], xmax=x_axis[1])
    308319
    309320        # Only do tick marks on the final graph
  • anuga_work/development/Hinwood_2008/run_dam.py

    r5681 r5697  
    3131                            Transmissive_Momentum_Set_Stage_boundary
    3232from anuga.fit_interpolate.interpolate import interpolate_sww2csv
    33 from anuga.abstract_2d_finite_volumes.util import start_screen_catcher, \
    34       file_function
    35 from anuga.shallow_water.data_manager import copy_code_files
     33
     34from anuga.abstract_2d_finite_volumes.util import file_function
     35from anuga.shallow_water.data_manager import copy_code_files, \
     36     start_screen_catcher
    3637from anuga.abstract_2d_finite_volumes.generic_boundary_conditions\
    3738     import File_boundary_time
     
    340341   
    341342    run_type = 1
    342     run_type = 0  # for testing
     343    #run_type = 0  # for testing
    343344   
    344345    #for run_data in [scenarios[5]]:
     
    346347    #scenarios = [scenarios[0]]
    347348   
    348     width = 1.0
     349    #width = 1.0
    349350    width = 0.1
    350351    #width = 0.01
    351352
    352     maximum_triangle_area=0.0001
     353    maximum_triangle_area=0.01
    353354    yieldstep = 0.01
    354355    friction=0.0
Note: See TracChangeset for help on using the changeset viewer.