stas_d=input('input the downcast profile you want to plot :   ');
stas_u=input('input the upcast profile you want to plot :   ');

direc='/j2/data/mvp/hawaii_test/offload/';
fil1=(['C00000',sprintf('%2.2i',stas_d)])
fil2=(['C00000',sprintf('%2.2i',stas_u)])
ext='.TXT';

figure;

load1=[direc,fil1,ext];
load2=[direc,fil2,ext];

eval(['load ',load1]);
sta1=eval(fil1);
c1=sta1(:,1);
c1_rat=c1/sw_c3515;
t1=sta1(:,2);
p1=sta1(:,3);
s1=sw_salt(c1_rat,t1,p1);
th1=sw_ptmp(s1,t1,p1,0);
plot(s1,th1,'r');
grid on; zoom on; hold on;

eval(['load ',load2]);
sta2=eval(fil2);
c2=sta2(:,1);
c2_rat=c2/sw_c3515;
t2=sta2(:,2);
p2=sta2(:,3);
s2=sw_salt(c2_rat,t2,p2);
th2=sw_ptmp(s2,t2,p2,0);
plot(s2,th2,'g');


ylabel('Potential Temperature');
xlabel('Salinity');
tit=(['HAWAII TEST CTD FILES  :  ',fil1,' and  ',fil2]);
title(tit);


figure
plot(p1,'r');
grid on; zoom on; hold on;
plot(p2,'g');
ylabel('UP vs DOWN pressure');
xlabel('scan #');
tit=(['HAWAII TEST CTD FILES  :  ',fil1,' and  ',fil2]);
