/[MITgcm]/MITgcm_contrib/afe/osse_MkII/utils/cart2cyluv.m
ViewVC logotype

Diff of /MITgcm_contrib/afe/osse_MkII/utils/cart2cyluv.m

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

revision 1.1 by afe, Thu Feb 17 22:42:13 2005 UTC revision 1.2 by afe, Thu Jul 7 15:48:22 2005 UTC
# Line 9  stepy=(y+1)/(y); Line 9  stepy=(y+1)/(y);
9  [Y,X] = meshgrid(-(x)/2:stepx:(x)/2,-(y)/2:stepy:(y)/2);  [Y,X] = meshgrid(-(x)/2:stepx:(x)/2,-(y)/2:stepy:(y)/2);
10  [theta,rho] = cart2pol(X,Y);  [theta,rho] = cart2pol(X,Y);
11    
12  azimv=u.*cos(theta)+v.*-sin(theta);  
13  radialv=u.*sin(theta)+v.*cos(theta);  % switches to increasing c-clockwise instead of clockwise
14    theta=-theta;
15    
16    %original
17    %azimv=u.*cos(theta)+v.*-sin(theta);
18    %radialv=u.*sin(theta)+v.*cos(theta);
19    
20    % 2nd try
21    %azimv=u.*cos(theta)+v.*sin(theta);
22    %radialv=u.*sin(theta)+v.*-cos(theta);
23    
24    %azimv=u.*-cos(theta); %good
25    %radialv=u.*-sin(theta);%good
26    
27    %azimv=v.*-sin(theta); % good
28    %radialv=v.*cos(theta); % good
29    
30    % 3rd's the charm
31    azimv=u.*-cos(theta)+v.*-sin(theta);
32    radialv=u.*-sin(theta)+v.*cos(theta);
33    
34  theta=(theta./(pi*2)+0.5).*(size(thetai,2));  theta=(theta./(pi*2)+0.5).*(size(thetai,2));
35  rho=max(rhoi)*rho/((x)/2);  rho=max(rhoi)*rho/((x)/2);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22