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

Annotation of /MITgcm/utils/matlab/drawedges.m

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


Revision 1.1 - (hide annotations) (download)
Mon Aug 13 18:10:28 2001 UTC (22 years, 10 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint40pre6, checkpoint40pre8, checkpoint40pre7
Some new/more scripts for plotting cube stuff.

1 adcroft 1.1 function [] = drawedges(xg,yg,varargin)
2     % Draws edges of cube on plot
3     % >> drawedges(xg,yg)
4    
5     [nx ny nt]=size(xg);
6     hnx=ceil(nx/2);
7     hny=ceil(ny/2);
8    
9     if ~isempty(varargin)
10     col=varargin{1};
11     else
12     col='k';
13     end
14    
15     if ndims(xg)==2 & size(xg,1)==6*size(xg,2)
16     disp('1');
17     [nx ny nt]=size(xg);
18     x=permute( reshape(xg,[nx/6 6 ny]),[1 3 2]);
19     y=permute( reshape(yg,[nx/6 6 ny]),[1 3 2]);
20     [nx ny nt]=size(xg);
21     elseif ndims(xg)==3 & size(xg,2)==6
22     x=permute( X,[1 3 2]);
23     y=permute( Y,[1 3 2]);
24     [nx ny nt]=size(xg);
25     elseif ndims(xg)==3 & size(xg,3)==6
26     [nx ny nt]=size(xg);
27     x=xg;y=yg;
28     else
29     size(xg)
30     size(yg)
31     error('Dimensions should be 2 or 3 dimensions: NxNx6, 6NxN or Nx6xN');
32     end
33    
34    
35     for sh=-180:90:180;
36     for k=1:6;
37     h=line( longitude(x(:,1,k))+sh, y(:,1,k));set(h,'Color',col);
38     h=line( longitude(x(1,:,k))+sh, y(1,:,k));set(h,'Color',col);
39     end
40     end

  ViewVC Help
Powered by ViewVC 1.1.22