clear all %file_name='box_spherical.3d.nc'; warning off all global nctbx_options; nctbx_options.theAutoNaN = 1; nch = netcdf('box_spherical.3d.nc'); bathy=nch{'bathymetry'}(:); temp=nch{'temp'}(:); lat=nch{'latc'}(:); lon=nch{'lonc'}(:); u1=nch{'uu'}(:); v1=nch{'vv'}(:); %tmax=121; scale=3; [tmax zn yn xn]=size(temp) tmax=1; plotlevel=2; for j=1:tmax h=figure(1); clf temp_t=squeeze(temp(j,plotlevel,:,:)); uu=squeeze(u1(j,plotlevel,:,:)); vv=squeeze(v1(j,plotlevel,:,:)); m_proj('mercator','lon',[lon(1) lon(xn)],'lat',[45.0 45.25]); m_grid('linest','none','tickdir','out'); colormap(jet); hold on m_contourf(lon,lat,temp_t,'LineStyle','none'); [LO,LA]=meshgrid(lon,lat); caxis([4 20]); m_quiver(LO(1:2:yn,1:2:xn),LA(1:2:yn,1:2:xn),uu(1:2:yn,1:2:xn),vv(1:2:yn,1:2:xn),scale,'color','k'); %pcolor(lon,lat,squeeze(temp_t)) %shading interp; %hold on %m_quiver(lon,lat,uu,vv,scale,'color','k'); title('bottom temperature in box spherical test case','fontsize',16) %xlabel('x /km','fontsize',14); %ylabel('y /km','fontsize',14); %axis equal %axis([0 100 0 30]); %caxis([4. 20.]); cb=colorbar('location','southoutside'); set(get(cb,'xlabel'),'string','Temperature /degreeC','fontsize',14) tmp=strcat('print -dpsc2',' /yourfolder/getm-cases/v1.6.x/box_spherical/',num2str(j+1000),'.eps'); eval(tmp); end