/[MITgcm]/MITgcm_contrib/gael/matlab_class/gcmfaces_convert/convert2southern.m
ViewVC logotype

Contents of /MITgcm_contrib/gael/matlab_class/gcmfaces_convert/convert2southern.m

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


Revision 1.1 - (show annotations) (download)
Sun May 2 21:10:33 2010 UTC (15 years, 2 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint65x, checkpoint65r, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, HEAD
Error occurred while calculating annotation data.
migration of conversion routines to gcmfaces_convert

1 function [fld0]=convert2southern(fld00,varargin);
2
3 if fld00.nFaces==1; fld00=convert2cube(fld00); end;
4
5 n1=size(fld00{1},1);
6 n2=size(fld00{1},2);
7 n3=size(fld00{1},3);
8 n4=size(fld00{1},4);
9
10 %rotate the cube to bring f6 to f3 position
11 fld11=fld00; fld11.nFaces=6;
12 fld11{1}=flipdim(permute(fld00{5},[2 1 3 4]),1);
13 fld11{2}=flipdim(permute(fld00{4},[2 1 3 4]),1);
14 if ~isempty(fld00.f6);
15 fld11{3}=fld00{6};
16 else;
17 fld11{3}=NaN*zeros(n1,n1,n3,n4);
18 end;
19 fld11{4}=flipdim(permute(fld00{2},[2 1 3 4]),2);
20 fld11{5}=flipdim(permute(fld00{1},[2 1 3 4]),2);
21 if ~isempty(fld00.f3);
22 fld11{6}=fld00{3};
23 else;
24 fld11{6}=NaN*zeros(n1,n1,n3,n4);
25 end;
26
27 %then call convert2arctic
28 [fld0]=convert2arctic(fld11,varargin{:});
29

  ViewVC Help
Powered by ViewVC 1.1.22