/[MITgcm]/MITgcm_contrib/eh3/llc/ecco-godae/climatology/label_edges.m
ViewVC logotype

Contents of /MITgcm_contrib/eh3/llc/ecco-godae/climatology/label_edges.m

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


Revision 1.3 - (show annotations) (download)
Fri May 4 15:31:38 2007 UTC (18 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +0 -0 lines
move those scripts back here (my mistake).

1 function []=label_edges(nf,mg,r_or_l);
2
3 if strcmp(r_or_l,'local')
4 for i=1:4
5 ls=mg(nf).adj(i).localStart;
6 le=mg(nf).adj(i).localEnd;
7 xmid=ls(1)+[(le(1)-ls(1)+1)/2];
8 ymid=ls(2)+[(le(2)-ls(2)+1)/2];
9 ts=sprintf('%d:%d',nf,i);
10 text(xmid,ymid,ts);
11 end
12 end
13
14 if strcmp(r_or_l,'remote')
15 for i=1:length(mg)
16 for a=1:length(mg(i).adj)
17 if mg(i).adj(a).remoteFacet == nf
18 ls=mg(i).adj(a).remoteStart;
19 le=mg(i).adj(a).remoteEnd;
20 xmid=ls(1)+[(le(1)-ls(1)+1)/2];
21 ymid=ls(2)+[(le(2)-ls(2)+1)/2];
22 ts=sprintf('%d:%d',i,a);
23 text(xmid,ymid,ts);
24 fprintf(1,'(%d,%d) to (%d,%d) ==> (%d,%d) %s\n',...
25 ls(1),ls(2),...
26 le(1),le(2),...
27 xmid,ymid,ts);
28 end
29 end
30 end
31 end
32
33 return

  ViewVC Help
Powered by ViewVC 1.1.22