-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add finite depth parameter to SQG model (surfaceqg.jl
)
#374
Comments
Nice! It might make sense to build this feature as an option to precompute this function and store it in an array. That would be more flexible and also may save computational cost since |
I've made a working version of this here. A few notes:
|
Cool! It's much easier to see the differences you suggested once you open a PR. But yes, the if-else statement should be replaced with multiple dispatch on the type of Params. |
PR here. |
Can we combine the two definitions (finite and infinite depth) given that: julia> tanh(Inf)
1.0 ? What if there is a depth parameter with default value |
Yes, I think I've tried this and the only issue is that for the k = 0 mode, you get
My thinking was that you should only save the values of |
Fair point about tanh being slow; let's keep it as is. |
I suggest adding a new depth parameter, say$\infty$ , giving the current model, or finite.
H
, which can either beIn the finite case, the only change is that the Fourier space operator linking
b
andψ
changes fromto
From looking at the code, I think this just means changing the nonlinear function
calcN_advection!
, though some of the diagnostics might also need minor changes depending on how they're calculated.Happy to help implement this.
The text was updated successfully, but these errors were encountered: