function compute_mean_wshf(t1,t2)
% compute_mean_wshf5m(t1,t2) computes the 
% mean wind stress and heat flux 
% for the window [t0,t1] on LMG03-02.
% 3/4/03

% get data
load lmg_met5m

% find section to average
k=find(t>=t1 & t<=t2);
t=t(k);stress=stress(k);qnet=qnet(k);qsw=qsw(k);
qlw=qlw(k);qsen=qsen(k);qlat=qlat(k);
tx=tx(k);ty=ty(k);

txm=mean(tx);tym=mean(ty);
stressm=sqrt(txm.^2 + tym.^2);
wdm=180*atan2(tym,txm)./pi;
Q=[qnet qsw qlw qsen qlat];
Qm=mean(Q);
diary wshfmean.txt
t1
t2
[txm tym]
stats(tx)
stats(ty)
[stressm wdm]
stats(Q(:,1))
stats(Q(:,2))
stats(Q(:,3))
stats(Q(:,4))
stats(Q(:,5))


Qm
diary off
