function [t,dat,wla,wlc,itemp,xtemp]=rd_wetview_acs111(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, 2021 for EXPORTS02.

fid=fopen(fnam,'r')

%skip first 96 lines
for i=1:96   
   line=fgetl(fid);
end
i=1;
%82 wavelengths of 111 in spring 2021
wlc=[400.7	405	409.3	413.5	417.8	422.4	427.4	432	436.6	441	446	450.9	455.9	460.4	465.4	469.9	475.2	480.4	485.3	490	494.8	499.6	504.3	509.4	514.6	519.9	524.9	529.8	534.6	539.2	544	549.3	554.3	558.7	563.9	568.3	572.9	576.9	581	585.6	590.8	595.5	600.3	604.8	609.7	614.5	619.5	624	628.5	633.4	637.8	642.3	646.9	651.9	656.5	661.3	666.2	670.9	675.2	679.3	683.3	687.7	691.8	695.7	699.1	702.9	706.7	710.3	713.9	717.4	720.9	724.6	727.6	730.7	733.8	736.7	739.7	742.1	745.1	747.9	750.3	752.7];
wla=[400.7	405.3	409.6	413.7	417.6	422.6	427.4	432.2	436.8	441	445.6	450.6	456.2	460.6	465.2	469.4	474.5	479.7	484.6	489.4	493.9	498.8	503.6	508.3	513.5	519.1	524.1	528.7	533.4	538.2	543	548.1	553.1	557.5	562.3	567.1	571.5	576.1	579.8	583.7	588.6	593.4	597.7	602.4	607.1	611.8	616.9	621.5	626	630.4	635	639.5	644.1	648.9	653.7	658	662.8	667.2	671.4	676.2	680.4	684.5	688.5	692.3	696.3	699.9	703.8	707.5	711.2	714.5	718	721.3	724.6	728	731	734	736.7	739.6	742.6	745.1	748	750.2];
junk=fscanf(fid,'%e',[1]);
N=2*82;
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);
