% plottrlat.m
% plot transects de haut en bas: UU (haut), VV, amplitude, angle [0,360] (bas) avec echelles independantes
% y = lat
% cree par AP le 10/09/02
% modifie par JG le 16/01/04

% xx numero de station depart
% yy numero de station fin
% zz lettre pour indiquer si c'est le a: 1er passage, b 2e etc...
xx=1;
yy=3;
zz='a';

ici=pwd;
cd e:\Gatti2\golts\Survey\Survey081203\ADCPTethys\tronca
eval(['load g1203tr',int2str(xx),'t',int2str(yy),zz,'t.mat;'])

umin=min(min(uv(1:2:end,:)))  
umax=max(max(uv(1:2:end,:)))
vmin=min(min(uv(2:2:end,:)))
vmax=max(max(uv(2:2:end,:)))

subplot(4,1,1)
%ax1=axes('position',[0.25 0.71 0.45 0.2]);
colormap('gray')
pcolor(xyt(:,2),zc,flipud(uv(1:2:end,:)))
caxis([umin umax])
shading interp, c1=colorbar;
%set(c1,'ytick',[-1:0.5:2],'yticklabel',[-1 -0.5 0 0.5 1 1.5 2])
set(gca,'XTickLabel',[])
eval(['title([''GOLTS December 2003 - Transect ',int2str(xx),' to ',int2str(yy),' ',zz,'.''])'])
text(min(xyt(:,2))+0.01,-200,'U (Est>0)');

subplot(4,1,2)
%ax2=axes('position',[0.25 0.5 0.45 0.2]);
colormap('jet')
pcolor(xyt(:,2),zc,flipud(uv(2:2:end,:)))
caxis([vmin vmax])
shading interp, c2=colorbar;
%set(c2,'ytick',[0:0.5:3],'yticklabel',[0 0.5 1 1.5 2 2.5 3])
set(gca,'XTickLabel',[])
text(min(xyt(:,2))+0.01,-200,'V (Nord>0)');

cd (ici)
[ampl,angle]=umod(uv(1:2:end,:),uv(2:2:end,:));
amplimin=min(min(ampl))
amplimax=max(max(ampl))

subplot(4,1,3)
%ax3=axes('position',[0.25 0.29 0.45 0.2]);
pcolor(xyt(:,2),zc,flipud(ampl))
caxis([amplimin amplimax])
shading interp, c3=colorbar;
%set(c3,'ytick',[0:0.5:3],'yticklabel',[0 0.5 1 1.5 2 2.5 3])
set(gca,'XTickLabel',[])
text(min(xyt(:,2))+0.01,-200,'amplitude');

subplot(4,1,4)
%ax4=axes('position',[0.25 0.08 0.45 0.2]);
pcolor(xyt(:,2),zc,flipud(angle))
caxis([0 360])
shading interp, c4=colorbar;
%set(c4,'ytick',[0:90:360],'yticklabel',[0 90 180 270 360])
xlabel(['latitude']);
text(min(xyt(:,2))+0.01,-200,'angle');

set(gcf,'unit','centimeter',...
		'papertype','A4',...
		'PaperPosition',[-3.51 3.34 30 23])
 

cd(ici);