This package solves for steady, propagating dipolar solutions in a layered quasi-geostrophic (LQG) model or a surface quasi-geostrophic (SQG) model. It is designed to work with GeophysicalFlows.jl and FourierFlows.jl.
To install use the Julia package manager:
julia> ]
(v1.10) pgk> add https://github.com/mncrowe/QGDipoles.jl.git
(v1.10) pgk> instantiate
This package is not compatible with versions of Julia earlier than 1.10 due to the eachslice
function.
See examples/
for example scripts and docs/documentation.md
for information on how to use this package and how it works. Full documetation is available here.
This package contains the following files in src/
:
create_modon.jl
: contains functions for calculating modon solutions on a grid using a given set of coefficientslin_sys.jl
: contains functions for building and solving an inhomogeneous eigenvalue problem for the coefficientsJJ_int.jl
: contains numerical integration functions for calculating the terms in the inhomogeneous eigenvalue problemQGDipoles.jl
: module file which loads dependencies and exports all functions
This package requires the following dependencies:
- FFTW (v1.8.0)
- Jacobi (v0.7.0)
- LinearAlgebra
- NLsolve (v4.5.1)
- QuadGK (v2.9.4)
- SpecialFunctions (v2.4.0)
- CUDA (v5.4.3)
The specified versions are confirmed to work. Earlier versions may also work.
Dipolar vortex solutions are calculated using a method originally proposed for surface QG by Johnson & Crowe 2023 and extended to layered QG by Crowe & Johnson 2024. An overview of this method is discussed in the full documentation. This code contains a Julia implementation of the MATLAB code included as supplementary material with Crowe & Johnson 2024 and also includes a version of the previously unrealeased SQG version discussed in Johnson & Crowe 2023 and Crowe & Johnson 2023. For those interested in the original (layered QG only) implementation, it can be found here.