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

Contents 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.2 - (show annotations) (download)
Sat Jan 18 21:11:00 2014 UTC (11 years, 5 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint65x, checkpoint65r, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, HEAD
Changes since 1.1: +5 -1 lines
- convert2array.m : hook to xtrct
- convert2array_llc.m : remove loops for speed up
- convert2pcol.m : hook to xtrct
- convert2pcol_cube.m, convert2pcol_llc.m :
  replicate field to facilitate Pacific centric maps

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 gcmfaces_global;
15
16 c=varargin{1};
17
18 if isfield(mygrid,'xtrct');
19 [X,Y,FLD]=convert2pcol_xtrct(varargin{:});
20 elseif strcmp(c.gridType,'llc');
21 [X,Y,FLD]=convert2pcol_llc(varargin{:});
22 elseif strcmp(c.gridType,'cube');
23 [X,Y,FLD]=convert2pcol_cube(varargin{:});
24 elseif strcmp(c.gridType,'llpc');
25 [X,Y,FLD]=convert2pcol_llpc(varargin{:});
26 elseif strcmp(c.gridType,'ll');
27 [X,Y,FLD]=convert2pcol_ll(varargin{:});
28 else;
29 error(['convert2pcol not implemented for ' c.gridType '!?']);
30 end;
31

  ViewVC Help
Powered by ViewVC 1.1.22