kp=0.4;
ul=0:.1:3.5;
u=exp(ul);
[n m]=size(u);
xo=[ 0 11 10 6 4 141 419 0 600 1010 10 10 10];
x=[ 0 28.7 27.7 24.2 18.5 141 419 0 600 1010 10 10 10];
p=zeros(m,14);
pc=zeros(1,14);
p(:,1)=u';
uhx=[6 8 10 12 14 16 18];
zqx=[5E-3 1.2E-3 2.4E-4 7E-4 2.5e-4 2.0e-4 7e-4];
ucr=[.7 1.54 2.55 3.51 4.45 5.48 6.63 7.44 8.35 9.59 10.65];
zqc=[1.9e-4 1.3e-4 1.6e-4 1.0e-4 8.9e-5 8.2e-5 3.7e-5 3.4e-5 2.2e-5 2.9e-5 2.8e-5];

zqx=1.16*zqx.^.93/100;
for i=1:m
   p(i,2:14)=xo;
   y=coul_lkb(p(i,:));
   us(i)=y(8);
   zo(i)=y(4);
   zq(i)=y(6);
   
end;
rr=zo.*us/1.5e-5;
zqm=5.0e-5./rr.^.6;

cdnh=kp./log(10./zo);
zoq=zq;
cqnh=kp./log(10./zoq);
ce=cdnh.*cqnh;

cdnhx=sqrt(1e-3*(.27+.116*uhx));
zox=10./exp(kp./cdnhx);
usx=uhx.*cdnhx;
rrx=zox.*usx/1.5e-5;
cehnx=kp./log(10./zqx)*1.00;
cex=cdnhx.*cehnx;
zoqx=10./exp(kp./cehnx);

for i=1:11
   pc(1)=ucr(i);
   pc(2:14)=x;
   yy=lkb(pc);
   usc(i)=yy(8);
   zoc(i)=yy(4);
end;

cdncr=sqrt(1e-3*(.85+1.1/25*ucr));
%zoc=10./exp(kp./cdncr);
%usc=ucr.*cdncr;
rrc=zoc.*usc/1.5e-5;
cehnc=kp./log(10./zqc)*1.00;
cec=cdncr.*cehnc;
zoqc=10./exp(kp./cehnc);


figure;plot(u,ce,uhx,cex,'o',ucr,cec,'X');set(gca,'fontsize',12);
xlabel('\fontsize{12} U_{10} (m/s)');ylabel('\fontsize{12} C_{en}');Title('Bulk Transfer Coeff, No Webb')
axis([0 20 0.0009 0.0015]);

figure;loglog(rr,zq,rrx,zoqx,'o',rrc,zoqc,'X',rr,zqm);set(gca,'fontsize',12);
xlabel('\fontsize{12} Rr');ylabel('\fontsize{12} z_{oq}');Title('Moisture Roughness Length, No Webb')
axis([0.1 1000 1e-7 1e-3]);
