disp('fastbulk.m')

fclose('all')

load c:\hare\tsea.prn

fid=fopen('d:\temp\bulkio.prn','r')

[Abulk,count]=fscanf(fid,'%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g',[82,inf]);

Da=Abulk(1,:);
Ubar=Abulk(2,:);
Us=Abulk(3,:);
%Tsea=Abulk(4,:);
Tbar=Abulk(5,:);
Qsea=Abulk(6,:);
Qbar=Abulk(7,:);
Rs=Abulk(8,:);
Rl=Abulk(9,:);
rain=Abulk(10,:);
zi=Abulk(11,:);
P=Abulk(12,:);
zu=Abulk(13,:);
zt=Abulk(14,:);
zq=Abulk(15,:);

%bpenship;      

xbulk=[Ubar
Us
tsea
Tbar
Qsea
Qbar
Rs
Rl
rain
zi
P
zu
zt
zq];

xbulk=xbulk';

ybulk=zeros(length(xbulk),21);
for ii=1:length(xbulk),
  ybulk(ii,1:21)=coul_lkb(xbulk(ii,1:14));
end;

Da=Da';

ybulk=[Da xbulk ybulk];

figure;plot(ybulk(:,1))

%bastpro1;

save d:\temp\ybulk.prn ybulk -ascii
