0001 function [Plots]=do_surface_plot(plotOPTS,FVCOM)
0002
0003 m_mappath;
0004
0005 figure(plotOPTS.figure); clf
0006 m_proj('UTM','lon',[plotOPTS.range_lon],'lat',[plotOPTS.range_lat],'zon',plotOPTS.zone,'ell','grs80')
0007 m_grid('box','fancy')
0008
0009
0010 X=plotOPTS.mesh.x;
0011 Y=plotOPTS.mesh.y;
0012 for aa=1:length(plotOPTS.Time_record)
0013
0014 hold on
0015 try
0016
0017 Plots(1).handles=patch('Vertices',[X,Y],'Faces',plotOPTS.mesh.tri,...
0018 'Cdata',squeeze(FVCOM.(plotOPTS.var_plot)(:,plotOPTS.nz_plot,aa)),...
0019 'edgecolor','interp','facecolor','interp');
0020 catch
0021
0022 Plots(1).handles=patch('Vertices',[X,Y],'Faces',plotOPTS.mesh.tri,...
0023 'Cdata',squeeze(FVCOM.(plotOPTS.var_plot)(:,aa)),...
0024 'edgecolor','interp','facecolor','interp');
0025 end
0026 fprintf('Time step %i of %i\n',aa,length(plotOPTS.Time_record))
0027 caxis(plotOPTS.clims)
0028 colorbar
0029 set(get(colorbar,'YLabel'),'String',plotOPTS.var_plot)
0030
0031 if plotOPTS.do_mesh
0032
0033 [X,Y]=m_ll2xy(plotOPTS.mesh.lon,plotOPTS.mesh.lat,'clip','on');
0034 patch('Vertices',[X,Y],'Faces',plotOPTS.mesh.tri,...
0035 'EdgeColor',[0.6 0.6 0.6],'FaceColor','none'); hold on
0036 end
0037
0038
0039
0040
0041 pause(plotOPTS.pause)
0042 if aa~=length(plotOPTS.Time_record)
0043 delete(Plots(1).handles)
0044 end
0045 end
0046
0047 return
0048