clear all
FLEDT;
h = A(:,7);
T = A(:,3);
U = A(:,4);
P = A(:,8);

% sonde launch at point 

pmax = 2836;
pstart = 1;

for ii = 1:(pmax-40)
    if h(ii) < 0
        h(ii) = NaN;
    end
    if T(ii) < 0
        T(ii) = NaN;
    end
    if U(ii) < 0
        U(ii) = NaN;
    end       
    if P(ii) < 0
        P(ii) = NaN;
    end       
end
h = h(pstart:pmax-40);
T = T(pstart:pmax-40);
U = U(pstart:pmax-40);
P = P(pstart:pmax-40);

% skewt(P,T-273.15,U/100)

plot(T,h,'r',U,h,'b')
v = [0 300 0 30000];
axis(v)
grid on
ylabel('height (m)','FontSize',14,'FontWeight','bold')
ax = gca;
ax.YAxis.FontSize = 14;
ax.XAxis.FontSize = 14;

legend ({'T (K)','RH (%)'},'FontSize', 14,'FontWeight','bold')
title('sounding 16-03-26 0624Z','FontSize',14,'FontWeight','bold')
