disp('red_bob')
kon=0.4;
fclose('all');
flist=fopen('c:\matlab\toolbox\local\otis231.txt','r');
%stuff=fgetl(flist);
%******************  setup read data loop  **********
nx=6;%2822;				%# of lines of data     
for ibg = 1:nx 			%major read loop
	stuf=fscanf(flist,'%g%g%g%g%g%g%g%g',[8,1]);
	stuf1(ibg,1:8)=stuf'
	stuf=fscanf(flist,'%g%g%g%g%g%g%g%g',[8,1]);
	stuf2(ibg,1:8)=stuf';
	for ism = 1:30
		stux=fscanf(flist,'%g%g%g%g%g',[5,1]);
		u(ibg,ism)=stux(1);
		snr(ibg,ism)=stux(2);
		pw(ibg,ism)=stux(3);
		wd(ibg,ism)=stux(4);
		
	end;
	%*********************************************
		%*******   decode date  ************
	
	
end; %  data line loop
stux(1:7)';
pause;

for lx=1:300;
	lz=lx/100;
	z(lx)=10^(lz);
end;
%
x=[30 0 25.0 24.5 20.2 17.5 141 419 0 600 980 10 10 10];

plot(x(1),x(12),'wx');
axis([0 75 0 100]);
title('Surface Layer Wind Profiles');
xlabel('Wind Speed (m/s)');
ylabel('Height (m)');
hold on;
y=cool_lkb(x);
ust=y(8);
L=y(7);
zo=y(4);
for lx=1:300;
	zet=z(lx)/L;
	u(lx)=ust/kon*(log(z(lx)/zo)-psiu(zet));
end;
plot(u,z,'r');
axis([0 75 0 100]);
zo=0.0001;
x1=[x zo];
y1=cold_lkb(x1);
ya=cold_lkb(x1);
ust=y1(8);
L=y1(7);
for lx=1:300;
	zet=z(lx)/L;
	u(lx)=ust/kon*(log(z(lx)/zo)-psiu(zet));
end;
plot(u,z,'g');
zo=.10;
x2=[x zo];
y2=cold_lkb(x2);
ust=y2(8);
L=y2(7);
for lx=1:300;
	zet=z(lx)/L;
	u(lx)=ust/kon*(log(z(lx)/zo)-psiu(zet));
end;
plot(u,z,'b');

end;
