disp('prt_rhb_flux_30_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

f=[way_proc_data 'flux_30hf' jd  '.txt'];
flist=fopen(f,'w');
%flist=1;
npz=np;
jazz(1,1:npz)=jad5;
jazz(2,1:npz)=s1;
jazz(3,1:npz)=dir1;
jazz(4,1:npz)=ts;
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)=org;
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)=ta_im;%
jazz(26,1:npz)=qa_im;
jazz(27,1:npz)=s_shp;
jazz(28,1:npz)=dir_shp;
jazz(29,1:npz)=psp_im;   %IMET solar flux, w/m^2
jazz(30,1:npz)=pir_im;

%vectorized print, 28 columns, up to 48 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
fprintf(flist,'%11.5f\t %8.2f\t %8.1f\t %8.2f\t %8.2f\t %9.3f\t %8.2f\t %8.2f\t %8.2f\t %9.1f\t %9.1f\t %8.1f\t %9.2f\t %9.1f\t %9.2f\t %9.1f\t %12.4f\t %12.4f\t %8.2f\t %8.2f\t %8.3f\t %8.1f\t %8.1f\t %8.1f\t  %8.2f\t %8.2f\t %8.2f\t %8.1f\t %8.2f\t %8.1f\t \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');
	
