% routine to plot Endeavor alongtrack data AFTER Payne's processing
% (Assumes user got MATLAB file off GLOBEC homepage)

% load ship data
load /data5/jmanning/ship/en302/emet_W1_1997
disp('Converting ships speed & dir to u &v ...');
[u,v]=sd2uv(wind_speed_c,wind_dir_c);

% change to oceanographic convention
u=-u;
v=-v;

% plot wind with buoy wind
load /data5/jmanning/wind/mat/b1197
id=find(t>=161&t<=172);
t=t(id);
y=y(id,:);


% interp ship wind on to buoy wind
% (Note: Endeavor time is reported in yrday1_gmt so I subtract 1.0 days)
disp(' ')
disp('Interpolating ships wind on to buoy wind time ...');
su=interp1(yrday_utc'-1,u,t);
sv=interp1(yrday_utc'-1,v,t);

yyu=[y(:,1) su];
yyv=[y(:,2) sv];

stickplot(t,yyu,yyv,[161 172],'m/s',['Buoy 11 ';'Endeavor']);

