| 1 |
% |
| 2 |
% function mapxy_field(X,Y,FIELD,lax,palette,titre,NFIG) |
| 3 |
% |
| 4 |
|
| 5 |
function mapxy_field(X,Y,FIELD,lax,palette,titre,NFIG) |
| 6 |
|
| 7 |
path('/u/u0/czaja/MITGCM/MATLAB',path); |
| 8 |
path('/u/u0/czaja/MATLAB',path); |
| 9 |
|
| 10 |
figure(NFIG), clf, |
| 11 |
|
| 12 |
% Plot 2D field |
| 13 |
pcolor(X,Y,FIELD'); %shading flat |
| 14 |
set(gca,'Fontsize',14); |
| 15 |
caxis(lax); |
| 16 |
colormap(palette); |
| 17 |
colorbar; |
| 18 |
title(titre,'Fontsize',20); |
| 19 |
xlabel('Longitude','Fontsize',15); |
| 20 |
ylabel('Latitude','Fontsize',15); |
| 21 |
hold on |
| 22 |
|
| 23 |
%Plot continents |
| 24 |
x1 = 105+2.5; |
| 25 |
x2 = 150+2.5; |
| 26 |
x3 = 210+2.5; |
| 27 |
x4 = 255+2.5; |
| 28 |
y1 = 64; |
| 29 |
y2 = -30+1; |
| 30 |
[h]=line([x1 x1],[y1 y2]); set(h,'Linewidth',2,'color','k'); |
| 31 |
[h]=line([x1 x2],[y2 y2]); set(h,'Linewidth',2,'color','k'); |
| 32 |
[h]=line([x2 x2],[y2 y1]); set(h,'Linewidth',2,'color','k'); |
| 33 |
[h]=line([x3 x3],[y1 y2]); set(h,'Linewidth',2,'color','k'); |
| 34 |
[h]=line([x3 x4],[y2 y2]); set(h,'Linewidth',2,'color','k'); |
| 35 |
[h]=line([x4 x4],[y2 y1]); set(h,'Linewidth',2,'color','k'); |
| 36 |
|
| 37 |
axis([0 360 -64 64]); |
| 38 |
|