disp('prt_stats_lin');
fclose('all');
%This program takes data computed by the read_stats_day progam and creates an ascii
%file appropriate for reading into a spreadsheet (e.g., lotus, quatropro, etc)
%To use it, you must first run the read_stats_day program, or stick this stuff in it

prt_it=1;  %set to 0 to print to screen, 1 to print to a file (i.e., make ascii file)
if prt_it==1
	e='D:\matlabstf\cwf\sheba_data\lindsey_rad\lin_stat2.txt'
	flist=fopen(e,'w');
else
   flist=1;
end; 
%take stats data and stick into matrix
npz=np;
jaz(1,1:npz)=yyx*1e8+monx*1e6+ddx*1e4+mmx*1e2;%sheba date
jaz(2,1:npz)=jrd;%decimal JD
jaz(3,1:npz)=sign(Rldx).*min(abs(Rldx),999);%longwave pile 
jaz(4,1:npz)=sign(Rsdx).*min(abs(Rsdx),999);%solar down (as if there was any)
jaz(5,1:npz)=min(Rltx,999);%longwave total
jaz(6,1:npz)=min(sgRsx,999);%solar sigma
jaz(7,1:npz)=min(sgRlx,999);%longwave sigma
jaz(8,1:npz)=sign(Tcdx).*min(abs(Tcdx),999);%longwave pile 
jaz(9,1:npz)=sign(Tddx).*min(abs(Tddx),999);%solar down (as if there was any)
jaz(10,1:npz)=chkx;%clean index
%vectorized print, 35 columns, 24 rows
fprintf(flist,'%15.0f %9.4f %9.2f %9.2f %9.2f %9.2f %9.2f %9.2f %9.2f %9.2f \r',jaz);

fclose('all');
	
