Skip to content
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

Open
mncrowe opened this issue Dec 6, 2024 · 1 comment
Open

Add finite depth parameter to SQG model (surfaceqg.jl) #374

mncrowe opened this issue Dec 6, 2024 · 1 comment
Labels
🤥 enhancement New feature or request

Comments

@mncrowe
Copy link
Contributor

mncrowe commented Dec 6, 2024

I suggest adding a new depth parameter, say H, which can either be $\infty$, giving the current model, or finite.

In the finite case, the only change is that the Fourier space operator linking b and ψ changes from

$$ \hat{b} = |\textbf{k}|\hat{\psi}, $$

to

$$ \hat{b} = |\textbf{k}| \tanh(|\textbf{k}| H)\hat{\psi}. $$

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.

@glwagner glwagner added the 🤥 enhancement New feature or request label Dec 6, 2024
@glwagner
Copy link
Member

glwagner commented Dec 6, 2024

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 tanh are relatively expensive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤥 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants