Changeset 2326 for production/sydney_2006
- Timestamp:
- Feb 2, 2006, 5:01:56 PM (19 years ago)
- Location:
- production/sydney_2006
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
production/sydney_2006/export_results.py
r2317 r2326 27 27 #quantityname = '((xmomentum/(stage-elevation))**2 + (ymomentum/(stage-elevation))**2)**0.5' #Speed 28 28 #quantityname = 'xmomentum/(stage-elevation)' #Speed 29 quantityname = '(xmomentum**2 + ymomentum**2 + 1.e-30)**0.5/(stage-elevation)' #Speed29 quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-30)' #Speed 30 30 31 31 -
production/sydney_2006/get_timeseries.py
r2313 r2326 5 5 import project 6 6 from pyvolution.util import file_function 7 from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 7 #from pyvolution.coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 8 from coordinate_transforms.redfearn import degminsec2decimal_degrees, redfearn 8 9 from pylab import * 9 10 … … 61 62 elevations = [] 62 63 momenta = [] 64 velocity = [] 63 65 64 66 max_depth = 0 65 max_momentum = 0 67 max_momentum = 0 68 max_velocity = 0 66 69 for i, t in enumerate(f.T): # T is a list of times 67 70 #if tmin < t < tmax: … … 73 76 74 77 m = sqrt(uh*uh + vh*vh) #Absolute momentum 78 vel = sqrt(uh*uh + vh*vh) / (w-z + 1.e-30) #Absolute velocity 79 print vel 80 #dep = w-z 81 #vel = sqrt(uh*uh + vh*vh) / dep #Absolute velocity 75 82 76 83 model_time.append(t) 77 84 stages.append(w) 78 85 elevations.append(z) #Should be constant over time 79 momenta.append(m) 86 momenta.append(m) 87 velocity.append(vel) 80 88 81 89 if w-z > max_depth: 82 90 max_depth = w-z 83 91 if m > max_momentum: 84 max_momentum = m 92 max_momentum = m 93 if vel > max_velocity: 94 max_velocity = vel 95 print 'max speed', max_velocity 85 96 86 97 … … 127 138 128 139 raw_input('Next') 140 141 #Speed plot 142 ion() 143 hold(False) 144 plot(model_time, velocity, '-r') 145 title(name) 146 147 title('%s (velocity)' %name) 148 xlabel('time [s]') 149 ylabel('sqrt( uh^2 + vh^2 ) / depth [m/s]') 150 savefig('Gauge_%d_speed' %k) 151 #savefig('Gauge_%s_speed' %myloc) 152 153 raw_input('Next') 129 154 130 155
Note: See TracChangeset
for help on using the changeset viewer.