disp('prt_epi_SCS');
fclose('all');
clear jaz;
%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_scs' jd  '.txt']
	flist=fopen(f,'w');
else
   flist=1;
end; 
%take stats data and stick into matrix
npz=np;

jaz(1,1:npz)=jad(1:npz);	%decimal JD
jaz(2,1:npz)=gpstim(1:npz);	%pcode gps time
jaz(3,1:npz)=lat(1:npz);	%decimal latitude
jaz(4,1:npz)=lon(1:npz);	%longitude
jaz(5,1:npz)=cogm(1:npz);	%pcode cog
jaz(6,1:npz)=sogm(1:npz);	%pcode sog
jaz(7,1:npz)=tsg(1:npz);	%thermosalinograph T
jaz(8,1:npz)=tss(1:npz);	%salinity, psu
jaz(9,1:npz)=imrh(1:npz);	%rel hum
jaz(10,1:npz)=imta(1:npz);	%air t
jaz(11,1:npz)=imsol(1:npz);	%solar flux
jaz(12,1:npz)=imrain(1:npz);	%rain in mm
jaz(13,1:npz)=lrgm(1:npz);	%laser gyro
if ship=='RHB'
   jaz(14,1:npz)=odec(1:npz);	%odec ship spd
elseif ship=='KAI'
   jaz(14,1:npz)=0.0;
end;
jaz(15,1:npz)=imum(1:npz);	%imet2 wind speed
jaz(16,1:npz)=imdm(1:npz);	%imet2 wind dir
 
fprintf(flist,'%11.5f %11.3f %10.4f %10.4f %9.1f %9.2f %9.2f %9.2f %9.1f %9.2f %9.1f %9.1f %9.1f %9.2f  %9.2f %9.1f \r\n',jaz);
%                jd     time  lat   lon     cog   sog    ts   ss    rh    ta     sol  rain  lrg    odec  speed   dir
fclose('all');
	
