% load Grid grd=rnt_gridload('Chile_10km_conf.txt'); % Check the bathymetry and resolution figure; % create a figure opt.shading='flat'; rnt_plcm(grd.h, grd, opt); % plot bathymetry using M_Map toolbox clf; rnt_plcm(1./grd.pm/1000, grd); % Horizontal resolution clf;rnt_plc2(grd.h, grd, 0, 7, 0,0); % alternative is not to use m_map % create a ctl for output files=rnt_getfilenames('.','ofes-extract-'); % This JUST makes a list ctl=rnt_timectl(files, 'ocean_time', 'r',[1999 0 0]); % 'r' means a 360 days calendar % Load variable: Temperature for June 2000 ind=find(ctl.year==2000 & ctl.month==5); VAR=rnt_loadvar(ctl,ind,'salt'); % Plot the SST figure; rnt_plcm(VAR(:,:,end),grd) % Make a plot of the 100 m temperature zeta=rnt_loadvar(ctl, ind, 'zeta'); [zr,zw,hz]=rnt_setdepth(zeta, grd); % configuration of the sigma-coord depths=[-50 -100 -200 -1000]; VARz=rnt_2z(VAR, zr, depths); figure; rnt_plcm(VARz(:,:,2), grd); % Vertical sections figure; j=find (grd.latr(1,:) > -37); j=j(1); rnt_sectx(VAR, j , grd); % in the zonal direction % Cycle cycle of Surface Temperature SST=rnt_loadvar_segp(ctl,1:length(ctl.datenum),'temp',1:grd.Lp,1:grd.Mp,grd.N); % Extract only the SURFACE (grd.N) temperature [SST_anom SST_mean]=RemoveSeas(SST,ctl.month,3); % seperate anomaly from monthly mean size(SST_mean) SST_mean=SST_mean-repmat(mean(SST_mean,3),[1 1 12]); % Here I just remove the spatial mean to the seasonal cycle mfig; % plot each month for k=1:12 subplot(4,3,k) rnt_plcm(SST_mean(:,:,k),grd) % if you see white, you may use rnt_plc2 or make 12 figures separately caxis([-4 4]);colorbar % put all figure with same color bar title(datestr(ctl.datenum(k),'mmm')) % this is just fancy for your title :p end for in=1999:2000 ind=find(ctl.year==in & ctl.month==11); VAR=rnt_loadvar(ctl,ind,'temp'); % Plot the SST figure rnt_plc2(VAR(:,:,end),grd,0,7,0,0) hold on caxis([8 26]) colorbar hold on V=[12 14 16 18] [cs,h]=contour(grd.lonr,grd.latr,VAR(:,:,end),V,'-k'); hold on clabel(cs,h,'fontsize',14,'color','k','rotation',0); hold on end