function plot_lmg_met5m(t1,t2)
% plot_lmg_met5m(t1,t2) plots the basic
% 5-min met data in lmg_met5m for the
% time between t1 and t2 (in yds). t2 is 
% optional, default value is t1+1.
% made for lmg03-02.
% 3/4/03.

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

% get data
load lmg_met5m

% find section to plot
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);

% 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;
subplot(6,1,1)
h=plot(t,ws,'b');set(h,'linew',LW);
hold on
ylabel('WS','fontw','bold')
grid
% plot markers
tip0=56.4;
tip1=59.4;
xm=[tip0;tip0;nan;tip1;tip1;nan];
ym=[0;30;nan;0;30;nan];
h=plot(xm,ym,'r');set(h,'linew',2);
axis([t0 t1 0 30]);
title('LMG03-02 5-min Meteorological Data for Leg 2','fontw','bold')

subplot(6,1,2)
h=plot(t,wd,'b');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');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');set(h,'linew',LW);
ylabel('RH','fontw','bold')
grid
axis([t0 t1 40 110])

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

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

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