| 23 | [ntheta nrho nz]=size(thetav); | [ntheta nrho nz]=size(thetav); | 
| 24 | [RHO,THETA,NZ] = meshgrid(1:nrho,-pi+2*pi/ntheta:2*pi/ntheta:pi,1:nz); | [RHO,THETA,NZ] = meshgrid(1:nrho,-pi+2*pi/ntheta:2*pi/ntheta:pi,1:nz); | 
| 25 | [x,y] = pol2cart(THETA(:,:,1),RHO(:,:,1)); | [x,y] = pol2cart(THETA(:,:,1),RHO(:,:,1)); | 
|  | %[nx ny nz]=size(c); |  | 
| 26 | nx=ntheta;ny=nrho; | nx=ntheta;ny=nrho; | 
| 27 |  |  | 
| 28 | % break out components | % break out components | 
|  | %vv=-(thetav.*-cos(THETA)+rhov.*sin(THETA)); |  | 
|  | %uv=-(thetav.*-sin(THETA)+rhov.*cos(THETA)); |  | 
| 29 | uv=thetav.*cos(THETA)+rhov.*sin(THETA); | uv=thetav.*cos(THETA)+rhov.*sin(THETA); | 
| 30 | vv=thetav.*-sin(THETA)+rhov.*cos(THETA); | vv=thetav.*-sin(THETA)+rhov.*cos(THETA); | 
|  | %uv=thetav.*cos(THETA); %+rhov.*sin(THETA); |  | 
|  | %vv=thetav.*-sin(THETA); %+rhov.*cos(THETA); |  | 
|  | %uv=rhov.*sin(THETA); |  | 
|  | %vv=rhov.*cos(THETA); |  | 
|  |  |  | 
| 31 |  |  | 
| 32 | X=reshape(x,[1 nx*ny]); | X=reshape(x,[1 nx*ny]); | 
| 33 | Y=reshape(y,[1 nx*ny]); | Y=reshape(y,[1 nx*ny]); | 
| 38 | VV=reshape(vv(:,:,k),[1 nx*ny]); | VV=reshape(vv(:,:,k),[1 nx*ny]); | 
| 39 | u(:,:,k)=griddata(Y,X,UV,yi,xi',varargin{:}); | u(:,:,k)=griddata(Y,X,UV,yi,xi',varargin{:}); | 
| 40 | v(:,:,k)=griddata(Y,X,VV,yi,xi',varargin{:}); | v(:,:,k)=griddata(Y,X,VV,yi,xi',varargin{:}); | 
|  | % z(:,:,k)=griddata_fast(del,[C C(il) C(ig)],varargin{:}); |  | 
| 41 | end % k | end % k | 
| 42 |  |  | 
| 43 | % Split vertical and time dimensions | % Split vertical and time dimensions |