function fploop(t,y);
%
% function fploop(t,y);
%
% simply does an "fprintf" in order to make an ascii file
%
% usually called from the "drivem.m" routine to store merged data in single
% file
%
%    t = yearday
%    y = some matrix of numbers
%
[ry,cy]=size(y);
fid=input('Enter output filename: ','s');
%
 disp(['please wait while saving ',fid]);
%
for i=1:ry;
   fprintf(fid,'%9.4f',t(i));
 if cy==1;
   fprintf(fid,'%7.2f\n',y(i));
 elseif cy==2;
   fprintf(fid,'%7.2f %7.2f\n',y(i,1),y(i,2));
 else
   for ir=1:2:cy-1;
    if ir~=cy-1;
     fprintf(fid,'%7.2f %7.2f',y(i,ir),y(i,ir+1));
    else
     fprintf(fid,'%7.2f %7.2f\n',y(i,ir),y(i,ir+1));
    end;
   end;
  end;
end;
