disp('med_hl_plt_DYNAMO_2011');
%ysigoph=y1(:,133)';
clear hlmm hlbm nn dqm hlmmx hlbmx dum
uu=0:15;
for i=1:16
    ii = find(floor(v1)==uu(i));
    jj = find(isfinite(hll(ii)) & isfinite(yhlb(ii)) );
    if isempty(jj)
        hlmm(i) = NaN;
        hlbm(i) = NaN;
        hlmmx(i) = NaN;
        hlbmx(i) = NaN;
        nn(i) = 0;
        dqm(i) = NaN;
        dum(i) = NaN;
    else
        hlmm(i) = nanmedian1(hll(ii(jj))+hl_webar(ii(jj)));
        hlbm(i) = nanmedian1(yhlb(ii(jj)));
        nn(i) = length(jj);
        dqm(i) = nanmedian1(yqs(ii(jj))-yq(ii(jj)));
        hlmmx(i) = nanmean1(hll(ii(jj))+hl_webar(ii(jj)));
        hlbmx(i) = nanmean1(yhlb(ii(jj)));
        dum(i) = nanmean1(v1(ii(jj)));
    end;
end;

figure;plot(dum,hlbm,'-x',dum,hlmm,'-o',dum,hlbmx,'x',dum,hlmmx,'o'); axis([0 20 0 350]);
xlabel('U (m/s)');ylabel('Hl (W/m^2)');
title([jdollars,' Wind-bin Webb Hl (cov+id)/2 vs U: line = median, x = bulk, o = turb']);

figure;plot(hlbm,hlmm,'o',hlbmx,hlmmx,'x',[0 350],[0 350]);
axis([0 350 0 350]);xlabel('Bulk Hl (W/m^2)');ylabel('Turb Hl (W/m^2)');
title([jdollars,'Wind-bin Webb Hl (cov+id)/2 vs Bulk: x-mean  o-median']);



