function [ ur, vr ] = cal_rot( u, v, amp, phi );
%--------------------------------------------------------------------------
% SYNOPSIS
%
%   [ur, vr] = cal_rot( u, v, amp, phi)
%
% DESCRIPTION
%
%   Rotate velocities in vectors U and V by angle PHI (specified in
%   degrees), and multiply them by amplitude factor AMP. Returns the new
%   eatsward and northward components
%---------------------------------------------------------------------------

a = abs(u + i*v);
p = angle(u + i*v);

ar = a * amp;
pr = p + phi * pi/180;;

ur = ar .* cos(pr);
vr = ar .* sin(pr);

return;

