1 |
iimg=0; |
2 |
for i=0:60:720 |
3 |
figure |
4 |
fnam1=sprintf('PTRACER01.%10.10d',i) |
5 |
phi=rdmds(fnam1); |
6 |
phixy1=squeeze(phi(:,:,1)); |
7 |
fid=fopen('depth_g77.bin','r','b'); |
8 |
depth=fread(fid,'float32'); |
9 |
depth=reshape(depth,[128 64]); |
10 |
phixy1(find(depth==0))=NaN; |
11 |
subplot(2,1,1,'align'); |
12 |
surf(phixy1');view(2);shading flat;colorbar |
13 |
set(gca,'XLim',[1 128]); |
14 |
set(gca,'YLim',[1 64]); |
15 |
set(gca,'Box','on') |
16 |
|
17 |
months=((i/60)); |
18 |
titlestring=[num2str(months) ' months']; |
19 |
title(titlestring); |
20 |
|
21 |
fnam2=sprintf('PTRACER02.%10.10d',i) |
22 |
phi=rdmds(fnam2); |
23 |
phixy2=squeeze(phi(:,:,1)); |
24 |
fid=fopen('depth_g77.bin','r','b'); |
25 |
depth=fread(fid,'float32'); |
26 |
depth=reshape(depth,[128 64]); |
27 |
phixy2(find(depth==0))=NaN; |
28 |
subplot(2,1,2,'align'); |
29 |
surf(phixy2');view(2);shading flat;colorbar |
30 |
set(gca,'XLim',[1 128]); |
31 |
set(gca,'YLim',[1 64]); |
32 |
set(gca,'Box','on'); |
33 |
|
34 |
inam=sprintf('trxy01.%10.10d',iimg) |
35 |
print('-djpeg100','-r80',inam); |
36 |
iimg=iimg+1; |
37 |
end |
38 |
|
39 |
%--> animate img.* |
40 |
%--> convert -loop 10000 img.* myanimgif.gif |
41 |
|
42 |
|