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

Annotation of /MITgcm_contrib/gael/matlab_class/gcmfaces_convert/convert2pcol.m

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


Revision 1.1 - (hide annotations) (download)
Wed Jun 22 02:13:46 2011 UTC (14 years, 1 month ago) by gforget
Branch: MAIN
- convert2pcol.m and convert2vector.m : as done earlier for convert2array.m,
	simplify the logic, add help section, move routines to gcmfaces_convert
- convert2pcol_cube.m etc., line_greatC_TUV_MASKS_v3, input_list_check.m : update accordingly

1 gforget 1.1 function [X,Y,FLD]=convert2pcol(varargin);
2     %object: gcmfaces to 'pcolor format' conversion
3     %inputs: x is longitude (e.g. mygrid.XC)
4     % y is latitude (e.g. mygrid.YC)
5     % fld is the 2D field of interest (e.g. mygrid.hFacC(:,:,1))
6     %outputs: X,Y,FLD are array versions of x,y,fld
7     %
8     %note: this function is designed so that one may readily
9     % plot the output in geographic coordinates
10     % using e.g. 'figure; pcolor(X,Y,FLD);'
11    
12     input_list_check('convert2pcol',nargin);
13    
14     c=varargin{1};
15    
16     if strcmp(c.gridType,'llc');
17     [X,Y,FLD]=convert2pcol_llc(varargin{:});
18     elseif strcmp(c.gridType,'cube');
19     [X,Y,FLD]=convert2pcol_cube(varargin{:});
20     elseif strcmp(c.gridType,'llpc');
21     [X,Y,FLD]=convert2pcol_llpc(varargin{:});
22     elseif strcmp(c.gridType,'ll');
23     [X,Y,FLD]=convert2pcol_ll(varargin{:});
24     else;
25     error(['convert2pcol not implemented for ' c.gridType '!?']);
26     end;
27    

  ViewVC Help
Powered by ViewVC 1.1.22