function plot_m3d(e,g);
e=read_m3d('OBS/UV_INTEG.m3d');
e1=read_m3d('CRUISE_Q5.1/UV_INTEG-Q5.m3d');
%e2=read_m3d('CRUISE_Q5.2/UV_INTEG-Q5.m3d');
%e3=read_m3d('CRUISE_Q5.3/UV_INTEG-Q5.m3d');

e.z=e.x+i*e.y;
[m,j]=unique(e.z);
nm=0;
so=0;
for k=1:length(j)
    kk=find(e.z==m(k));
    if length(kk)>1,
        nm=nm+1;
        x(nm).x=e.x(kk)
        x(nm).y=e.y(kk)
        x(nm).u=e.u(kk)
        x(nm).v=e.v(kk)
        x(nm).yrday=e.yrday(kk)
    else
        so=so+1;
        s.x(so)=e.x(kk);
        s.y(so)=e.y(kk);
        syrday(so)=e.yrday(kk);
        s.u(so)=e.u(kk);
        s.v(so)=e.v(kk);
    end
end
ax=[min(e.yrday),max(e.yrday),min([e.u;e.v]),max([e.u;e.v])]


figure;
NM=length(x);
for m=1:length(x);
    subplot(NM,1,m);
    [xx,j]=sort(x(m).yrday);
    plot(x(m).yrday(j),x(m).u,'r');
    hold on;
    plot(x(m).yrday(j),x(m).v,'b');
    axis(ax);
end
figure;
a=20000;
e=[g.e,g.e(:,1)]';
patch(g.x(e),g.y(e),g.z(e));shading interp;hold on;colorbar 'v';
quiver(s.x ,s.y , a*s.u , a*s.v ,0,'k');axis equal