Skip to content
Discussion options

You must be logged in to vote

Hi @dlemasqu!

The problem is not with the dealiasing but I do thing that it stems from that line.
But the issue is that you have the @. at the front which implies that all methods and operations are to be applied element-wise. And thus you are trying to apply the rfft element-wise? I think that's the issue...

This MWE:

using GeophysicalFlows, Random, GLMakie

n = 128
L = 2π

forcing_wavenumber = 14.0 * 2π/L  # the forcing wavenumber, `k_f`, for a spectrum that is a ring in wavenumber space
forcing_bandwidth  = 1.5  * 2π/L  # the width of the forcing spectrum, `δ_f`

grid = TwoDGrid(nx=n, Lx=L)

K = @. sqrt(grid.Krsq)            # a 2D array with the total wavenumber

forcing_spectrum = @. e…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@navidcy
Comment options

@dlemasqu
Comment options

Answer selected by dlemasqu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants