%% quick plot tests on outpfiles from DA program - hourly and 10min

% not edited or adapted for Mirai 2014.  Edit as necessary

data10=load(['C:\data\CRUISES\HiWinGS_2013\flux_data\' jdollars '_flux_10' datasetv '.txt']);
datahr=load(['C:\data\CRUISES\HiWinGS_2013\flux_data\' jdollars '_flux_hr' datasetv '.txt']);

[l,c]=size(data10);

figure;plot(data10(:,1),data10(:,2),'.',datahr(:,1),datahr(:,2),'r.--')
title('doppler log, SCS (m/s)')
figure;plot(data10(:,1),data10(:,3),'.',datahr(:,1),datahr(:,3),'r.--')
title('true wind relative to water,ETL sonic (m/s)')
figure;plot(data10(:,1),data10(:,55),'.',datahr(:,1),datahr(:,55),'r.--')
title('true wind relative to Earth,ETL sonic (m/s)')
figure;plot(data10(:,1),data10(:,4),'.',datahr(:,1),datahr(:,4),'r.--')
title('true wind direction, ETL sonic (deg)')
figure;plot(data10(:,1),data10(:,56),'.',datahr(:,1),datahr(:,56),'r.--')
title('true wind direction relative to Earth, ETL sonic (deg)')
figure;plot(data10(:,1),data10(:,5),'.',datahr(:,1),datahr(:,5),'r.--')
title('relative wind speed, ETL (m/s)')
figure;plot(data10(:,1),data10(:,6),'.',datahr(:,1),datahr(:,6),'r.--')
title('relative wind direction (from),clockwise rel ship''s bow, ETL')
figure;plot(data10(:,1),data10(:,7),'.',datahr(:,1),datahr(:,7),'r.--')
title('ship heading, deg clockwise rel north, SCS laser ring gyro')
figure;plot(data10(:,1),data10(:,8),'.',datahr(:,1),datahr(:,8),'r.--')
title('sea snake temperature, ETL, 0.05 m depth (C)')
figure;plot(data10(:,1),data10(:,9),'.',datahr(:,1),datahr(:,9),'r.--')
title('air temperature, ETL (C)')
figure;plot(data10(:,1),data10(:,10),'.',datahr(:,1),datahr(:,10),'r.--')
title('sea surface specific humidity, from snake (g/kg)')

figure;plot(data10(:,1),data10(:,11),'.',datahr(:,1),datahr(:,11),'r.--')
title('air specific humidity, ETL (g/kg)')
figure;plot(data10(:,1),data10(:,12),'.',datahr(:,1),datahr(:,12),'r.--')
title('sensible heat flux, covariance, ETL sonic anemometer(W/m^2)')
figure;plot(data10(:,1),data10(:,13),'.',datahr(:,1),datahr(:,13),'r.--')
title('sensible heat flux, ID, ETL sonic anemometer(W/m^2)')
figure;plot(data10(:,1),data10(:,14),'.',datahr(:,1),datahr(:,14),'r.--')
title('bulk sensible heat flux, (W/m^2))')
figure;plot(data10(:,1),data10(:,15),'.',datahr(:,1),datahr(:,15),'r.--')
title('Licor latent heat flux, covariance, (W/m^2)')
figure;plot(data10(:,1),data10(:,16),'.',datahr(:,1),datahr(:,16),'r.--')
title('Licor latent heat flux, ID, (W/m^2)')
figure;plot(data10(:,1),data10(:,17),'.',datahr(:,1),datahr(:,17),'r.--')
title('bulk latent heat flux, W/m^2 (includes Webb et al. correction)')

figure;plot(data10(:,1),data10(:,18),'.',datahr(:,1),datahr(:,18),'r.--')
title('covariance streamwise stress, ETL sonic anemometer (N/m^2)')
figure;plot(data10(:,1),data10(:,19),'.',datahr(:,1),datahr(:,19),'r.--')
title('covariance cross-stream stress, ETL sonic anemometer (N/m^2)')
figure;plot(data10(:,1),data10(:,20),'.',datahr(:,1),datahr(:,20),'r.--')
title('ID streamwise stress, ETL sonic anemometer (N/m^2)')
figure;plot(data10(:,1),data10(:,21),'.',datahr(:,1),datahr(:,21),'r.--')
title('bulk wind stress along mean wind, (N/m^2)')

figure;plot(data10(:,1),data10(:,22),'.',datahr(:,1),datahr(:,22),'r.--')
title('downward solar flux, ETL units (W/m^2)')
figure;plot(data10(:,1),data10(:,23),'.',datahr(:,1),datahr(:,23),'r.--')
title('downward IR flux, ETL units (W/m^2)')
figure;plot(data10(:,1),data10(:,24),'.',datahr(:,1),datahr(:,24),'r.--')
title('rainrate, ETL STI optical rain gauge, uncorrected (mm/hr)')
figure;plot(data10(:,1),data10(:,25),'.',datahr(:,1),datahr(:,25),'r.--')
title('ship plume contamination index')
figure;plot(data10(:,1),data10(:,26),'.',datahr(:,1),datahr(:,26),'r.--')
title('flow tilt at ETL sonic anemometer, earth frame')
figure;plot(data10(:,1),data10(:,27),'.',datahr(:,1),datahr(:,27),'r.--')
title('ship maneuver index')
figure;plot(data10(:,1),data10(:,28),'.',datahr(:,1),datahr(:,28),'r.--')
title('ct^2 (K^2/m^.667)')
figure;plot(data10(:,1),data10(:,29),'.',datahr(:,1),datahr(:,29),'r.--')
title('cq^2 ((g/kg)^2/m^.667)')
figure;plot(data10(:,1),data10(:,30),'.',datahr(:,1),datahr(:,30),'r.--')
title('cu^2 ((m/s)^2/m^.667)')
figure;plot(data10(:,1),data10(:,31),'.',datahr(:,1),datahr(:,31),'r.--')
title('cw^2 ((m/s)^2/m^.667)')

figure;plot(data10(:,1),data10(:,32),'.',datahr(:,1),datahr(:,32),'r.--')
title('rain heat flux,Gosnell et al 1995, JGR, 18437-18442, (W/m^2)')
figure;plot(data10(:,1),data10(:,33),'.',datahr(:,1),datahr(:,33),'r.--')
title('correction to measured latent heat flux, Webb et al. 1980,QJRMS, 85-100')
figure;plot(data10(:,1),data10(:,34),'.',datahr(:,1),datahr(:,34),'r.--')
title('latitude, deg (SCS pcode)')
figure;plot(data10(:,1),data10(:,35),'.',datahr(:,1),datahr(:,35),'r.--')
title('longitude, deg (SCS pcode)')

figure;plot(data10(:,1),data10(:,39),'.',datahr(:,1),datahr(:,39),'r.--')
title('speed over ground, SCS gps, (m/s)')
figure;plot(data10(:,1),data10(:,40),'.',datahr(:,1),datahr(:,40),'r.--')
title('true wind speed, imet propvane anemometer (m/s)')
figure;plot(data10(:,1),data10(:,41),'.',datahr(:,1),datahr(:,41),'r.--')
title('true wind direction (from),clockwise rel north, imet,(deg)')
figure;plot(data10(:,1),data10(:,42),'.',datahr(:,1),datahr(:,42),'r.--')
title('course over ground, SCS gps, (m/s)')
figure;plot(data10(:,1),data10(:,43),'.',datahr(:,1),datahr(:,43),'r.--')
title('tsg water temperature, 5 m depth, (C)')
figure;plot(data10(:,1),data10(:,44),'.',datahr(:,1),datahr(:,44),'r.--')
title('imet air temperature (C)')
figure;plot(data10(:,1),data10(:,45),'.',datahr(:,1),datahr(:,45),'r.--')
title('imet bulk water specific humidity (g/kg)')
figure;plot(data10(:,1),data10(:,46),'.',datahr(:,1),datahr(:,46),'r.--')
title('imet air specific humidity, (g/kg)')
figure;plot(data10(:,1),data10(:,47),'.',datahr(:,1),datahr(:,47),'r.--')
title('imet solar flux, (W/m^2)')
figure;plot(data10(:,1),data10(:,48),'.',datahr(:,1),datahr(:,48),'r.--')
title('imet IR flux (W/m^2)')

figure;plot(data10(:,1),data10(:,49),'.',datahr(:,1),datahr(:,49),'r.--')
title('LICOR CO2 flux, (micatm m/s)')
figure;plot(data10(:,1),data10(:,50),'.',datahr(:,1),datahr(:,50),'r.--')
title('Specific Humidity from Licor (g/kg)')
figure;plot(data10(:,1),data10(:,51),'.',datahr(:,1),datahr(:,51),'r.--')
title('Stv of Specific Humidity from Licor (g/kg)')
figure;plot(data10(:,1),data10(:,52),'.',datahr(:,1),datahr(:,52),'r.--')
title('CO2 concentration from Licor (umol/mol)')

figure;plot(data10(:,1),data10(:,53),'.',datahr(:,1),datahr(:,53),'r.--')
title('Stv of CO2 concentration from Licor (umol/mol)')
figure;plot(data10(:,1),data10(:,54),'.',datahr(:,1),datahr(:,54),'r.--')
title('Pressure (mbar)')
% % 
% % figure;
% % subplot(1,2,1);plot(data10(:,1),data10(:,12),'.',data10(:,1),data10(:,13),'g.',data10(:,1),data10(:,14),'r.')
% % title('10min sensible heat flux(W/m^2)');legend('covariance','ID','bulk');ylim([-10 50])
% % subplot(1,2,2);plot(datahr(:,1),datahr(:,12),'d--',datahr(:,1),datahr(:,13),'gd--',datahr(:,1),datahr(:,14),'rd--')
% % title('Hourly sensible heat flux(W/m^2)');legend('covariance','ID','bulk');ylim([-10 50])
% % 
% % figure;
% % subplot(1,2,1);plot(data10(:,1),data10(:,15),'.',data10(:,1),data10(:,16),'g.',data10(:,1),data10(:,17),'r.')
% % title('Ophir 10min latent heat flux(W/m^2)');legend('covariance','ID','bulk');
% % subplot(1,2,2);plot(datahr(:,1),datahr(:,15),'d--',datahr(:,1),datahr(:,16),'gd--',datahr(:,1),datahr(:,17),'rd--')
% % title('Ophir Hourly latent heat flux(W/m^2)');legend('covariance','ID','bulk');
% % 
% % figure;
% % subplot(1,2,1);plot(data10(:,1),data10(:,18),'.',data10(:,1),data10(:,20),'g.',data10(:,1),data10(:,21),'r.')
% % title('10min stres(N/m^2)');legend('covariance','ID','bulk');
% % subplot(1,2,2);plot(datahr(:,1),datahr(:,18),'d--',datahr(:,1),datahr(:,20),'gd--',datahr(:,1),datahr(:,21),'rd--')
% % title('Hourly stres(N/m^2)');legend('covariance','ID','bulk');
% % 
% % 
% % 
% % 
% % 
% % %plot some of the 3 Licors data
% % data10lic=load('C:\Data\CRUISES\Stratus_2007\data\Stratus07flux_10_lic.txt');
% % data10li1=load('C:\Data\CRUISES\Stratus_2007\data\Stratus07flux_10_li1.txt');
% % data10li2=load('C:\Data\CRUISES\Stratus_2007\data\Stratus07flux_10_li2.txt');
% % 
% % i=15;figure;plot(data10lic(:,1),data10lic(:,i),'.',data10li1(:,1),data10li1(:,i),'r.--',data10li1(:,1),data10li2(:,i),'g.--')
% % title('Licor latent heat flux, covariance, (W/m^2)');legend('open','null','sample')
% % i=52;figure;plot(data10lic(:,1),data10lic(:,i),'.',data10li1(:,1),data10li1(:,i),'r.--',data10li1(:,1),data10li2(:,i),'g.--')
% % title('CO2 concentration from Licor (umol/mol)');legend('open','null','sample')
% % i=49;figure;plot(data10lic(:,1),data10lic(:,i),'.',data10li1(:,1),data10li1(:,i),'r.--',data10li1(:,1),data10li2(:,i),'g.--')
% % title('LICOR CO2 flux, (micatm m/s)');legend('open','null','sample')