/[MITgcm]/MITgcm/utils/matlab/permutetiles.m
ViewVC logotype

Contents of /MITgcm/utils/matlab/permutetiles.m

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


Revision 1.2 - (show annotations) (download)
Thu Sep 15 20:07:45 2005 UTC (18 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
moved from utils/matlab to utils/matlab/cs_grid.

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