function mdydx = mod_deriv(u,k)
% DERIV calculates the first derivative in Fourier space
  mdydx = real(ifft(abs(k).*fft(u)));
end
