%                   gridvel.m
%                          for getting timeseries of velocity
%                          from harmonic version of grid data
g=find(umean(:)~=nan);
ucoef=[umean(g) um2(g) um2s(g) um4(g) um4s(g) um6(g) um6s(g)];
vcoef=[vmean(g) vm2(g) vm2s(g) vm4(g) vm4s(g) vm6(g) vm6s(g)];
tnew=6;
[udum,vdum]=tidesam(ucoef,vcoef,tnew);
unew=ones(umean)*nan;
vnew=unew;
unew(g)=udum;
vnew(g)=vdum;

