Skip to content

Commit

Permalink
moves beta term from calcN to LC
Browse files Browse the repository at this point in the history
  • Loading branch information
navidcy committed Jan 24, 2018
1 parent a856e88 commit 505c665
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/barotropicqg/ACConelayer_JPO2018.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ using FourierFlows, PyPlot, JLD2
import FourierFlows.BarotropicQG
import FourierFlows.BarotropicQG: energy, enstrophy

nx = 128*4
nx = 128*2
ν = 8.0e-10
νn = 2
f0 = -1.0

β = 0*1.4015
β = 1.4015
Lx = 2π
μ = 1.0e-2
F = 0.0012
Expand Down
4 changes: 2 additions & 2 deletions src/physics/barotropicqg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ end

# Equations
function Equation(p::Params, g::TwoDGrid)
LC = -p.μ - p.ν * g.KKrsq.^p.νn
LC = -p.μ - p.ν * g.KKrsq.^p.νn + im*p.beta*g.Kr.*g.invKKrsq
FourierFlows.Equation{2}(LC, calcN!)
end

Expand Down Expand Up @@ -83,7 +83,7 @@ function calcN!(N::Array{Complex{Float64}, 2}, sol::Array{Complex{Float64}, 2},
A_mul_B!(v.vqh, g.rfftplan, v.vq)

# Nonlinear term for q
@. N = -im*g.kr*v.uUqh - im*g.l*v.vqh - p.beta*v.vh
@. N = -im*g.kr*v.uUqh - im*g.l*v.vqh

# 'Nonlinear' term for U with topographic correlation.
# Note: < v*eta > = sum( conj(vh)*eta ) / (nx^2*ny^2) if fft is used
Expand Down

0 comments on commit 505c665

Please sign in to comment.