/[MITgcm]/MITgcm_contrib/enderton/Diagnostics/DiagUtility/permutetiles.m
ViewVC logotype

Annotation of /MITgcm_contrib/enderton/Diagnostics/DiagUtility/permutetiles.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Mon Jan 31 15:43:29 2005 UTC (20 years, 5 months ago) by enderton
Branch: MAIN
CVS Tags: HEAD
 o Initial check in.

1 enderton 1.1 function [a]=permutetiles(b,n)
2     % a=permutetiles(b) shifts the tile data left by n places around the equator
3     %
4     % ie. n=1, tile 2->1, 4->2, 5->4, 1->5, the tiles 3 and 6 get rotated 90 degs.
5    
6     c=b;
7     for k=1:n
8    
9     a(:,:,1)=c(:,:,2);
10     a(:,:,2)=c(end:-1:1,:,4)';
11     a(:,:,3)=c(end:-1:1,:,3)';
12     a(:,:,4)=c(:,:,5);
13     a(:,:,5)=c(:,end:-1:1,1)';
14     a(:,:,6)=c(:,end:-1:1,6)';
15    
16     c=a;
17     end
18     a=c;

  ViewVC Help
Powered by ViewVC 1.1.22