Ignore:
Timestamp:
Feb 16, 2006, 3:41:21 PM (19 years ago)
Author:
nicholas
Message:

Creation of looped friction to auto generate multiple friction blocks. CCS.py created as modified copy of PCS.py ( plots cross section at various times of buildings and friction blocks)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • development/momentum_sink/PCS.py

    r2415 r2417  
    77import project
    88from pyvolution.util import file_function
    9 #from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn
    10 #from coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn
     9from create_buildings import porosity, WidtH
     10# from run_friction import fric
    1111from pylab import *
    12 #from compare_sww import gauge_locations
    1312
    14    
     13fric = 1   
    1514#swwfile = project.newoutputname + '.sww'
    1615#swwfile = project.outputname
    17 swwfile_B = project.outputdir + sep  + 'Buildings_3790.sww'
    18 swwfile_F = project.outputdir + sep  + 'Buildings_3662.sww'
    19 #swwfile_F = project.outputdir + sep  + 'friction_3135.sww'
    2016
    21 gauge_depth = Numeric.arrayrange(0, 700, 10)
     17#swwfile_B = project.outputdir + sep  + 'Buildings_3790.sww'
     18#swwfile_B = project.outputdir + sep  + 'Buildings_3662.sww'
     19swwfile_B = project.outputdir + sep  + 'friction_n=10_3135.sww'
     20swwfile_F = project.outputdir + sep  + 'friction_n=20_3135.sww'
     21
     22gauge_depth = Numeric.arrayrange(0, 2.5*WidtH, 5)
    2223gauge_breadth = 100
    2324gauge_locations = []
     
    5556    velocity = []
    5657    for i, GL in enumerate(gauge_depth):
     58
     59        # mines data from specified time values in sww file
    5760        wB = f_B(t, point_id = i)[0]
    5861        zB = f_B(t, point_id = i)[1]
     
    8285
    8386    ion()
    84     hold(False)
     87    hold(True)
     88    subplot(211)
     89   
    8590    plot(gauge_depth, stages_B, '-b',gauge_depth,stages_F,'-r')
    86     title('Time_%d_ vs water depth' %t)
     91    title('Time_%d_ vs water depth (n=%f, BP=%f)' %(t, fric, porosity))
    8792    xlabel('gauge length(m)')
    8893    ylabel('water depths (m)')
    89     savefig('Comp_Time%d_B_vs_F' %t)
    90     #plot(gauge_depth, diff, 'g')
    91     #title('differences')
    92     # raw_input('Next')
     94    #savefig('Comp_Time%d_B_vs_F' %t)
     95    hold(False)
     96#savefig('Final_comp_n=%s' %fric)
     97subplot(212)
     98subplots_adjust(hspace = 0.4)
     99plot(gauge_depth, diff, 'g')
     100title('Final Differences in water levels')
     101xlabel('gauge length(m)')
     102ylabel('water differences (m)')
     103savefig('Final_Water_diff_n=%s' %fric)
    93104print "finished"
    94105
Note: See TracChangeset for help on using the changeset viewer.