0001 function [Plots]=do_surface_plotVelMatlabMap(plotOPTS,FVCOM)
0002
0003
0004 figure(plotOPTS.figure)
0005
0006 clf
0007 axesm('mercator','MapLatLimit',plotOPTS.range_lat,'MapLonLimit',[plotOPTS.range_lon],'MeridianLabel','on',...
0008 'ParallelLabel','on','MLineLocation',[0.1],'PLineLocation',[0.1],'LabelUnits','dm')
0009
0010
0011 if (isfield(plotOPTS,'coastline_file') && ~isempty(plotOPTS.coastline_file) )
0012 coast=load(plotOPTS.coastline_file);
0013 geoshow([coast.ncst(:,2)],[coast.ncst(:,1)],'Color','black')
0014
0015 end
0016
0017 mstruct = gcm;
0018
0019
0020 [X, Y] = mfwdtran(mstruct,plotOPTS.mesh.lat, plotOPTS.mesh.lon);
0021
0022
0023 if isfield(plotOPTS,'Time_record') & isfield(FVCOM,'mattime')
0024 if length(plotOPTS.Time_record)==1
0025 [dump,igoodT] = min(abs(plotOPTS.Time_record(1)-FVCOM.mattime));
0026 else
0027
0028 igoodT = find( plotOPTS.Time_record(1) <= FVCOM.mattime & FVCOM.mattime <= plotOPTS.Time_record(end) );
0029 end
0030 else
0031 igoodT=(1:length(FVCOM.(plotOPTS.var_plot)));
0032 end
0033
0034
0035 for aa=igoodT
0036
0037 hold on
0038 try
0039
0040 Plots(1).handles=patch('Vertices',[X,Y],'Faces',plotOPTS.mesh.tri,...
0041 'FaceVertexCdata',squeeze(FVCOM.(plotOPTS.var_plot)(:,plotOPTS.nz_plot,aa)),...
0042 'CDataMapping','scaled','edgecolor','none','FaceColor','flat');
0043
0044 catch
0045
0046 Plots(1).handles=patch('Vertices',[X,Y],'Faces',plotOPTS.mesh.tri,...
0047 'FaceVertexCdata',squeeze(FVCOM.(plotOPTS.var_plot)(:,aa)),...
0048 'CDataMapping','scaled','edgecolor','none','FaceColor','flat');
0049
0050 end
0051 fprintf('Time step %i of %i\n',aa,length(plotOPTS.Time_record))
0052 display(['Time ',datestr(FVCOM.mattime(aa))])
0053 caxis(plotOPTS.clims)
0054 colorbar
0055 set(get(colorbar,'YLabel'),'String',plotOPTS.var_plot,'FontSize',14)
0056
0057 if plotOPTS.do_mesh
0058
0059 Plots(plotOPTS.figure).mesh=patch('Vertices',[X,Y],'Faces',plotOPTS.mesh.tri,...
0060 'EdgeColor',[0.6 0.6 0.6],'FaceColor','none');hold on
0061
0062 end
0063 tightmap
0064
0065
0066
0067
0068
0069 pause(plotOPTS.pause)
0070
0071
0072
0073 end
0074
0075 return
0076