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

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

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


Revision 1.1 - (hide annotations) (download)
Sun May 2 21:10:33 2010 UTC (15 years, 2 months ago) by gforget
Branch: MAIN
migration of conversion routines to gcmfaces_convert

1 gforget 1.1 function [X,Y,FLD]=convert2pcol_ll(x,y,fld,varargin);
2    
3     if nargin>3; k3=varargin{1}; else; k3=1; end;
4     if nargin>4; k4=varargin{2}; else; k4=1; end;
5    
6     global regularizeXC;
7     if isempty(regularizeXC);
8     fprintf('\n\nconvert2pcol_ll.m init: by default gcmfaces assumes\n');
9     fprintf(' that XC is longitude in the [-180 180] range, and \n');
10     fprintf(' if XC shows values outside this range, gcmfaces \n');
11     fprintf(' will to enforce this convention in graphs. If this is \n');
12     fprintf(' inadequate, you may try to set regularizeXC to 0 below \n\n');
13     regularizeXC=1;
14     end;
15    
16     %ASSEMBLE "LATLON" FACES:
17     %----------------------
18     X=x{1}; Y=y{1}; FLD=fld{1}(:,:,k3,k4);
19    
20     %FIX DATE CHANGE LINE IN LATLON PART:
21     %--------------------------------------
22     if regularizeXC;
23     ii=max(find(X(:,1)<=180));
24     X=circshift(X,[-ii 0]); X(X>180)=X(X>180)-360;
25     Y=circshift(Y,[-ii 0]);
26     FLD=circshift(FLD,[-ii 0]);
27     end;
28    

  ViewVC Help
Powered by ViewVC 1.1.22