% file to read in xls spreadsheets (bad data removed)
% file is ALLpartSENSORdata_10may2007(KG)_good.xls
% spreadsheets are MLMLReadIn, SkiOReadIn, HawaiiReadIn, CBLReadIn,
% MaineReadIn, USFReadIn, Michigan2ReadIn, and MichiganReadIn

% saves actXLSData_good containing:
  % cbl (50x15)
  % hawaii (71x15)
  % maine (63x15)
  % michigan (59x13)
  % michigan2 (52x12)
  % mlml (80x15)
  % skio (49x15)
  % usf (39x15)
  
% arrays each contain:
  % count
  % year day (GMT)
  % TSS (mg/l)
  % SDn-1 (standard deviation of TSS)
  % POC (mg/l)
  % SDn-1 (standard deviation of POC)
  % BAC (beam attenuation coefficient, 1/m)
  % BAC4h (BAC the first 4h after daily cleaning of the lens (not done Saturday and Sunday)
  % Fluor (seapoint fluorometer, RFU)
  % Fluor4h (Fluor the first 4h after daily cleaning of the lense (not done Saturday and Sunday)
  % McVan (NTU)
  % Aquatec (FTU)
  % WetLabs (NTU)
  % InSitu (FNU)
  % YSI (NTU)
  
close all
clear all

% read in data
mlml=xlsread('data/ALLpartSENSORdata_10may2007(KG)_good','MLMLReadIn', 'A6:O85');
skio=xlsread('data/ALLpartSENSORdata_10may2007(KG)_good','SkiOReadIn', 'A6:O54');
hawaii=xlsread('data/ALLpartSENSORdata_10may2007(KG)_good','HawaiiReadIn', 'A6:O76');
cbl=xlsread('data/ALLpartSENSORdata_10may2007(KG)_good','CBLReadIn', 'A6:O55');
maine=xlsread('data/ALLpartSENSORdata_10may2007(KG)_good','MaineReadIn', 'A6:O68');
usf=xlsread('data/ALLpartSENSORdata_10may2007(KG)_good','USFReadIn', 'A6:O44');
michigan2=xlsread('data/ALLpartSENSORdata_10may2007(KG)_good','Michigan2ReadIn', 'A6:O57');
michigan=xlsread('data/ALLpartSENSORdata_10may2007(KG)_good','MichiganReadIn', 'A6:O64');

% add column of NaNs to michigan2 (last column in excel is all NaNs and MatLab
% won't make the column)
uu=size(michigan2);

uu=uu(1,2);
michigan2(:,(uu+1)) = [NaN];
clear uu;

% assign variables
cbl_count=cbl(:,1);
cbl_date=cbl(:,2);
cbl_tss=cbl(:,3);
cbl_tss_sd=cbl(:,4);
cbl_poc=cbl(:,5);
cbl_poc_sd=cbl(:,6);
cbl_bac=cbl(:,7);
cbl_bac4h=cbl(:,8);
cbl_fluor=cbl(:,9);
cbl_fluor4h=cbl(:,10);
cbl_mcvan=cbl(:,11);
cbl_aqua=cbl(:,12);
cbl_wetlabs=cbl(:,13);
cbl_insitu=cbl(:,14);
cbl_ysi=cbl(:,15);

hawaii_count=hawaii(:,1);
hawaii_date=hawaii(:,2);
hawaii_tss=hawaii(:,3);
hawaii_tss_sd=hawaii(:,4);
hawaii_poc=hawaii(:,5);
hawaii_poc_sd=hawaii(:,6);
hawaii_bac=hawaii(:,7);
hawaii_bac4h=hawaii(:,8);
hawaii_fluor=hawaii(:,9);
hawaii_fluor4h=hawaii(:,10);
hawaii_mcvan=hawaii(:,11);
hawaii_aqua=hawaii(:,12);
hawaii_wetlabs=hawaii(:,13);
hawaii_insitu=hawaii(:,14);
hawaii_ysi=hawaii(:,15);

maine_count=maine(:,1);
maine_date=maine(:,2);
maine_tss=maine(:,3);
maine_tss_sd=maine(:,4);
maine_poc=maine(:,5);
maine_poc_sd=maine(:,6);
maine_bac=maine(:,7);
maine_bac4h=maine(:,8);
maine_fluor=maine(:,9);
maine_fluor4h=maine(:,10);
maine_mcvan=maine(:,11);
maine_aqua=maine(:,12);
maine_wetlabs=maine(:,13);
maine_insitu=maine(:,14);
maine_ysi=maine(:,15);

mlml_count=mlml(:,1);
mlml_date=mlml(:,2);
mlml_tss=mlml(:,3);
mlml_tss_sd=mlml(:,4);
mlml_poc=mlml(:,5);
mlml_poc_sd=mlml(:,6);
mlml_bac=mlml(:,7);
mlml_bac4h=mlml(:,8);
mlml_fluor=mlml(:,9);
mlml_fluor4h=mlml(:,10);
mlml_mcvan=mlml(:,11);
mlml_aqua=mlml(:,12);
mlml_wetlabs=mlml(:,13);
mlml_insitu=mlml(:,14);
mlml_ysi=mlml(:,15);

skio_count=skio(:,1);
skio_date=skio(:,2);
skio_tss=skio(:,3);
skio_tss_sd=skio(:,4);
skio_poc=skio(:,5);
skio_poc_sd=skio(:,6);
skio_bac=skio(:,7);
skio_bac4h=skio(:,8);
skio_fluor=skio(:,9);
skio_fluor4h=skio(:,10);
skio_mcvan=skio(:,11);
skio_aqua=skio(:,12);
skio_wetlabs=skio(:,13);
skio_insitu=skio(:,14);
skio_ysi=skio(:,15);

usf_count=usf(:,1);
usf_date=usf(:,2);
usf_tss=usf(:,3);
usf_tss_sd=usf(:,4);
usf_poc=usf(:,5);
usf_poc_sd=usf(:,6);
usf_bac=usf(:,7);
usf_bac4h=usf(:,8);
usf_fluor=usf(:,9);
usf_fluor4h=usf(:,10);
usf_mcvan=usf(:,11);
usf_aqua=usf(:,12);
usf_wetlabs=usf(:,13);
usf_insitu=usf(:,14);
usf_ysi=usf(:,15);

michigan_count=michigan(:,1);
michigan_date=michigan(:,2);
michigan_tss=michigan(:,3);
michigan_tss_sd=michigan(:,4);
michigan_poc=michigan(:,5);
michigan_poc_sd=michigan(:,6);
michigan_bac=michigan(:,7);
michigan_bac4h=michigan(:,8);
michigan_fluor=michigan(:,9);
michigan_fluor4h=michigan(:,10);
michigan_mcvan=michigan(:,11);
michigan_aqua=michigan(:,12);
michigan_wetlabs=michigan(:,13);
michigan_insitu=michigan(:,14);
michigan_ysi=michigan(:,15);

michigan2_count=michigan2(:,1);
michigan2_date=michigan2(:,2);
michigan2_tss=michigan2(:,3);
michigan2_tss_sd=michigan2(:,4);
michigan2_poc=michigan2(:,5);
michigan2_poc_sd=michigan2(:,6);
michigan2_bac=michigan2(:,7);
michigan2_bac4h=michigan2(:,8);
michigan2_fluor=michigan2(:,9);
michigan2_fluor4h=michigan2(:,10);
michigan2_mcvan=michigan2(:,11);
michigan2_aqua=michigan2(:,12);
michigan2_wetlabs=michigan2(:,13);
michigan2_insitu=michigan2(:,14);
michigan2_ysi=michigan2(:,15);

save actXLSData_good -v6

