function [d_L,d_G]=flowdir(W_L,W_G)
%   Function that computes flow directions based on momentum input 
%   for a staggered grid scheeme.
%
%   Written by Espen Storkaas Jan 16th 2003
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

d_L=zeros(size(W_L));d_G=zeros(size(W_G));
d_L(find(imag(sqrt(W_L))))=1;
d_G(find(imag(sqrt(W_G))))=1;