function contourSW06NGDC_func(latd,lond,contours) % -------------------------------------------------- % contourSW06NGDC_func % % funtion contourSW06NGDC_func(latd,lond,contours) % % contour for SW06 using NDGC database % Tim Duda WHOI % -------------------------------------------------- if (nargin ~=3 ), fprintf('Error: not enough args for contourSW06NGDC_func %d\n',nargin); return; end if(0) load NGDCSW06.mat lat=loladep(:,2); lon=loladep(:,1); z=loladep(:,3)* -(1); %lat, long spacing 3 sec (20 per minute) xsize=length(sort(unique(lon))); % 1801 ysize=length(sort(unique(lat))); % 1601 lar=reshape(lat,xsize,ysize); lor=reshape(lon,xsize,ysize); zr=reshape(z,xsize,ysize); end load bathtightgrid.mat; % contours=[ 0 40:10:120 140:20:200 ] % contours = [ 40:10:100 120 150 250 500 1000 ] % del 1000 % contours = [ 50 80 100 250 500 1000 ] figure(1); clf % m_proj('mercator','lon',[ -73-24/60 -72-36/60],'lat',[38+45/60 39+20/60]); % m_proj('mercator','lon',[ -(73+24/60) -(72+46/60)],'lat',[38+48/60 39+18/60]); m_proj('mercator','lon',[ lond(1), lond(2)],'lat',[latd(1), latd(2)] ); set(gca,'fontsize',14) colormap('summer') % [c1,h1]=m_tbase('contourf',-contours); [cs,hs]=m_contour(lor,lar,zr, contours ); %% [cs,hs]=m_contourf(lor,lar,zr, contours ); m_grid('linestyle',':','box','fancy','tickdir','in','linewidth',3); area2=m_line(-(73+5/60), 39,'marker','diamond','markersize',14 ); area1=m_line(-(72+53/60), 39+15/60,'marker','diamond','markersize',14 ); set(area1,'markerfacecolor','b','visible','off') set(area2,'markerfacecolor','b','visible','off') %SWARM locations From Apel et al paper %whoi400=m_line(-(73+13.09/60), 39+24.69/60,'marker','o','markersize',8,'markerfacecolor','b'); %whoiVLA=m_line(-(72+55.05/60), 39+14.26/60,'marker','o','markersize',8,'markerfacecolor','b' ); %nrlVLA=m_line(-(72+49.88/60), 39+11.73/60,'marker','diamond','markersize',8,'markerfacecolor','b'); %swarmline=m_line( [ -(73+13.09/60) -(72+49.88/60)], [ 39+24.69/60 39+11.73/60]); % return % clabel is not working in matlab 7.1 disp('label box now') lr=clabel(cs,hs,'manual'); for ii=1:length(lr) set(lr(ii),'fontsize',12); end return % make three transects if(0) for ii=1:3 if(ii ==1) offla=38+55/60; offlo=-(72+56/60); inla=39+7/60; inlo=-(73+18/60) figure(3);clf elseif( ii ==2) offla=39+12/60; offlo=-(72+30/60); inla=39+22/60; inlo=-(73+0/60) else offla=39+8/60; offlo=-(72+43/60); inla=39+18/60; inlo=-(73+5/60) end yli= linspace( offla, inla, 240) ; xli= linspace( offlo, inlo,240) ; zli=interp2( lor',lar',zr',xli,yli); figure(1) m_line(xli,yli,'color','r','linewidth',ii-.5) figure(3) plot(sqrt( ( (xli-xli(1)) *1.852*60*cos(39*pi/180) ).^2 + ... ((yli-yli(1)) *1.852*60).^2 ) ,zli,'linewidth', ii-.5,'color','r') hold on ylabel('depth (m)') axis ij xlabel('distance (km)') end end % figure(1) % colormap summer % caxis([ 50 3000])