Welcome to xomega’s documentation!

xomega is a Python package for solving the generalized omega equation which takes the form

\[N^2\nabla_\text{h}w_\text{b} + f_0^2\frac{\partial^2w_\text{b}}{\partial z^2} = \beta\frac{\partial b}{\partial x} + \nabla_\text{h}\cdot{\bf Q}(u,v,\theta,\Phi).\]

Given the right-hand side of the equation, the package inverts the vertical velocity fields at each time and depth in wavenumber space, i.e.

\[-\kappa^2N^2\hat{w}_\text{b} + f_0^2\frac{\partial^2 \hat{w}_\text{b}}{\partial z^2} = ik\beta\hat{b} + (ik\hat{Q}_x + il\hat{Q}_y).\]

where \(\mathbf{\kappa} = (k,l)\) is the horizontal wavenumber vector. The right-hand side, neglecting the turbulent correlation terms is \({\bf Q} = {\bf Q}_\text{tw} + {\bf Q}_\text{da}\) where

\[{\bf Q}_\text{tw} = -2\Big(\frac{\partial {\bf u}}{\partial x} \cdot \nabla b, \frac{\partial {\bf u}}{\partial y} \cdot \nabla b\Big)\]
\[{\bf Q}_\text{da} = f \Big( \frac{\partial v}{\partial x}\frac{\partial u_\text{a}}{\partial z} - \frac{\partial u}{\partial x}\frac{\partial v_\text{a}}{\partial z}, \frac{\partial v}{\partial y}\frac{\partial u_\text{a}}{\partial z} - \frac{\partial u}{\partial y}\frac{\partial v_\text{a}}{\partial z} \Big).\]

where \({\bf u}_\text{a}\ (={\bf u}-{\bf u}_\text{g})\) is the ageotrophic velocity. Assuming the total flow to be in geostrophic balance \({\bf u}={\bf u}_\text{g}=\frac{\hat{z}}{f}\times\nabla_\text{h}\Phi\), the generalized form reduces to the quasi-geostrophic Omega equation.


xomega is at early stage of development and will keep improving in the future. The rigid-lid API should be quite stable, but minor utilities could change in the next version. If you find any bugs or would like to request any enhancements, please raise an issue on GitHub.