u0=5;
z=5;
j=0;
Lz=10;
Lx=300;
xx=0:.05:1;
y=-3:.1:3;
z=exp(y);
[a,b]=size(z);
dz=z*.1;

[u,us,dw,zo]=derx(u0,z,xx,Lx,Lz);
for i=1:21
w(1:b,i)=0;
c=0;
for j=1:b
   w(j,i)=c+dw(j,i)*dz(j);
   c=w(j,i);
end;
%semilogy(u,z);
end;

figure;plot(xx,zo);xlabel('Normalized Distance');ylabel('Roughness (m)');
figure;plot(xx,u(50,:),'x',xx,u(56,:),xx,u(59,:),'.',xx,us+4);xlabel('Normalized Distance');ylabel('Wind Speed (m/s)');
figure;plot(xx,w(50,:),'x',xx,w(56,:),xx,w(59,:),'.');xlabel('Normalized Distance');ylabel('Vertical Vel. (m/s)');



   
   