/[MITgcm]/MITgcm_contrib/gael/matlab_class/@gcmfaces/mk3D.m
ViewVC logotype

Annotation of /MITgcm_contrib/gael/matlab_class/@gcmfaces/mk3D.m

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


Revision 1.1 - (hide annotations) (download)
Wed Feb 10 14:43:47 2010 UTC (15 years, 5 months ago) by gforget
Branch: MAIN
matlab_class core routine: gcmfaces methods

1 gforget 1.1 function a = mk3D(b,c)
2    
3     a=c;
4    
5     if isa(b,'gcmfaces');
6     %go from 2D field to 3D field
7     for kk=1:size(a.f1,3)
8     for iFace=1:a.nFaces;
9     iF=num2str(iFace);
10     eval(['a.f' iF '(:,:,kk)=b.f' iF '(:,:);']);
11     end;
12     end;
13     elseif isa(b,'double');
14     for kk=1:size(a.f1,3)
15     for iFace=1:a.nFaces;
16     iF=num2str(iFace);
17     eval(['a.f' iF '(:,:,kk)=b(kk);']);
18     end;
19     end;
20     else
21     error('indexing not supported by gcmfaces objects')
22     end
23    
24    

  ViewVC Help
Powered by ViewVC 1.1.22