%steady state criteria
jj=find((reldir(ia)>270 | reldir(ia)<90) & sig_h(ia)<5 & sig_u(ia)<1.4 &sp2(ia)<1.2 & org(ia)<5 & sqrt(ww(ia))./ugw(ia)<2+.0015*U(ia).^2 & sqrt(vv(ia))./ugu(ia)<2);

%%%%%%%%%%%%%%%%%%   7200 PSD
ii7200CO2PSD=find((meanCO2_7200PSD((jj))>390 & meanCO2_7200PSD((jj))<400) & stdCO2d_7200PSD((jj))<.28 & abs(slopeCO2d_7200PSD(jj,1))<1e-4);

% uCO2d_7200PSD=CO2view(:,118); 
% vCO2d_7200PSD=CO2view(:,119); 

figure;plot(slopeCO2d_7200PSD(:,1),uCO2d_7200PSD,'.',slopeCO2d_7200PSD(:,1),vCO2d_7200PSD,'r.');grid
legend('u''c''','v''c''');axis([-1e-3 1e-3 -1 1])%axis([-.5e-3 .5e-3 -.5 .5])
xlabel('dC/dt (ppb/10min slope)');ylabel('horizontal flux (ppb m/s)')


figure;plot(slopeCO2d_7200PSD(jj(ii7200CO2PSD),1),uCO2d_7200PSD(jj(ii7200CO2PSD)),'.',slopeCO2d_7200PSD(jj(ii7200CO2PSD),1),vCO2d_7200PSD(jj(ii7200CO2PSD)),'r.');grid
legend('u''c''','v''c''');%axis([-.5 .5 -.5 .5])
xlabel('dC/dt (ppb/10min slope)');ylabel('horizontal flux (ppb m/s)')
xcut=.5e-4;ycut=.05;
hold on;plot([-xcut xcut],[-ycut -ycut],'k',[-xcut xcut],[ycut ycut],'k')
hold on;plot([-xcut -xcut],[-ycut ycut],'k',[xcut xcut],[-ycut ycut],'k')

figure;plot(uCO2d_7200PSD(jj(ii7200CO2PSD)),wCO2_7200PSDbuz(jj(ii7200CO2PSD)),'.');grid
ylabel('w''c''');xlabel('u''c'' (ppb m/s)')
figure;plot(vCO2d_7200PSD(jj(ii7200CO2PSD)),wCO2_7200PSDbuz(jj(ii7200CO2PSD)),'.');grid
ylabel('w''c''');xlabel('v''c'' (ppb m/s)')

%%%%<<<<<<<<<<<>>>>>>>>>>>
ii7200CO2PSD=find((meanCO2_7200PSD((jj))>390 & meanCO2_7200PSD((jj))<400) & stdCO2d_7200PSD((jj))<.28 & abs(slopeCO2d_7200PSD(jj,1))<1e-4 & abs(uCO2d_7200PSD(jj)) < 0.05 & abs(vCO2d_7200PSD(jj)) < 0.05);
%%%%<<<<<<<<<<<>>>>>>>>>>>

%%%%%%%%%%%%%%%%%%   7500 PSD
ii7500CO2PSD=find((meanCO2_7500PSD((jj))>390 & meanCO2_7500PSD((jj))<400) & stdCO2_7500PSD((jj))<1 & abs(slopeCO2_7500PSD(((jj)),1))<.2 & (abs(wCO2_7500PSD((jj)))<0.5));
% figure;plot(slopeCO2_7500PSD(:,1),uCO2_7500PSD,'.',slopeCO2_7500PSD(:,1),vCO2_7500PSD,'r.');grid
% legend('u''c''','v''c''');axis([-.5e-3 .5e-3 -.5 .5])
% xlabel('dC/dt (ppb/10min slope)');ylabel('horizontal flux (ppb m/s)')


figure;plot(slopeCO2_7500PSD(jj(ii7500CO2PSD),1),uCO2_7500PSD(jj(ii7500CO2PSD)),'.',slopeCO2_7500PSD(jj(ii7500CO2PSD),1),vCO2_7500PSD(jj(ii7500CO2PSD)),'r.');grid
legend('u''c''','v''c''');%axis([-.5 .5 -.5 .5])
xlabel('dC/dt (ppb/10min slope)');ylabel('horizontal flux (ppb m/s)')
xcut=.1;ycut=.05;
hold on;plot([-xcut xcut],[-ycut -ycut],'k',[-xcut xcut],[ycut ycut],'k')
hold on;plot([-xcut -xcut],[-ycut ycut],'k',[xcut xcut],[-ycut ycut],'k')

%%%%<<<<<<<<<<<>>>>>>>>>>>
ii7500CO2PSD=find((meanCO2_7500PSD((jj))>390 & meanCO2_7500PSD((jj))<400) & stdCO2_7500PSD((jj))<1 & abs(slopeCO2_7500PSD(((jj)),1))<.1 & (abs(wCO2_7500PSD((jj)))<0.5) & abs(slopeCO2_7500PSD(((jj)),1))<.1 & abs(uCO2_7500PSD(jj)) < 0.05 & abs(vCO2_7500PSD(jj)) < 0.05);
%%%%<<<<<<<<<<<>>>>>>>>>>>

