function compare_cond(cruiseid)
% COMPARE_COND -  Diagnostics plots to compare CTD and samples conductivity values.
%
% CTD Calibration toolbox.
%
% USAGE:
% compare_cond(cruiseid);
%
%INPUT: cruiseid: Cruise identification name.
%   
% OUTPUT: A series of plots to compare CTD and bottle samples conductivity values 
%          
% DESCRIPTION: This function uses the summary conductivity calibration file created by  
% make_cond_sum and do a series of diagnostics plots to compare CTD and
% bottle samples conductivity values to evaluate the quality of the data
% that we are coleecting, as well, any potential problems with
% niskin/sample bottles or sensors.
% AUTHORS:Carlos Fonseca 
%         UM/CIMAS
%         Derrick Snowden
%         NOAA/AOML/PhOD
%         Tue May 11 11:23:37 EDT 2004
% CHANGELOG: 
%   23-Jul-2004, Version 1.0
%		* Initial version.
cruise_dir=cruiseid;
sd=['cd ',cruise_dir];
eval(sd);
fname=[cruiseid,'_db.mat'];
ld_file=(['load ',fname]);
eval(ld_file);
n=who('cond_cal');
if isempty(n)==1
error(['cond_cal not found. Run make_cond_sum.m ']);
return;
end

figure;
plot(cond_cal.btlsal,cond_cal.ctdsal1,'r+')
hold on;
xlabel('Bottle Salinity (psu)')
ylabel('CTD Salinity (psu)')
title('Primary Sensor')

figure
plot(cond_cal.btlsal,cond_cal.ctdsal1,'r+')
text(cond_cal.btlsal,cond_cal.ctdsal1,int2str(cond_cal.stnnbr))
hold on;
xlabel('Bottle Salinity')
ylabel('CTD Salinity')
title('Primary Sensor - Station Number')

figure
plot(cond_cal.stnnbr,cond_cal.btlsal-cond_cal.ctdsal1,'r+')
xlabel('Station number')
ylabel('Bottle Salinity - CTD Salinity')
title('Primary Sensor') 
 
figure
plot(cond_cal.niskinbtlpos,cond_cal.btlsal-cond_cal.ctdsal1,'r+')
xlabel('Niskin number')
ylabel('Bottle Salinity - CTD Salinity')
title('Primary Sensor') 
 
figure
plot(cond_cal.sampnbr,cond_cal.btlsal-cond_cal.ctdsal1,'r+')
xlabel('Sample Bottle number')
ylabel('Bottle Salinity - CTD Salinity')
title('Primary Sensor') 
  
figure
plot(cond_cal.ctdprs,cond_cal.btlsal-cond_cal.ctdsal1,'r+')
xlabel('Pressure')
ylabel('Bottle Salinity - CTD Salinity')
title('Primary Sensor')
  
pause

figure;
plot(cond_cal.btlsal,cond_cal.ctdsal2,'r+')
hold on;
xlabel('Bottle Salinity (psu)')
ylabel('CTD Salinity (psu)')
title('Secondary Sensor')

figure
plot(cond_cal.btlsal,cond_cal.ctdsal2,'r+')
text(cond_cal.btlsal,cond_cal.ctdsal2,int2str(cond_cal.stnnbr))
hold on;
xlabel('Bottle Salinity')
ylabel('CTD Salinity')
title('Secondary Sensor - Station Number')

figure
plot(cond_cal.stnnbr,cond_cal.btlsal-cond_cal.ctdsal2,'r+')
xlabel('Station number')
ylabel('Bottle Salinity - CTD Salinity')
title('Secondary Sensor') 
 
figure
plot(cond_cal.niskinbtlpos,cond_cal.btlsal-cond_cal.ctdsal2,'r+')
xlabel('Niskin number')
ylabel('Bottle Salinity - CTD Salinity')
title('Secondary Sensor') 
 
figure
plot(cond_cal.sampnbr,cond_cal.btlsal-cond_cal.ctdsal2,'r+')
xlabel('Sample Bottle number')
ylabel('Bottle Salinity - CTD Salinity')
title('Secondary Sensor') 
  
figure
plot(cond_cal.ctdprs,cond_cal.btlsal-cond_cal.ctdsal2,'r+')
xlabel('Pressure')
ylabel('Bottle Salinity - CTD Salinity')
title('Secondary Sensor')
  
figure
plot(cond_cal.ctdprs,cond_cal.ctdsal1-cond_cal.ctdsal2,'r+')
  xlabel('Pressure, dbar')
  ylabel('Primary - Secondary Sensor Salinity')
  title('Primary  - Secondary Sensor')