Velocity at Venus Stations: Oct 18, 2002
%matplotlib inline
from matplotlib import pylab
import matplotlib.pyplot as plt
import netCDF4 as NC
import numpy as np
fT = NC.Dataset('../../Results/Oct18OneDay/SalishSea_1h_20021018_20021018_grid_T.nc','r')
depth = fT.variables['deptht'][:]
fU = NC.Dataset('../../Results/Oct18OneDay/SalishSea_1h_20021018_20021018_grid_U.nc','r')
uvel = fU.variables['vozocrtx'][:]
mu = uvel == 0
uvel_masked = np.ma.array(uvel,mask=mu)
print uvel.shape
(24, 40, 898, 398)
fV = NC.Dataset('../../Results/Oct18OneDay/SalishSea_1h_20021018_20021018_grid_V.nc','r')
vvel = fV.variables['vomecrty'][:]
mv = vvel == 0
vvel_masked = np.ma.array(vvel,mask=mv)
spn = np.sqrt(uvel[:,:,424,267]*uvel[:,:,424,267]+
vvel[:,:,424,267]*vvel[:,:,424,267])
print depth[25],depth[27],depth[29],depth[31],depth[33]
plt.plot(spn[:,25],'k',spn[:,27],'m',spn[:,29],'g',spn[:,31],'r',spn[:,33],'b')
plt.title("Central Node : Currents at 76.5856 121.867 173.114 226.26 279.935 m")
76.5856 121.867 173.114 226.26 279.935
<matplotlib.text.Text at 0x105215f90>
spn = np.sqrt(uvel[:,:,416,272]*uvel[:,:,416,272]+
vvel[:,:,416,272]*vvel[:,:,416,272])
print depth[25],depth[27],depth[29],depth[31],depth[33]
plt.plot(spn[:,25],'k',spn[:,27],'m',spn[:,29],'g',spn[:,31],'r',spn[:,33],
'b')
plt.title("East Node : Currents at 76.5856 121.867 173.114 226.26 m")
76.5856 121.867 173.114 226.26 279.935
<matplotlib.text.Text at 0x1051a5a90>