--- MITgcm_contrib/osse/utils/cyl2cart.m 2004/06/08 14:14:44 1.1 +++ MITgcm_contrib/osse/utils/cyl2cart.m 2005/01/13 15:50:36 1.3 @@ -5,6 +5,7 @@ % c is a 2-D or 3-D scalar or z-vector field % xi,yi are vectors of the new regular lat-lon grid to interpolate to. % z is the interpolated data with dimensions of size(xi) by size(yi). +% theta=0 is at 12 o'clock. % % e.g. % >> t=rdmds('Ttave.0000513360'); @@ -16,7 +17,6 @@ [theta rho nz]=size(c); [RHO,THETA] = meshgrid(1:rho,-pi+2*pi/theta:2*pi/theta:pi); [x,y] = pol2cart(THETA,RHO); -%[nx ny nz]=size(c); nx=theta;ny=rho; X=reshape(x,[1 nx*ny]); @@ -26,7 +26,6 @@ for k=1:nz; C=reshape(c(:,:,k),[1 nx*ny]); z(:,:,k)=griddata(Y,X,C,yi,xi',varargin{:}); -% z(:,:,k)=griddata_fast(del,[C C(il) C(ig)],varargin{:}); end % k % Split vertical and time dimensions