function [t,dat,wla,wlc,itemp,xtemp]=rd_wetview_acs024(fnam)
%
%  Program to read WetView ac-a data files
%
%  INPUTS
%    FNAM = file name to read in.
%
%  OUTPUTS
%    
%  	t-time for acs data in days
%    dat = ACs data
%    T=temp. P=pressure
%
%
%  Written by Emmanuel Boss, UMAINE, 2018 for EXPORTS01.

fid=fopen(fnam,'r')

%skip first 98 lines
for i=1:98   
   line=fgetl(fid);
end
i=1;
%84 wavelengths of 024 in summer 2018
wla=[399.8	404.6	408.7	413	418	423.1	427.6	431.8	436.1	440	445.3	450	454.6	459.2	464	468.7	473.4	478	482.9	487.6	492.3	496.8	501.2	506.1	510.9	515.9	520.6	525.8	530.4	534.2	538.7	543.3	547.6	552.4	556.9	560.3	564.5	569.1	573.7	577.8	581.9	585.9	590.5	595.4	600.1	604.6	609.5	614.2	618.7	623.5	628.2	633	637.5	642.3	646.9	651.7	656.3	661.1	665.7	670.3	675.2	679.4	683.5	687.9	691.9	695.8	699.7	703.8	707.9	711.5	714.8	718.2	721.9	725.6	729.2	732.3	735.8	738.6	741.9	744.6	748.1	750.6	752.8	755.4];
wlc=[399.1	403.9	408.5	412.6	417.3	422.1	426.9	431.6	436.3	440.3	445.1	450	454.5	459	463.8	468.5	473.6	478.3	483.2	487.6	492.3	496.8	501.4	506.6	511.4	516.3	521	526.3	530.8	534.6	539.6	543.7	548.3	553.1	557.4	561.6	565.9	570.5	574.7	579.2	583.4	587.4	591.8	596.7	601.1	606	611	616	620.7	625.4	629.7	634.5	638.8	643.6	648.6	653.5	658.2	662.8	667.5	672.4	676.8	681.4	685.5	689.2	693.9	697.6	701.3	705.5	709.5	713.1	716.6	720	723.3	727.2	730.5	733.5	736.7	740.2	743.5	745.9	749.4	751.9	753.6	756.6];
junk=fscanf(fid,'%e',[1]);
N=2*84;
while(feof(fid)==0)
   t(i)=junk;
   junk=fscanf(fid,'%e',[N]);
   if size(junk)<N
       break
   end
   dat(i,:)=junk(1:N)';
   junk=fscanf(fid,'%e',[5]);
   itemp(i)=junk(1);
   xtemp(i)=junk(4);
   i=i+1;
   junk=fscanf(fid,'%e',[1]);
end
fclose(fid);
