disp('prt_jas_flux');
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

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=['D:\hp_ascii\proc_flux' jd  '.txt'];
	flist=fopen(f,'a');
else
   flist=1;
end; 
%take stats data and stick into matrix
npz=np;
jazz(1,1:npz)=jad5;%decimal JD
jazz(2,1:npz)=s2;%s
jazz(3,1:npz)=dir2;%s
jazz(4,1:npz)=ts_snk;%s
jazz(5,1:npz)=ts_tsg;%n
jazz(6,1:npz)=sal_tsg;%
jazz(7,1:npz)=ta;%
jazz(8,1:npz)=qs;%
jazz(9,1:npz)=qa;%
jazz(10,1:npz)=psp;%
jazz(11,1:npz)=pir;%
jazz(12,1:npz)=org;
jazz(13,1:npz)=shp_spd;%
jazz(14,1:npz)=shp_hed;%
jazz(15,1:npz)=relsp;%
jazz(16,1:npz)=reldir;%s
jazz(17,1:npz)=lat;
jazz(18,1:npz)=lon;%
jazz(19,1:npz)=zt;%
jazz(20,1:npz)=sig_sp;%s
jazz(21,1:npz)=taub;%
jazz(22,1:npz)=hsb;%
jazz(23,1:npz)=hlb;%s
jazz(24,1:npz)=rf;%
%vectorized print, 24 columns, up to 288 rows
%                 1     2     3     4     5     6    7     8     9      10     11   12    13    14    15    16    17     18    19    20    21   22    23    24   
fprintf(flist,'%11.5f %8.2f %8.1f %8.2f %8.2f %9.3f %8.2f %8.2f %8.2f %9.1f %9.1f %8.1f %9.2f %9.1f %9.2f %9.1f %12.4f %12.4f %8.2f %8.2f %8.3f %8.1f %8.1f %8.1f \r\n',jazz);
%                jd     s2   dir2  tsnk  tsg  salsg  ta     qs    qa    psp    pir  org  shpsp  hed  relu  rldir  lat   lon    zts   sigs   tau   hs   hl     rf 
fclose('all');
	
