VMT_PlotTransCont

PURPOSE ^

No longer used in current version

SYNOPSIS ^

function VMT_PlotTransCont(z,A,V,var,zerosecq)

DESCRIPTION ^

 No longer used in current version
 This function plots contours for the variable 'var' for all the transects.

 (adapted from code by J. Czuba)

 P.R. Jackson, USGS, 12-10-08

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function VMT_PlotTransCont(z,A,V,var,zerosecq)
0002 % No longer used in current version
0003 % This function plots contours for the variable 'var' for all the transects.
0004 %
0005 % (adapted from code by J. Czuba)
0006 %
0007 % P.R. Jackson, USGS, 12-10-08
0008 
0009 
0010 
0011 %% Plot contours
0012 
0013 clvls = 60;
0014 
0015 switch var
0016     case{'primary'}  %Plots the primary velocity
0017         if zerosecq
0018             wtp=['A(zi).Comp.vp'];
0019             zmin=floor(nanmin(nanmin(V.vp)));
0020             zmax=ceil(nanmax(nanmax(V.vp)));
0021         else
0022             wtp=['A(zi).Comp.u'];
0023             zmin=floor(nanmin(nanmin(V.u)));
0024             zmax=ceil(nanmax(nanmax(V.u)));
0025         end
0026         zinc = (zmax - zmin) / clvls;
0027         zlevs = zmin:zinc:zmax;
0028     case{'secondary'} %Plots the secondary velocity
0029         if zerosecq
0030             wtp=['A(zi).Comp.vs'];
0031             zmax=ceil(max(abs(nanmin(nanmin(V.vs))),abs(nanmax(nanmax(V.vs)))));
0032         else
0033             wtp=['A(zi).Comp.v'];
0034             zmax=ceil(max(abs(nanmin(nanmin(V.v))),abs(nanmax(nanmax(V.v)))));
0035         end
0036         zmin=-zmax;
0037         zinc = (zmax - zmin) / clvls;
0038         zlevs = zmin:zinc:zmax;
0039     case{'vertical'} %Plots the vertical velocity
0040         wtp=['A(zi).Comp.w'];
0041         zmax=ceil(max(abs(nanmin(nanmin(V.w))),abs(nanmax(nanmax(V.w)))));
0042         zmin=-zmax;
0043         zinc = (zmax - zmin) / clvls;
0044         zlevs = zmin:zinc:zmax;
0045     case{'backscatter'} %Plots the backscatter
0046         wtp=['A(zi).Comp.mcsBack'];
0047         zmin=floor(nanmin(nanmin(V.mcsBack)));
0048         zmax=ceil(nanmax(nanmax(V.mcsBack)));
0049         zinc = (zmax - zmin) / clvls;
0050         zlevs = zmin:zinc:zmax;
0051     case{'mag'} %Plots the velocity magnitude
0052         wtp=['A(zi).Comp.mcsMag'];
0053         zmin=floor(nanmin(nanmin(V.mcsMag)));
0054         zmax=ceil(nanmax(nanmax(V.mcsMag)));
0055         zinc = (zmax - zmin) / clvls;
0056         zlevs = zmin:zinc:zmax;
0057     case{'dirdevp'} %Plots the directional deviation from the primary velocity
0058         wtp=['A(zi).Comp.mcsDirDevp'];
0059         zmax=ceil(max(abs(nanmin(nanmin(V.mcsDirDevp))),abs(nanmax(nanmax(V.mcsDirDevp)))));
0060         zmin=-zmax;
0061         zinc = (zmax - zmin) / clvls;
0062         zlevs = zmin:zinc:zmax;
0063 end
0064 
0065 
0066 
0067 
0068 
0069 
0070            
0071 figure1 = figure;
0072 
0073 for zi = 1 : z
0074 
0075     subplot(2,(rem(z,2)+z)/2,zi,'Parent',figure1,'YDir','reverse');
0076     % Plot Streamwise Velocity (u)
0077     hold on;
0078     box on
0079     xlim([nanmin(nanmin(V.mcsDist)) nanmax(nanmax(V.mcsDist))])
0080     %ylim([0 25])
0081     ylim([0 ceil(max(V.mcsBed))])
0082     contour(V.mcsDist,V.mcsDepth,eval(wtp(1,:)),zlevs,'Fill','on','Linestyle','none')
0083     %quiver(mcsDist,mcsDepth,-v,-w)
0084     plot(V.mcsDist(1,:),A(zi).Comp.mcsBed,'k')
0085     if zi == 1
0086         switch i
0087             case 1
0088                 title('Streamwise (Primary) Velocity, centimeters/second')
0089             case 2
0090                 title('Transverse (Secondary) Velocity, centimeters/second')
0091             case 3
0092                 title('Vertical Velocity, centimeters/second')
0093             case 4
0094                 title('Backscatter Intensity, dB')
0095             case 5
0096                 title('Velocity Magnitude (Primary and Secondary), centimeters/second')
0097             case 6
0098                 title('Deviation from Primary Flow Direction, degrees')
0099         end
0100     end
0101     if zi == ceil(z/2)
0102         ylabel('Depth, meters')
0103     end
0104     if zi == z
0105         xlabel('Distance, meters')
0106     end
0107     %set(gca,'DataAspectRatio',[4 1 1],'PlotBoxAspectRatio',[4 1 1])
0108     colorbar
0109     %caxis([-60 210])
0110     caxis([zmin zmax])
0111 end
0112 %     colorbar([0.6743 0.3586 0.01788 0.3184]);
0113

Generated on Thu 21-Aug-2014 10:40:31 by m2html © 2005