disp('prt_epi_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:cwf\data\epic2001\proc_hp\proc_flux5_' jd  '.txt'];
   flist=fopen(f,'w');
else
   flist=1;
end; 

%take stats data and stick into matrix
npz=np;
jazz(1,1:npz)=jad5;
jazz(2,1:npz)=s2;
jazz(3,1:npz)=dir2;
jazz(4,1:npz)=ts_snk;
jazz(5,1:npz)=ts_tsg;
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)=org1;
jazz(13,1:npz)=shp_spd;
jazz(14,1:npz)=shp_hed;
jazz(15,1:npz)=relsp;
jazz(16,1:npz)=reldir;
jazz(17,1:npz)=lat;
jazz(18,1:npz)=lon;
jazz(19,1:npz)=zt;
jazz(20,1:npz)=sig_sp;
jazz(21,1:npz)=taub;
jazz(22,1:npz)=hsb;
jazz(23,1:npz)=hlb;
jazz(24,1:npz)=rf;
jazz(25,1:npz)=org2;
jazz(26,1:npz)=org3;
jazz(27,1:npz)=org4;
jazz(28,1:npz)=org1_car;
jazz(29,1:npz)=org2_car;
jazz(30,1:npz)=aspir;
%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      25    26   27     28    29
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 %9.2f %9.2f %9.2f %8.2f %8.2f %8.2f \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   org2  org3  org4 org1cr org2cr aps
fclose('all');
	
