function plot_lmg_met10m(t1,t2)
% plot_lmg_met10m(t1,t2) plots the basic
% 10-min met data in lmg_met1m or cruise_met
% for the time between t1 and t2 (in yds). t2 is 
% optional, default value is t1+1. modified for 
% LMG02-1A
% 3/1/02

if nargin==1,
   t2=t1+1;
end

% get data
load cruise_met

% find section to plot
% modified to read cruise_met data
k=find(t>=t1 & t<=t2);
t=t(k);at=at(k);rh=rh(k);bp=bp(k);sw=sw(k);lw=lw(k);
ws=ws(k);wd=wd(k);sst=sst(k);

% create 10-min data
d2r=pi./180;
u=ws.*cos(d2r*wd);
v=ws.*sin(d2r*wd);
A=[t at sst rh bp sw lw u v]; 
B=boxave(A,3,10);
t=B(:,1);at=B(:,2);sst=B(:,3);rh=B(:,4);bp=B(:,5);
sw=B(:,6);lw=B(:,7);u=B(:,8);v=B(:,9);
ws=sqrt(u.^2+v.^2);
wd=atan2(v,u)./d2r;

% setup plot
clf
orient tall
t0=floor(min(t));t1=ceil(max(t));
T0=floor(min([min(at) min(sst)]));
T1=ceil(max([max(at) max(sst)]));

LW=1.5;

subplot(6,1,1)
h=plot(t,ws,'b');set(h,'linew',LW);
ylabel('WS','fontw','bold')
grid
axis([t0 t1 0 30]);
title('LMG02-1A 10-min Meteorological Data','fontw','bold')

subplot(6,1,2)
h=plot(t,wd,'b',t,0*wd,'k');set(h,'linew',LW);
ylabel('WD wrt E','fontw','bold')
grid
axis([t0 t1 -180 180]);

subplot(6,1,3)
h=plot(t,at,'b',t,sst,'r',t,0*sst,'k');set(h,'linew',LW);
ylabel('Ta, Ts(red)','fontw','bold')
grid
axis([t0 t1 T0 T1]);

subplot(6,1,4)
h=plot(t,rh,'b',t,100*ones(size(t)),'k');set(h,'linew',LW);
ylabel('RH','fontw','bold')
grid
axis([t0 t1 60 110])

subplot(6,1,5)
h=plot(t,bp,'b');set(h,'linew',LW);
ylabel('BP','fontw','bold')
grid
axis([t0 t1 950 1010]);

subplot(6,1,6)
h=plot(t,sw,'b',t,lw,'r',t,0*sw,'k');set(h,'linew',LW);
ylabel('SW, LW(red)','fontw','bold')
grid
axis([t0 t1 -200 600]);

xlabel('2002 Yearday   (February 19 = 50)','fontw','bold')
hold off