% nut_plots.m
%  Long Bay data analyses -- April 2012, sets of nutrient-related plots 
%  Data file used here:  'Long_Bay_Nutrients_2012.mat'
%  "Comment" the plots that are not wanted, "uncomment" those desired.  

%% Nutrients (uM) versus Temperature (degrees C), 
%%      different symbols for the three 2012 cruises

% figure
% subplot(3,1,1)
% plot(temp(i1203),nitrate(i1203),'*b')
% hold
% plot(temp(i1205),nitrate(i1205),'*r')
% plot(temp(i1211),nitrate(i1211),'*g')
% xlabel('Temperature (degrees C)')
% ylabel('Nitrate (uM)')
% 
% subplot(3,1,2)
% plot(temp(i1203),phosphate(i1203),'*b')
% hold
% plot(temp(i1205),phosphate(i1205),'*r')
% plot(temp(i1211),phosphate(i1211),'*g')
% xlabel('Temperature (degrees C)')
% ylabel('Phosphate (uM)')
% 
% subplot(3,1,3)
% plot(temp(i1203),silicate(i1203),'*b')
% hold
% plot(temp(i1205),silicate(i1205),'*r')
% plot(temp(i1211),silicate(i1211),'*g')
% xlabel('Temperature (degrees C)')
% ylabel('Silicate (uM)')

%% Nutrients (uM) versus density (kg/m3), 
%%      different symbols for the three 2012 cruises

% figure
% subplot(3,1,1)
% plot(density(i1203),nitrate(i1203),'*b')
% hold
% plot(density(i1205),nitrate(i1205),'*r')
% plot(density(i1211),nitrate(i1211),'*g')
% xlabel('Density (kg/m3)')
% ylabel('Nitrate (uM)')
% 
% subplot(3,1,2)
% plot(density(i1203),phosphate(i1203),'*b')
% hold
% plot(density(i1205),phosphate(i1205),'*r')
% plot(density(i1211),phosphate(i1211),'*g')
% xlabel('Density (kg/m3)')
% ylabel('Phosphate (uM)')
% 
% subplot(3,1,3)
% plot(density(i1203),silicate(i1203),'*b')
% hold
% plot(density(i1205),silicate(i1205),'*r')
% plot(density(i1211),silicate(i1211),'*g')
% xlabel('Density (kg/m3)')
% ylabel('Silicate (uM)')

%% Nutrients (uM) versus Oxygen (uM), 
%%      different symbols for the three 2012 cruises

% figure
% subplot(3,1,1)
% plot(O2_uM(i1203),nitrate(i1203),'*b')
% hold
% plot(O2_uM(i1205),nitrate(i1205),'*r')
% plot(O2_uM(i1211),nitrate(i1211),'*g')
% xlabel('Oxygen (uM)')
% ylabel('Nitrate (uM)')
% 
% subplot(3,1,2)
% plot(O2_uM(i1203),phosphate(i1203),'*b')
% hold
% plot(O2_uM(i1205),phosphate(i1205),'*r')
% plot(O2_uM(i1211),phosphate(i1211),'*g')
% xlabel('Oxygen (uM)')
% ylabel('Phosphate (uM)')
% 
% subplot(3,1,3)
% plot(O2_uM(i1203),silicate(i1203),'*b')
% hold
% plot(O2_uM(i1205),silicate(i1205),'*r')
% plot(O2_uM(i1211),silicate(i1211),'*g')
% xlabel('Oxygen (uM)')
% ylabel('Silicate (uM)')

%% Nutrients (uM) versus Station Depth (m)
%%      different symbols for the three 2012 cruises

% figure
% subplot(3,1,1)
% plot(sta_depth(i1203),nitrate(i1203),'*b')
% hold
% plot(sta_depth(i1205),nitrate(i1205),'*r')
% plot(sta_depth(i1211),nitrate(i1211),'*g')
% 
% subplot(3,1,2)
% plot(sta_depth(i1203),phosphate(i1203),'*b')
% hold
% plot(sta_depth(i1205),phosphate(i1205),'*r')
% plot(sta_depth(i1211),phosphate(i1211),'*g')
% 
% subplot(3,1,3)
% plot(sta_depth(i1203),silicate(i1203),'*b')
% hold
% plot(sta_depth(i1205),silicate(i1205),'*r')
% plot(sta_depth(i1211),silicate(i1211),'*g')

%% Nutrients (uM) versus Oxygen Percent Saturation (pct sat)
%%      different symbols for the three 2012 cruises

% figure
% subplot(3,1,1)
% plot(O2_pctsat(i1203),nitrate(i1203),'*b')
% hold
% plot(O2_pctsat(i1205),nitrate(i1205),'*r')
% plot(O2_pctsat(i1211),nitrate(i1211),'*g')
% xlabel('Oxygen (pct sat)')
% ylabel('Nitrate (uM)')
% 
% subplot(3,1,2)
% plot(O2_pctsat(i1203),phosphate(i1203),'*b')
% hold
% plot(O2_pctsat(i1205),phosphate(i1205),'*r')
% plot(O2_pctsat(i1211),phosphate(i1211),'*g')
% xlabel('Oxygen (pct sat)')
% ylabel('Phosphate (uM)')
% 
% subplot(3,1,3)
% plot(O2_pctsat(i1203),silicate(i1203),'*b')
% hold
% plot(O2_pctsat(i1205),silicate(i1205),'*r')
% plot(O2_pctsat(i1211),silicate(i1211),'*g')
% xlabel('Oxygen (pct sat)')
% ylabel('Silicate (uM)')

%% N:P & N:Si

% figure
% subplot(2,1,1);
% plot(phosphate(i1203),nitrate(i1203),'*b');
% hold
% plot(phosphate(i1205),nitrate(i1205),'*r');
% plot(phosphate(i1211),nitrate(i1211),'*g');
% xlabel('Phosphate(uM)');
% ylabel('Nitrate (uM)')
% 
% subplot(2,1,2);
% plot(silicate(i1203),nitrate(i1203),'*b');
% hold
% plot(silicate(i1205),nitrate(i1205),'*r');
% plot(silicate(i1211),nitrate(i1211),'*g');
% xlabel('silicate(uM)');
% ylabel('Nitrate (uM)')

%% nitrate:phosphate & oxygen:phosphate
%   includes lines for defined N:P ratios of 16:1, 20:1, 25:1
%
% p16=[0,0;1,16;1.5,24];
% p20=[0,0;1,20;1.5,30];
% p25=[0,0;1,25;1.2,30];
% 
% figure
% subplot(1,2,1);
% plot(phosphate(i1203),nitrate(i1203),'*b');
% hold
% plot(phosphate(i1205),nitrate(i1205),'*r');
% plot(phosphate(i1211),nitrate(i1211),'*g');
% plot(p16(:,1),p16(:,2),'-k')
% plot(p25(:,1),p25(:,2),'-k')
% plot(p20(:,1),p20(:,2),'-k')
% xlabel('Phosphate(uM)');
% ylabel('nitrate (uM)');
% 
% subplot(1,2,2);
% plot(phosphate(i1203),O2_uM(i1203),'*b');
% hold
% plot(phosphate(i1205),O2_uM(i1205),'*r');
% plot(phosphate(i1211),O2_uM(i1211),'*g');
% xlabel('phosphate(uM)');
% ylabel('O2_uM (uM)')
% 
% clear p16,p20,p25;

%% Nutrient ratio plots -- versus temperature & versus nitrate
%%      combined cruise data
% figure
% subplot(2,1,1)
% plot(temp,NtoP,'*r')
% xlabel('Temperature (degrees C)')
% ylabel('Nitrate to Phosphate (molar)')
% subplot(2,1,2)
% plot(temp,NtoSi,'*c')
% xlabel('Temperature (degrees C)')
% ylabel('Nitrate to phosphate (molar)')
% 
% figure
% subplot(2,1,1)
% plot(nitrate,NtoP,'*r')
% xlabel('Nitrate (uM)')
% ylabel('Nitrate to Phosphate (molar)')
% subplot(2,1,2)
% plot(nitrate,NtoSi,'*c')
% xlabel('Nitrate (uM)')
% ylabel('Nitrate to Silicate (molar)')

%% Nutrient ratio plots -- versus temperature & versus nitrate
%%      different symbols for three 2012 cruises

% figure
% subplot(2,1,1)
% plot(temp(i1203),NtoP(i1203),'*b')
% hold
% plot(temp(i1205),NtoP(i1205),'*r')
% plot(temp(i1211),NtoP(i1211),'*g')
% xlabel('Temperature (degrees C)')
% ylabel('Nitrate to Phosphate (molar)')
% %legend('Sav12-03','Sav12-05', 'Sav12-11','Location','Northoutside')
% subplot(2,1,2)
% plot(temp(i1203),NtoSi(i1203),'*b')
% hold
% plot(temp(i1205),NtoSi(i1205),'*r')
% plot(temp(i1211),NtoSi(i1211),'*g')
% xlabel('Temperature (degrees C)')
% ylabel('Nitrate to Silicate (molar)')
% 
% figure
% subplot(2,1,1)
% plot(density(i1203),NtoP(i1203),'*b')
% hold 
% plot(density(i1205),NtoP(i1205),'*r')
% plot(density(i1211),NtoP(i1211),'*g')
% xlabel('Density (kg/m3)')
% ylabel('Nitrate to Phosphate (molar)')
% subplot(2,1,2)
% plot(density(i1203),NtoSi(i1203),'*b')
% hold
% plot(density(i1205),NtoSi(i1205),'*r')
% plot(density(i1211),NtoSi(i1211),'*g')
% xlabel('Density (kg/m3)')
% ylabel('Nitrate to Silicate (molar)')
% 
% figure
% subplot(2,1,1)
% plot(nitrate(i1203),NtoP(i1203),'*b')
% hold 
% plot(nitrate(i1205),NtoP(i1205),'*r')
% plot(nitrate(i1211),NtoP(i1211),'*g')
% xlabel('Nitrate (uM)')
% ylabel('Nitrate to Phosphate (molar)')
% subplot(2,1,2)
% plot(nitrate(i1203),NtoSi(i1203),'*b')
% hold
% plot(nitrate(i1205),NtoSi(i1205),'*r')
% plot(nitrate(i1211),NtoSi(i1211),'*g')
% xlabel('Nitrate (uM)')
% ylabel('Nitrate to Silicate (molar)')

%% Nutrient ratio plots -- by station depth

% figure
% subplot(2,1,1)
% plot(temp(iz55),NtoP(iz55),'*b')
% hold
% plot(temp(izdeep),NtoP(izdeep),'ob')
% plot(temp(i1211),NtoP(i1211),'*g')
% xlabel('Temperature (degrees C)')
% ylabel('Nitrate to Phosphate (molar)')
% %legend('Sav12-03','Sav12-05', 'Sav12-11','Location','Northoutside')
% subplot(2,1,2)
% plot(temp(i1203),NtoSi(i1203),'*b')
% hold
% plot(temp(i1205),NtoSi(i1205),'*r')
% plot(temp(i1211),NtoSi(i1211),'*g')
% xlabel('Temperature (degrees C)')
% ylabel('Nitrate to Silicate (molar)')



%% T-S plot for nutrient samples
% figure
% plot(salinity(i1203),temp(i1203),'.')
% hold
% plot(salinity(i1205),temp(i1205),'.r')
% plot(salinity(i1211),temp(i1211),'.g')
% xlabel('Temperature (degrees C)')
% ylabel('Salinity (PSU)')


%% ccplot for nutrient concentrations on T-S

% figure
% ccplot(salinity(i1203),temp(i1203),nitrate(i1203),[0 30],'.',20)
% hold
% ccplot(salinity(i1205),temp(i1205),nitrate(i1205),[0 30],'*',20)
% plot(salinity(i1211),temp(i1211),nitrate(i1211),[0 30],'o',20)
% xlabel('Temperature (degrees C)')
% ylabel('Salinity (PSU)')
%
