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

Annotation of /MITgcm_contrib/gael/matlab_class/gcmfaces_convert/convert2pcol_llpc.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_llpc(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     %ASSEMBLE "LATLON" FACES:
7     %----------------------
8     X=[x{1};x{2};sym_g(x{3},7,0); sym_g(x{4},7,0)];
9     Y=[y{1};y{2};sym_g(y{3},7,0); sym_g(y{4},7,0)];
10     FLD=[fld{1}(:,:,k3,k4);fld{2}(:,:,k3,k4);sym_g(fld{3}(:,:,k3,k4),7,0);sym_g(fld{4}(:,:,k3,k4),7,0)];
11    
12     %FIX DATE CHANGE LINE IN LATLON PART:
13     %--------------------------------------
14     X=circshift(X,[55 0]);
15     Y=circshift(Y,[55 0]);
16     FLD=circshift(FLD,[55 0]);
17    
18     %ADD POINTS TO FIX DATE CHANGE LINE ELSEWHERE:
19     %---------------------------------------------
20     X=[X(353:end,:);X;X(1:32,:)];
21     Y=[Y(353:end,:);Y;Y(1:32,:)];
22     FLD=[FLD(353:end,:);FLD;FLD(1:32,:)];
23    
24     tmp1=X(1:64,:); tmp1(tmp1>0)=tmp1(tmp1>0)-360; X(1:64,:)=tmp1;
25     tmp1=X(353:end,:); tmp1(tmp1<0)=tmp1(tmp1<0)+360; X(353:end,:)=tmp1;
26    
27    

  ViewVC Help
Powered by ViewVC 1.1.22