% program to read compile_noref.txt file from Pete Strutton
% compile_noref.txt is a high resolution compilation of all sensors he has access to.
% use this file for backscattering data
% use daily_chl_5depths.txt for night time chl readings
% INPUTS:
  % date, exceldate, year_day, lon, lat, flr_2m, chl_2m, flr_10m, chl_10m, flr_15m, chl_15m,
  % b100_2m, b125_2m, b150_2m, b_back_2m, b100_10m, b125_10m, b150_10m, b_back_10m, 
  % b100_15m, b125_15m, b150_15m, b_back_15m, par_1m, unknown_1m, par_5m, flr_5m, 
  % par_10m, c_10m, par_20m, flr_20m, par_35m, c_35m, poc_bb_2m, poc_bb_10m,
  % poc_beamc_10m, poc_bb_15m, poc_beamc_35m
  %
  % Data notes:
  % flr_2m, flr_10m, flr_15m data, Wetlabs dfls
  % chl data in mg/m3
  % backscatter,vsf in 1/m.sr - scaling factor and blank offset applied
  % b_back calculated
  % par data in umol/m2.s, licor sensor
  % flr_1m, flr_5m data, chelsea fluorometer
  % c_10m, c_20m, c_35m in 1/m, CStar
%
% written by L. Taylor, UMaine, May 2006
% rewritten 06/06/06 to add strut_compile to end of variable names for
  % integrating with other files
close all
clear all
[date_pscompile,exceldate_pscompile,year_day_pscompile,lon_pscompile,lat_pscompile,flr_2m_pscompile,chl_2m_pscompile,flr_10m_pscompile,chl_10m_pscompile,flr_15m_pscompile,chl_15m_pscompile,b100_2m_pscompile,b125_2m_pscompile,b150_2m_pscompile,b_back_2m_pscompile,b100_10m_pscompile,b125_10m_pscompile,b150_10m_pscompile,b_back_10m_pscompile,b100_15m_pscompile,b125_15m_pscompile,b150_15m_pscompile,b_back_15m_pscompile,par_1m_pscompile,unknown_1m_pscompile,par_5m_pscompile,flr_5m_pscompile,par_10m_pscompile,c_10m_pscompile,par_20m_pscompile,flr_20m_pscompile,par_35m_pscompile,c_35m_pscompile,poc_bb_2m_pscompile,poc_bb_10m_pscompile,poc_beamc_10m_pscompile,poc_bb_15m_pscompile,poc_beamc_35m_pscompile] = textread( ...
    'C:\Documents and Settings\Lisa Taylor\My Documents\Data\COASOSU\data\compile_noref.txt', ...
    '%f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f', ...
    'headerlines',2, 'delimiter','\t');
% allDataCompileNoref=[date_pscompile exceldate_pscompile year_day_pscompile lon_pscompile lat_pscompile flr_2m_pscompile chl_2m_pscompile flr_10m_pscompile chl_10m_pscompile flr_15m_pscompile chl_15m_pscompile b100_2m_pscompile b125_2m_pscompile b150_2m_pscompile b_back_2m_pscompile b100_10m_pscompile b125_10m_pscompile b150_10m_pscompile b_back_10m_pscompile b100_15m_pscompile b125_15m_pscompile b150_15m_pscompile b_back_15m_pscompile par_1m_pscompile unknown_1m_pscompile par_5m_pscompile flr_5m_pscompile par_10m_pscompile c_10m_pscompile par_20m_pscompile flr_20m_pscompile par_35m_pscompile c_35m_pscompile poc_bb_2m_pscompile poc_bb_10m_pscompile poc_beamc_10m_pscompile poc_bb_15m_pscompile poc_beamc_35m_pscompile];
PsCompile=[date_pscompile exceldate_pscompile year_day_pscompile lon_pscompile lat_pscompile flr_2m_pscompile chl_2m_pscompile flr_10m_pscompile chl_10m_pscompile flr_15m_pscompile chl_15m_pscompile b100_2m_pscompile b125_2m_pscompile b150_2m_pscompile b_back_2m_pscompile b100_10m_pscompile b125_10m_pscompile b150_10m_pscompile b_back_10m_pscompile b100_15m_pscompile b125_15m_pscompile b150_15m_pscompile b_back_15m_pscompile par_1m_pscompile unknown_1m_pscompile par_5m_pscompile flr_5m_pscompile par_10m_pscompile c_10m_pscompile par_20m_pscompile flr_20m_pscompile par_35m_pscompile c_35m_pscompile poc_bb_2m_pscompile poc_bb_10m_pscompile poc_beamc_10m_pscompile poc_bb_15m_pscompile poc_beamc_35m_pscompile];
% save compile-noref -v6
save ps-compile -v6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% figure % various parameters vs time
% subplot(3,3,1)
% plot(date,b100_2m,'.')
% axis([min(date),max(date),0,0.003])
% datetick('x','mmmyy')
% xlabel('Date')
% ylabel('b 100 2m')
% title({'COASOSU'})
% subplot(3,3,2)
% plot(date,b125_2m,'.')
% axis([min(date),max(date),0,0.003])
% datetick('x','mmmyy')
% xlabel('Date')
% ylabel('b 125 2m')
% title({'COASOSU'})
% subplot(3,3,3)
% plot(date,b150_2m,'.')
% axis([min(date),max(date),0,0.003])
% datetick('x','mmmyy')
% xlabel('Date')
% ylabel('b 150 2m')
% title({'COASOSU'})
% subplot(3,3,4)
% plot(date,b100_10m,'.')
% axis([min(date),max(date),0,0.003])
% datetick('x','mmmyy')
% xlabel('Date')
% ylabel('b 100 10m')
% title({'COASOSU'})
% subplot(3,3,5)
% plot(date,b125_10m,'.')
% axis([min(date),max(date),0,0.003])
% datetick('x','mmmyy')
% xlabel('Date')
% ylabel('b 125 10m')
% title({'COASOSU'})
% subplot(3,3,6)
% plot(date,b150_10m,'.')
% axis([min(date),max(date),0,0.003])
% datetick('x','mmmyy')
% xlabel('Date')
% ylabel('b 150 10m')
% title({'COASOSU'})
% subplot(3,3,7)
% plot(date,b100_15m,'.')
% axis([min(date),max(date),0,0.003])
% datetick('x','mmmyy')
% xlabel('Date')
% ylabel('b 100 15m')
% title({'COASOSU'})
% subplot(3,3,8)
% plot(date,b125_15m,'.')
% axis([min(date),max(date),0,0.003])
% datetick('x','mmmyy')
% xlabel('Date')
% ylabel('b 125 15m')
% title({'COASOSU'})
% subplot(3,3,9)
% plot(date,b150_15m,'.')
% axis([min(date),max(date),0,0.003])
% datetick('x','mmmyy')
% xlabel('Date')
% ylabel('b 150 15m')
% title({'COASOSU'})
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% figure
% plot(date,b_back_2m)
% datetick('x','mmmyy')
% xlabel('Date')
% ylabel('b back 2m')
% title({'COASOSU Data','b back 2m vs. Date'})
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% figure % to determine what time zone was used:
% plot(date,chl_2m,'.')
% datetick('x','mmmyy')
% xlabel('Date')
% ylabel('chl at 2m')
% title({'COASOSU Data'})
% He used GMT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%