Changeset 2417 for development/momentum_sink/PCS.py
- Timestamp:
- Feb 16, 2006, 3:41:21 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
development/momentum_sink/PCS.py
r2415 r2417 7 7 import project 8 8 from pyvolution.util import file_function 9 #from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 10 # from coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn9 from create_buildings import porosity, WidtH 10 # from run_friction import fric 11 11 from pylab import * 12 #from compare_sww import gauge_locations13 12 14 13 fric = 1 15 14 #swwfile = project.newoutputname + '.sww' 16 15 #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'20 16 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' 19 swwfile_B = project.outputdir + sep + 'friction_n=10_3135.sww' 20 swwfile_F = project.outputdir + sep + 'friction_n=20_3135.sww' 21 22 gauge_depth = Numeric.arrayrange(0, 2.5*WidtH, 5) 22 23 gauge_breadth = 100 23 24 gauge_locations = [] … … 55 56 velocity = [] 56 57 for i, GL in enumerate(gauge_depth): 58 59 # mines data from specified time values in sww file 57 60 wB = f_B(t, point_id = i)[0] 58 61 zB = f_B(t, point_id = i)[1] … … 82 85 83 86 ion() 84 hold(False) 87 hold(True) 88 subplot(211) 89 85 90 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)) 87 92 xlabel('gauge length(m)') 88 93 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) 97 subplot(212) 98 subplots_adjust(hspace = 0.4) 99 plot(gauge_depth, diff, 'g') 100 title('Final Differences in water levels') 101 xlabel('gauge length(m)') 102 ylabel('water differences (m)') 103 savefig('Final_Water_diff_n=%s' %fric) 93 104 print "finished" 94 105
Note: See TracChangeset
for help on using the changeset viewer.