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

New diagnostic and background flow functionality for SurfaceQG module #376

Open
mncrowe opened this issue Jan 22, 2025 · 0 comments
Open
Labels
🤥 enhancement New feature or request

Comments

@mncrowe
Copy link
Contributor

mncrowe commented Jan 22, 2025

It would be useful to have the background flow functionality that we recently implemented in the 1-layer model included in the SQG model. I'll have a look at doing this when I get a chance.

Also, regarding diagnostics, I think there's three things we need; surface kinetic energy, buoyancy variance and domain integrated energy. The first two are already added but if the finite depth option gets added, some of the comments might need to be updated. The third isn't (I think) included currently but probably should be.

Let's define the Dirichlet-to-Neumann operator relating the streamfunction and buoyancy as:

$$ \hat{b} = D(|k|)\hat{\psi} $$

where

$$ D(|k|) = \begin{cases} |k| & H = \infty, \\ |k|\tanh(|k|H) & \text{otherwise.} \end{cases} $$

We can now define our three diagnostics as:

$$ SKE = \frac{1}{2} \int u^2+v^2 dxdy = \frac{1}{2} \int |\nabla_2 \psi|^2 dxdy = \frac{1}{2} \int |k|^2 |\hat{\psi}|^2 dkdl, $$

$$ B_{var} = \int b^2 dxdy = \int |\hat{b}|^2 dkdl = \int |D(|k|)|^2 |\hat{\psi}|^2 dkdl, $$

$$ DE = \frac{1}{2} \int u^2 + v^2 + b^2 dxdydz = \frac{1}{2} \int |\nabla_3 \psi|^2 dxdydz = \frac{1}{2} \int [\nabla\cdot(\psi\nabla\psi) - \psi\nabla^2\psi] dxdydz = \frac{1}{2} \int \psi\psi_z dxdy = \frac{1}{2} \int \psi b dxdy = \frac{1}{2} \int D(|k|) |\hat{\psi}|^2 dkdl,$$

up to mathematical errors. We can now conclude that the buoyancy variance and SKE are the same in the infinite depth case (up to a factor of 2) with both conserved (in the inviscid case). However, in the finite depth case they differ, with the SKE no longer conserved. Therefore I think the DE makes a better metric as it's always conserved so we should add this.

TLDR: I think we should add domain integrated (or averaged) energy to the SurfaceQG module. Happy to do this. We should also copy across the background flow functionality from SingleLayerQG.

@navidcy navidcy added the 🤥 enhancement New feature or request label Jan 24, 2025
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