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

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

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


Revision 1.1 - (show annotations) (download)
Tue Jun 21 21:16:24 2011 UTC (14 years, 1 month ago) by gforget
Branch: MAIN
- remove the blueprint gcmfaces argument in convert2array.m.
- move convert2array.m to gcmfaces_convert, so that it is
	seen even for both input format (gcmfaces and array).

1 function [a]=convert2array(b,varargin);
2 %object: gcmfaces to array format conversion (if gcmfaces input)
3 % or: array to gcmfaces format conversion (if array input)
4 %
5 %notes: - if array input, the gcmfaces format will be the one of mygrid.XC, so
6 % the array input must have originally been created according to convert2array
7 % - global mygrid parameters (mygrid.XC.gridType) are used
8
9 input_list_check('convert2array',nargin);
10
11 global mygrid;
12
13 if strcmp(mygrid.XC.gridType,'llc');
14 a=convert2array_llc(b);
15 elseif strcmp(mygrid.XC.gridType,'cube');
16 a=convert2array_cube(b);
17 elseif strcmp(mygrid.XC.gridType,'llpc');
18 a=convert2array_llpc(b);
19 elseif strcmp(mygrid.XC.gridType,'ll');
20 a=convert2array_ll(b);
21 else;
22 error(['convert2array not implemented for ' mygrid.XC.gridType '!?']);
23 end;
24

  ViewVC Help
Powered by ViewVC 1.1.22