Back to home page

MITgcm

 
 

    


Warning, /verification/tutorial_global_oce_latlon/diags_matlab/mit_globaluvwmovie.m is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
051ee7f715 Jean*0001 % plot velocity fields
                0002 
                0003 figure
                0004 colormap(jet0);
                0005 for k=pkt;
                0006   clear uc vc
                0007   uc(1:grd.nx-1,:) = .5*(u(1:grd.nx-1,:,iz,k)+u(2:grd.nx,:,iz,k));
                0008   uc(grd.nx,:)     = .5*(u(1,:,iz,k)+u(grd.nx,:,iz,k));
                0009   uc = uc.*grd.cmask(:,:,iz);
                0010   vc(:,1:grd.ny-1) = .5*(v(:,1:grd.ny-1,iz,k)+v(:,2:grd.ny,iz,k));
                0011   vc(:,grd.ny)     = .5*v(:,grd.ny,iz,k);
                0012   vc = vc.*grd.cmask(:,:,iz);
                0013   imagesc(grd.lonc,grd.latc,w(:,:,iz,k)'); caxis([-1 1]*max(abs(caxis)));
                0014 % hold on,NaNquiver(grd.xc,grd.yc,uc,vc); hold off
                0015   hold on, quiver(grd.xc,grd.yc,uc,vc); hold off
                0016   axis xy; axis image
                0017   set(gca,'clipping','off')
                0018   set(gca,'xlim',[0 360])
                0019 %  colorbar('h')
                0020   title(['velocity field in 3D, depth = ' num2str(grd.zc(iz)) ]) 
                0021   suptitle(['experiment ' dname ', timestep = ' num2str(timesteps(k)) ...
                0022            ', ' tuname ' = ' num2str(tim(k))])
                0023   drawnow; pause(delay);
                0024 end
                0025