--- MITgcm/utils/matlab/uvcube2latlon.m 2001/08/28 18:16:40 1.4 +++ MITgcm/utils/matlab/uvcube2latlon.m 2004/06/04 17:03:50 1.5 @@ -1,4 +1,4 @@ -function [U,V] = uvcube2latlon(LON,LAT,u,v,xc,yc) +function [U,V,ub,vb] = uvcube2latlon(LON,LAT,u,v,xc,yc) % [ui,vi]=cube2latlon(x,y,u,v,xi,yi); % % Re-grids model output on expanded spherical cube to lat-lon grid. @@ -15,7 +15,7 @@ % >> xi=-179:2:180;yi=-89:2:90; % >> [ui,vi]=uvcube2latlon(x,y,u,v,xi,yi); % -% $Header: /home/ubuntu/mnt/e9_copy/MITgcm/utils/matlab/Attic/uvcube2latlon.m,v 1.4 2001/08/28 18:16:40 adcroft Exp $ +% $Header: /home/ubuntu/mnt/e9_copy/MITgcm/utils/matlab/Attic/uvcube2latlon.m,v 1.5 2004/06/04 17:03:50 adcroft Exp $ NN=size(u); [nnx ny nz]=size(u); @@ -51,10 +51,11 @@ end end -U=reshape(U,[nnx NN(2:end)]); -V=reshape(V,[nnx NN(2:end)]); +ub=reshape(U,[nnx NN(2:end)]); +vb=reshape(V,[nnx NN(2:end)]); -% xc=-179:2:179; -% yc=-89:2:89; -U=cube2latlon(LON,LAT,U,xc,yc); -V=cube2latlon(LON,LAT,V,xc,yc); +%U=cube2latlon(LON,LAT,U,xc,yc); +%V=cube2latlon(LON,LAT,V,xc,yc); +del=cube2latlon_preprocess(LON,LAT,xc,yc); +U=cube2latlon_fast(del,ub); +V=cube2latlon_fast(del,vb);