%%%
%%% this is a once off? 
%%%
%%% things were going a little crazy back there, I'm not sure what this does.
%%%
%%% plots cond_match, cnv_dlp and cnv_cal against each other?
%  2008/03/20
%%%
%%%


P=round(cond_match.ctdprs);
N=cond_match.stnnbr;

Bs=cond_match.btlsal;
Cs=cond_match.ctdsal1;

Bc=cond_match.btlcon1;
Cc=cond_match.ctdcon1;

cs=NaN.*N;
ds=NaN.*N;

cc=NaN.*N;
dc=NaN.*N;

for i=1:length(N),
	is=find(N(i)==[cnv_cal.station]);
	ip=find(P(i)==cnv_cal(is).pressure);
	cs(i)=cnv_cal(is).salt(ip);
	cc(i)=cnv_cal(is).cond(ip);

	is=find(N(i)==[cnv_dlp.station]);
	ip=find(P(i)==cnv_dlp(is).pressure); 
	ds(i)=cnv_dlp(is).salpri(ip);
%% conductivity units are different in cnv_dlp 
	dc(i)=10.*cnv_dlp(is).condpri(ip);
end;

diffs=[Bs,Cs,cs,ds]-Bs*ones(1,4); 
figure; leg=plot(diffs,P,'.');
	legend(leg,{'Bottle','CTD','Calibrated','Delooped'},'location','best');
	title('Salinity');

diffs=[Bc,Cc,cc,dc]-Bc*ones(1,4); 
figure; leg=plot(diffs,P,'.');
	legend(leg,{'Bottle','CTD','Calibrated','Delooped'},'location','best');
	title('Conductivity');

