/[MITgcm]/MITgcm_contrib/high_res_cube/matlab-grid-generator/bin/exch_c.m
ViewVC logotype

Annotation of /MITgcm_contrib/high_res_cube/matlab-grid-generator/bin/exch_c.m

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


Revision 1.1 - (hide annotations) (download)
Tue Nov 11 18:08:08 2003 UTC (21 years, 8 months ago) by cnh
Branch point for: MAIN, initial
Initial revision

1 cnh 1.1 function [theta] = exch_c(Theta)
2    
3     theta=NaN*zeros([ size(Theta,1)+2 size(Theta,2)+2 size(Theta,3) ]);
4     theta(2:end-1,2:end-1,:)=Theta;
5    
6     theta(end,:,[1 3 5])=theta(2,:,[2 4 6]);
7     theta(1,:,[1 3 5])=theta(end:-1:1,end-1,[5 1 3]);
8     theta(:,end,[1 3 5])=theta(2,end:-1:1,[3 5 1]);
9     theta(:,1,[1 3 5])=theta(:,end-1,[6 2 4]);
10     theta(:,end,[2 4 6])=theta(:,2,[3 5 1]);
11     theta(:,1,[2 4 6])=theta(end-1,end:-1:1,[6 2 4]);
12     theta(end,:,[2 4 6])=theta(end:-1:1,2,[4 6 2]);
13     theta(1,:,[2 4 6])=theta(end-1,:,[1 3 5]);

  ViewVC Help
Powered by ViewVC 1.1.22