function []=arrow(loc,u,linetype,coortype)
%		function []=arrow(loc,u,linetype,coortype)
%		draws an arrow with its tail at loc
%		and 1) cartiesian components u [coortype= blank]
%		or  2) polar components r & theta [coortype='polar']
%		or  3) geo polar components r & theta [coortype='geo']


           xa=loc(1);  
           ya=loc(2);
           if nargin == 4,
             if coortype(1:3) == 'geo', u(2)=90 - u(2); end;
             ui=u(1)*cos(u(2)*pi/180);
             vi=u(1)*sin(u(2)*pi/180);
           else,
             ui=u(1);
             vi=u(2);
           end,
%          ui=u(1)*fac1;
%		 vi=u(2)*fac2;
           if sqrt(ui^2+vi^2)<0.003
                  angle=10;
           else
			   angle=5;
           end
           [ur1,vr1]=rot(0.75*ui,0.75*vi,angle);
           [ur2,vr2]=rot(0.75*ui,0.75*vi,-angle);
	      plot([xa,xa+ui,xa+ur1,xa+ui,xa+ur2],..
                [ya,ya+vi,ya+vr1,ya+vi,ya+vr2],linetype);

