function [kp, km] = eqwave_k(m, omega)
% function [kp, km] = eqwave_k(m, omega)
%
% Equatorial wave dispersion relation.
% Companion function to eqwave.m
%
if m == -1,
   kp = omega;
   km = kp;
elseif m == 0,
   kp = omega - omega.^(-1);
   km = kp;
else
   kk1 = -0.5 * omega.^(-1);
   kk2 = sqrt(omega.^2 + 0.25 * omega.^(-2) - (2*m + 1));
   kp = kk1 + kk2;
   km = kk1 - kk2;
end

