k2: wavespace over 2D domain
function jacobian(nx,ny,dx,dy,wf,k2)
s = Array{Float64}(undef, nx+2, ny+2)
sf = Array{Complex{Float64}}(undef,nx,ny)
w = Array{Float64}(undef, nx+2, ny+2)
data = Array{Complex{Float64}}(undef,nx,ny)
jf = Array{Complex{Float64}}(undef,nx,ny)
w[2:nx+1, 2:ny+1] = real(ifft(wf)) # convert vorticity to physical space