disp('prt_jas_rads_rhb_07');
fclose('all');
clear jazz;
%This program takes data computed by the read_hp_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
% modified on 30-mar-01 by D.E.Lane for Kai 2001 cruise

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,
   f=[way_proc_data 'proc_rad' jd  '.txt'];
   flist=fopen(f,'w');
else
   flist=1;
end; 
%take stats data and stick into matrix
npz=np;
jazz(1,1:npz)=jad;  %decimal JD
jazz(2,1:npz)=pir1; %s
jazz(3,1:npz)=pir2; %n
jazz(4,1:npz)=Tc1;  %
jazz(5,1:npz)=Td1;  %
jazz(6,1:npz)=Tc2;
jazz(7,1:npz)=Td2;    %
jazz(8,1:npz)=therm1;
jazz(9,1:npz)=therm2;    %
jazz(10,1:npz)=psp1;   %
jazz(11,1:npz)=psp2;  %
jazz(12,1:npz)=Tvais; %
jazz(13,1:npz)=Rhvais;    %
jazz(14,1:npz)=Tsea;    %

%vectorized print, 13 columns, up to 1440 rows
%fprintf(flist,'%11.5f %8.1f %8.1f %8.1f %9.1f %9.2f %9.2f %9.2f %9.2f %9.2f %9.2f %9.1f %9.6f \r\n',jazz);
%                jd     pir1  2    psp1   2     tc1   td1   tc2   td2   ts    ta     rh   org 
fprintf(flist,'%11.5f %8.1f %8.1f %9.2f %9.2f %9.2f %9.2f %9.1f  %9.1f %9.1f %9.1f  %9.1f  %9.1f  %9.2f   \r\n',jazz);
%                jd    pir1  pir2   tc1   td1  tc2   td2   trm1  thrm2  psp1  psp2   ta     rh   tsea
fclose('all');
	
