From e74ae713270cae2fe0857bc5776a7fab4c044bff Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Fri, 8 Nov 2024 16:14:12 +0000 Subject: [PATCH] build based on 5336fe3 --- dev/.documenter-siteinfo.json | 2 +- dev/Examples/{80d9d539.svg => 0747b68f.svg} | 76 ++++++++++---------- dev/Examples/{cff2e881.svg => d1946918.svg} | 80 ++++++++++----------- dev/Examples/index.html | 6 +- dev/Functions/index.html | 2 +- dev/Installation/index.html | 2 +- dev/index.html | 2 +- 7 files changed, 85 insertions(+), 85 deletions(-) rename dev/Examples/{80d9d539.svg => 0747b68f.svg} (96%) rename dev/Examples/{cff2e881.svg => d1946918.svg} (96%) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index e2b3749..e7adc58 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-08T16:13:06","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-08T16:14:08","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/Examples/80d9d539.svg b/dev/Examples/0747b68f.svg similarity index 96% rename from dev/Examples/80d9d539.svg rename to dev/Examples/0747b68f.svg index 642380c..c3aacb7 100644 --- a/dev/Examples/80d9d539.svg +++ b/dev/Examples/0747b68f.svg @@ -1,45 +1,45 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - - - + + + + + + + + diff --git a/dev/Examples/cff2e881.svg b/dev/Examples/d1946918.svg similarity index 96% rename from dev/Examples/cff2e881.svg rename to dev/Examples/d1946918.svg index d91a8a2..694a53f 100644 --- a/dev/Examples/cff2e881.svg +++ b/dev/Examples/d1946918.svg @@ -1,45 +1,45 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - - - - - + + + + + + + + + + diff --git a/dev/Examples/index.html b/dev/Examples/index.html index aa2a11e..313cdaa 100644 --- a/dev/Examples/index.html +++ b/dev/Examples/index.html @@ -35,7 +35,7 @@ colormap = :balance, aspect_ratio=1, xlims = (-Lx/2, Lx/2), - ylims = (-Ly/2, Ly/2))Example block output

Note that we transpose $\psi$ when plotting as $x$ corresonds to the first dimension of $\psi$.

Example 2: multi-layer QG

This example considers a 3-layer solution and introduces the concept of active and passive layers. We define an active layer to be a layer with a closed streamline at $x^2 + y^2 = \ell^2$ whereas a passive layer has no closed streamlines. Therefore, fluid within the vortex in an active layer remains trapped in the vortex. Conversely, fluid in the passive layer is not trapped in a vortex core but can still be affected through the change in layer thickness associated with the streamfunction in neighbouring layers. Passive layers have $F_i(z) = (\beta_i/U) z$ everywhere and hence have no eigenvalue, $K_i$, to solve for. Further, the coefficients within a passive layer are zero though the solution may still be non-zero due to the coefficients in neighbouring layers. Therefore, the corresponding linear system can be simplified by removing rows and columns corresponding to passive layers and solving the reduced system for the active layers only.

We'll start by defining some parameters:

using QGDipoles
+    ylims = (-Ly/2, Ly/2))
Example block output

Note that we transpose $\psi$ when plotting as $x$ corresonds to the first dimension of $\psi$.

Example 2: multi-layer QG

This example considers a 3-layer solution and introduces the concept of active and passive layers. We define an active layer to be a layer with a closed streamline at $x^2 + y^2 = \ell^2$ whereas a passive layer has no closed streamlines. Therefore, fluid within the vortex in an active layer remains trapped in the vortex. Conversely, fluid in the passive layer is not trapped in a vortex core but can still be affected through the change in layer thickness associated with the streamfunction in neighbouring layers. Passive layers have $F_i(z) = (\beta_i/U) z$ everywhere and hence have no eigenvalue, $K_i$, to solve for. Further, the coefficients within a passive layer are zero though the solution may still be non-zero due to the coefficients in neighbouring layers. Therefore, the corresponding linear system can be simplified by removing rows and columns corresponding to passive layers and solving the reduced system for the active layers only.

We'll start by defining some parameters:

using QGDipoles
 
 # Set problem parameters
 
@@ -161,7 +161,7 @@
     colormap = :balance,
     aspect_ratio=1,
     xlims = (-Lx/2, Lx/2),
-    ylims = (-Ly/2, Ly/2))
Example block output

If we look at $K$, we find that $K \approx 7.34205$ which is not the value we'd expect for the usual dipole solution. Instead, if we look at our plot, we see that it's a different solution with a mode 2 structure in the radial direction.

In addition to these wrapper functions, the functions CreateLCD and CreateLCD implement the Lamb-Chaplygin dipole[2] and Larichev-Reznik dipole[3] directly using the analytical solution for these cases.

Example 5: A GeophysicalFlows.jl simulation

This package is designed to be compatible with GeophysicalFlows.jl[4] and provide a means of generating dipolar vortex initial conditions for layered QG and surface QG simulations. Here, we'll discuss a simple example of how to setup a 1-layer simulation in GeophyiscalFlows.jl using the Lamb-Chaplygin dipole as the initial condition. We'll also see that, as expected, the dipole retains it's form during the evolution and hence is a steady solution in a co-moving frame. Let's begin by defining some parameters for our vortex initial condition and our numerical simulation:

using GeophysicalFlows, QGDipoles
+    ylims = (-Ly/2, Ly/2))
Example block output

If we look at $K$, we find that $K \approx 7.34205$ which is not the value we'd expect for the usual dipole solution. Instead, if we look at our plot, we see that it's a different solution with a mode 2 structure in the radial direction.

In addition to these wrapper functions, the functions CreateLCD and CreateLCD implement the Lamb-Chaplygin dipole[2] and Larichev-Reznik dipole[3] directly using the analytical solution for these cases.

Example 5: A GeophysicalFlows.jl simulation

This package is designed to be compatible with GeophysicalFlows.jl[4] and provide a means of generating dipolar vortex initial conditions for layered QG and surface QG simulations. Here, we'll discuss a simple example of how to setup a 1-layer simulation in GeophyiscalFlows.jl using the Lamb-Chaplygin dipole as the initial condition. We'll also see that, as expected, the dipole retains it's form during the evolution and hence is a steady solution in a co-moving frame. Let's begin by defining some parameters for our vortex initial condition and our numerical simulation:

using GeophysicalFlows, QGDipoles
 
 # Define vortex parameters
 
@@ -212,4 +212,4 @@
 		aspect_ratio=1,
 		xlims = (-Lx/2, Lx/2),
 		ylims = (-Ly/2, Ly/2))
-

Note that we need to move our fields back to the CPU prior to plotting. The two plots are shown below and are approximately identical. Therefore, we observe that the vortex remains centred at the origin. Over long times, numerical error will result in the vortex moving at a slightly different speed to U and hence moving away from the origin.

imageimage

See the GeophyiscalFlows.jl documentation here for more details on how to run QG simulations.

+

Note that we need to move our fields back to the CPU prior to plotting. The two plots are shown below and are approximately identical. Therefore, we observe that the vortex remains centred at the origin. Over long times, numerical error will result in the vortex moving at a slightly different speed to U and hence moving away from the origin.

imageimage

See the GeophyiscalFlows.jl documentation here for more details on how to run QG simulations.

diff --git a/dev/Functions/index.html b/dev/Functions/index.html index 7911067..6035cf6 100644 --- a/dev/Functions/index.html +++ b/dev/Functions/index.html @@ -1,2 +1,2 @@ -List of Functions · QGDipoles.jl

Functions

This page lists all Modules, Functions and Structures available in this package.

QGDipoles.jl

QGDipolesModule

Package for creating steady modon solutions to the layered quasi-geostrophic equations and the surface quasi geostrophic equations.

See examples/ for example scripts and here for documentation.

source

JJ_integ.jl

QGDipoles.A_funcFunction

Function: A_func(ξ, λ, μ)

Evaluates the matrix function A(ξ, λ, μ) = K(ξ) [K(ξ) + D(μ)]⁻¹ ξ⁻¹

Arguments:

  • ξ: point in [0, ∞), Number
  • λ: ratio of vortex radius to Rossby radius in each layer, Number or Vector
  • μ: nondimensional (y) vorticity gradient in each layer, Number or Vector
source
QGDipoles.B_funcFunction

Function: B_func(ξ, λ, μ)

Evaluates the matrix function B(ξ, λ, μ) = [K(ξ) + D(μ)]⁻¹ ξ⁻¹

Arguments:

  • ξ: point in [0, ∞), Number
  • λ: ratio of vortex radius to Rossby radius in each layer, Number or Vector
  • μ: nondimensional (y) vorticity gradient in each layer, Number or Vector
source
QGDipoles.JJ_intFunction

Function: JJ_int(F, j, k, tol=1e-6)

Evaluates the integral $I = \int_0^\infty F(\xi) J_{2j+2}(\xi) J_{2k+2}(\xi) \mathrm{d}\xi$

Arguments:

  • F: function to integrate, typically A_func or B_func, Function
  • j: first Bessel function index, Integer
  • k: second Bessel function index, Integer
  • tol: error tolerance for QuadGK, Number (default: 1e-6)

Note: This integral is performed by deforming the contour of integration into the complex plane where the Bessel function decays exponentially in the imaginary direction.

source

lin_sys.jl

QGDipoles.BuildLinSysFunction

Function: BuildLinSys(M, λ, μ; tol=1e-6, sqg=false)

Builds the terms in the inhomogeneous eigenvalue problem; A, B, c, d

Arguments:

  • M: number of coefficient to solve for, Integer
  • λ: ratio of vortex radius to Rossby radius in each layer, Number or Vector
  • μ: nondimensional (y) vorticity gradient in each layer, Number or Vector
  • tol: error tolerance for QuadGK via JJ_int, Number (default: 1e-6)
  • sqg: false; creates layered QG system, true; creates SQG system (default: false)
source
QGDipoles.ApplyPassiveLayersFunction

Function: ApplyPassiveLayers(A, B, c, d, ActiveLayers)

Removes rows and columns corresponding to passive layers from the system

Arguments:

  • A, B, c, d: inhomogeneous eigenvalue problem terms, Arrays
  • ActiveLayers: vector of 1s or 0s where 1 denotes an active layer, Number or Vector
source
QGDipoles.IncludePassiveLayersFunction

Function: IncludePassiveLayers(K, a, ActiveLayers)

Includes columns corresponding to passive layers in the eigenvalue and coefficient arrays

Arguments:

  • K, a: eigenvalue and coefficient arrays describing system solution, Arrays
  • ActiveLayers: vector of 1s or 0s where 1 denotes an active layer, Number or Vector
source
QGDipoles.SolveInhomEVPFunction

Function: SolveInhomEVP(A, B, c, d; K₀=Nothing, a₀=Nothing, tol=1e-6, method=0, m=2, sqg=false)

Solves the inhomogeneous eigenvalue problem using nonlinear root finding

Arguments:

  • A, B, c, d: inhomogeneous eigenvalue problem terms, Arrays
  • K₀, a₀: initial guesses for K and a, Arrays or Nothings (default: Nothing)
  • tol: error tolerance for nlsolve, Number (default: 1e-6)
  • method: 0 - eigensolve for N = 1 and nlsolve for N > 1, 1 - nlsolve (default: 0)
  • m: exponent of K in eignevalue problem (default: 2)
  • sqg: false, uses m value specified; true, sets m=1 (default: false)

Note: setting sqg=true overwrites the value of m and is equivalent to setting m=1. The option to set both is included for consistency with BuildLinSys and more generality with the value of m.

source
QGDipoles.InhomEVP_F!Function

Function: InhomEVP_F!(F, J, x, A, B, c, d, e)

Calculates the function F and it's derivatives, J, at a given point x

Arguments:

  • F, J: values of F and it's derivatives, updated by function
  • x: evaluation point, Array
  • A, B, c: inhomogeneous eigenvalue problem terms, Arrays
  • e: basis spanning the space perpendicular to the d[n], Array
source
QGDipoles.OrthogSpaceFunction

Function: OrthogSpace(v)

Extends the input to an orthonormal basis over R^n using the Gram-Schmidt method

Arguments:

  • v: array with vectors as columns, Array
source

create_modon.jl

QGDipoles.ZernikeRFunction

Function: ZernikeR(n, x)

Define the Zernike radial function using the jacobi function from SpecialFunctions

Arguments:

  • n: order, Integer
  • x: evaluation point, Number or Array
source
QGDipoles.GridStructType

Structure: GridStruct

Stores the grid variables in physical and Fourier space

Arguments:

  • x, y: x and y points in physical space, Ranges
  • kr, l: x and y points in Fourier space, Arrays
  • Krsq: kr²+l² in Fourier space, Array
source
QGDipoles.CreateGridFunction

Function: CreateGrid(Nx, Ny, Lx, Ly; cuda=false)

Define the numerical grid as a GridStruct

Arguments:

  • Nx, Ny: number of gridpoints in x and y directions, Integers
  • Lx, Ly: x and y domains, either vectors of endpoints or lengths, Vectors or Numbers
  • cuda: true; use CUDA CuArray for fields (default: false)
source
QGDipoles.Calc_ψqFunction

Function: Calc_ψq(a, U, ℓ, R, β, grid, x₀=[0, 0], α=0)

Calculate ψ and q in a layered QG model using coefficients and vortex parameters

Arguments:

  • a: M x N array of coefficients, Array
  • (U, ): vortex speed and radius, Numbers
  • (R, β): Rossby radii and (y) PV gradients in each layer, Numbers or Vectors
  • grid: grid structure containing x, y, and Krsq
  • x₀: position of vortex center, vector (default: [0, 0])
  • α: initial angle of vortex, Number (default: 0)
source
QGDipoles.Calc_ψbFunction

Function: Calc_ψb(a, U, ℓ, R, β, grid, x₀=[0, 0], α=0)

Calculate SQG fields ψ and b using coefficients and vortex parameters

Arguments:

  • a: M x 1 array of coefficients, Array
  • (U, ): vortex speed and radius, Numbers
  • R: vector of [R, R'], Vector
  • β: beta-plane (y) PV gradient, Number
  • grid: grid structure containing x, y, and Krsq
  • x₀: position of vortex center, vector (default: [0, 0])
  • α: initial angle of vortex, Number (default: 0)

Note: Here R is the baroclinic Rossby radius, R = NH/f, and R' = R₀²/R where R₀ is the barotropic Rossby radius, R₀ = √(gH)/f. For infinite depth, R' = g/(fN).

source
QGDipoles.Calc_uvFunction

Function: Calc_uv(ψ, grid)

Calculate the velocity fields from ψ using (u, v) = (-∂ψ/∂y, ∂ψ/∂x)

Arguments:

  • ψ: streamfunction, Array
  • grid: grid structure containing kr and l
source
QGDipoles.ΔNCalcFunction

Function: ΔNCalc(K², R, β, U=1)

Defines the Δ_N(β) matrix used to invert for ψ and q

Arguments:

  • : value of k²+l² in Fourier space, Array
  • (R, β): Rossby radii and (y) PV gradients in each layer, Numbers or Vectors
  • U: vortex speed, Number (default: 1)
source
QGDipoles.CreateModonLQGFunction

Function: CreateModonLQG(grid, M, U=1, ℓ=1, R=1, β=0, ActiveLayers=1, x₀=[0, 0], α=0; K₀=Nothing, a₀=Nothing, tol=1e-6)

High level wrapper function for calculating ψ and q for the Layered QG model using given parameters

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • M: number of coefficient to solve for, Integer (default: 8)
  • (U, ): vortex speed and radius, Numbers (default: (1, 1))
  • (R, β): Rossby radii and (y) PV gradients in each layer, Numbers or Vectors, (default: (1, 0))
  • ActiveLayers: vector of 1s or 0s where 1 denotes an active layer, Number or Vector, (default: [1,..,1])
  • x₀: position of vortex center, vector (default: [0, 0])
  • α: initial angle of vortex, Number (default: 0)
  • K₀, a₀: initial guesses for K and a, Arrays or Nothings (default: Nothing)
  • tol: error tolerance passed to QuadGK and NLSolve functions, Number (default: 1e-6)

Note: provide values of K₀ and a₀ for active layers ONLY.

source
QGDipoles.CreateModonSQGFunction

Function: CreateModonSQG(grid, M, U=1, ℓ=1, R=[Inf, Inf], β=0, x₀=[0, 0], α=0; K₀=Nothing, a₀=Nothing, tol=1e-6)

High level wrapper function for calculating ψ and b for the SQG model using given parameters

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • M: number of coefficient to solve for, Integer (default: 12)
  • (U, ): vortex speed and radius, Numbers (default: (1, 1))
  • R: vector of [R, R'], Vector (default: [Inf, Inf])
  • β: beta-plane (y) PV gradient, Number (default: 0)
  • x₀: position of vortex center, vector (default: [0, 0])
  • α: initial angle of vortex, Number (default: 0)
  • K₀, a₀: initial guesses for K and a, Arrays or Nothings (default: Nothing)
  • tol: error tolerance passed to QuadGK and NLSolve functions, Number (default: 1e-6)

Note: Here R is the baroclinic Rossby radius, R = NH/f, and R' = R₀²/R where R₀ is the barotropic Rossby radius, R₀ = √(gH)/f. For infinite depth, R' = g/(fN).

source
QGDipoles.CreateLCDFunction

Function: CreateLCD(grid, U=1, ℓ=1, x₀=[0, 0], α=0)

High level wrapper function for calculating ψ and q for the Lamb-Chaplygin dipole using given parameters

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • (U, ): vortex speed and radius, Numbers (default: (1, 1))
  • x₀: position of vortex center, vector (default: [0, 0])
  • α: initial angle of vortex, Number (default: 0)

Note: This function uses the analytic solution for the LCD to calculate ψ and q.

source
QGDipoles.CreateLRDFunction

Function: CreateLRD(grid, U=1, ℓ=1, R=1, β=0, x₀=[0, 0], α=0)

High level wrapper function for calculating ψ and q for the Larichev-Reznik dipole using given parameters

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • (U, ): vortex speed and radius, Numbers (default: (1, 1))
  • (R, β): Rossby radii and (y) PV gradient, Numbers, (default: (1, 0))
  • x₀: position of vortex center, vector (default: [0, 0])
  • α: initial angle of vortex, Number (default: 0)

Note: This function uses the analytic solution for the LRD to calculate ψ and q.

source
QGDipoles.Eval_ψ_SQGFunction

Function: Eval_ψ_SQG(grid, ψ, z=[0], U=1, R=[Inf, Inf], β=0)

Evaluates ψ at specified depths, z in [-R, 0], for the SQG problem

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • ψ: surface streamfunction, calculated using Calc_ψb or CreateModonSQG
  • z: vector of depths (default: [0])
  • U: vortex speed, Number (default: 1)
  • R: vector of [R, R'], Vector (default: [Inf, Inf])
  • β: beta-plane (y) PV gradient, Number (default: 0)

Note: Here R is the baroclinic Rossby radius, R = NH/f, and R' = R₀²/R where R₀ is the barotropic Rossby radius, R₀ = √(gH)/f. For infinite depth, R' = g/(fN).

source
QGDipoles.Eval_q_SQGFunction

Function: Eval_q_SQG(grid, ψ, z=[0], U=1, R=[Inf, Inf], β=0)

Evaluates q at specified depths, z in [-R, 0], for the SQG problem

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • ψ: surface streamfunction, calculated using Calc_ψb or CreateModonSQG
  • z: vector of depths (default: [0])
  • U: vortex speed, Number (default: 1)
  • R: vector of [R, R'], Vector (default: [Inf, Inf])
  • β: beta-plane (y) PV gradient, Number (default: 0)

Note: Here R is the baroclinic Rossby radius, R = NH/f, and R' = R₀²/R where R₀ is the barotropic Rossby radius, R₀ = √(gH)/f. For infinite depth, R' = g/(fN).

source
QGDipoles.Eval_b_SQGFunction

Function: Eval_b_SQG(grid, ψ, z=[0], U=1, R=[Inf, Inf], β=0)

Evaluates b at specified depths, z in [-R, 0], for the SQG problem

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • ψ: surface streamfunction, calculated using Calc_ψb or CreateModonSQG
  • z: vector of depths (default: [0])
  • U: vortex speed, Number (default: 1)
  • R: vector of [R, R'], Vector (default: [Inf, Inf])
  • β: beta-plane (y) PV gradient, Number (default: 0)

Note: Here R is the baroclinic Rossby radius, R = NH/f, and R' = R₀²/R where R₀ is the barotropic Rossby radius, R₀ = √(gH)/f. For infinite depth, R' = g/(fN).

source
QGDipoles.Eval_w_SQGFunction

Function: Eval_w_SQG(grid, ψ, z=[0], U=1, R=[Inf, Inf], β=0)

Evaluates N²w at specified depths, z in [-R, 0], for the SQG problem using N²w = -J[ψ + Uy, b]

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • ψ: surface streamfunction, calculated using Calc_ψb or CreateModonSQG
  • z: vector of depths (default: [0])
  • U: vortex speed, Number (default: 1)
  • R: vector of [R, R'], Vector (default: [Inf, Inf])
  • β: beta-plane (y) PV gradient, Number (default: 0)

Note: Here R is the baroclinic Rossby radius, R = NH/f, and R' = R₀²/R where R₀ is the barotropic Rossby radius, R₀ = √(gH)/f. For infinite depth, R' = g/(fN).

Note: this function is not accurate at the surface as ∇b is discontinuous there. Instead use w = -U∂η/∂x where η = fψ/g is the surface elevation, or w = 0 if R' = ∞.

source
QGDipoles.Calc_∇Function

Function: Calc_∇(f, grid)

Calculate the gradient ∇f for a given field f

Arguments:

  • f: function, Array
  • grid: grid structure containing kr and l
source
+List of Functions · QGDipoles.jl

Functions

This page lists all Modules, Functions and Structures available in this package.

QGDipoles.jl

QGDipolesModule

Package for creating steady modon solutions to the layered quasi-geostrophic equations and the surface quasi geostrophic equations.

See examples/ for example scripts and here for documentation.

source

JJ_integ.jl

QGDipoles.A_funcFunction

Function: A_func(ξ, λ, μ)

Evaluates the matrix function A(ξ, λ, μ) = K(ξ) [K(ξ) + D(μ)]⁻¹ ξ⁻¹

Arguments:

  • ξ: point in [0, ∞), Number
  • λ: ratio of vortex radius to Rossby radius in each layer, Number or Vector
  • μ: nondimensional (y) vorticity gradient in each layer, Number or Vector
source
QGDipoles.B_funcFunction

Function: B_func(ξ, λ, μ)

Evaluates the matrix function B(ξ, λ, μ) = [K(ξ) + D(μ)]⁻¹ ξ⁻¹

Arguments:

  • ξ: point in [0, ∞), Number
  • λ: ratio of vortex radius to Rossby radius in each layer, Number or Vector
  • μ: nondimensional (y) vorticity gradient in each layer, Number or Vector
source
QGDipoles.JJ_intFunction

Function: JJ_int(F, j, k, tol=1e-6)

Evaluates the integral $I = \int_0^\infty F(\xi) J_{2j+2}(\xi) J_{2k+2}(\xi) \mathrm{d}\xi$

Arguments:

  • F: function to integrate, typically A_func or B_func, Function
  • j: first Bessel function index, Integer
  • k: second Bessel function index, Integer
  • tol: error tolerance for QuadGK, Number (default: 1e-6)

Note: This integral is performed by deforming the contour of integration into the complex plane where the Bessel function decays exponentially in the imaginary direction.

source

lin_sys.jl

QGDipoles.BuildLinSysFunction

Function: BuildLinSys(M, λ, μ; tol=1e-6, sqg=false)

Builds the terms in the inhomogeneous eigenvalue problem; A, B, c, d

Arguments:

  • M: number of coefficient to solve for, Integer
  • λ: ratio of vortex radius to Rossby radius in each layer, Number or Vector
  • μ: nondimensional (y) vorticity gradient in each layer, Number or Vector
  • tol: error tolerance for QuadGK via JJ_int, Number (default: 1e-6)
  • sqg: false; creates layered QG system, true; creates SQG system (default: false)
source
QGDipoles.ApplyPassiveLayersFunction

Function: ApplyPassiveLayers(A, B, c, d, ActiveLayers)

Removes rows and columns corresponding to passive layers from the system

Arguments:

  • A, B, c, d: inhomogeneous eigenvalue problem terms, Arrays
  • ActiveLayers: vector of 1s or 0s where 1 denotes an active layer, Number or Vector
source
QGDipoles.IncludePassiveLayersFunction

Function: IncludePassiveLayers(K, a, ActiveLayers)

Includes columns corresponding to passive layers in the eigenvalue and coefficient arrays

Arguments:

  • K, a: eigenvalue and coefficient arrays describing system solution, Arrays
  • ActiveLayers: vector of 1s or 0s where 1 denotes an active layer, Number or Vector
source
QGDipoles.SolveInhomEVPFunction

Function: SolveInhomEVP(A, B, c, d; K₀=Nothing, a₀=Nothing, tol=1e-6, method=0, m=2, sqg=false)

Solves the inhomogeneous eigenvalue problem using nonlinear root finding

Arguments:

  • A, B, c, d: inhomogeneous eigenvalue problem terms, Arrays
  • K₀, a₀: initial guesses for K and a, Arrays or Nothings (default: Nothing)
  • tol: error tolerance for nlsolve, Number (default: 1e-6)
  • method: 0 - eigensolve for N = 1 and nlsolve for N > 1, 1 - nlsolve (default: 0)
  • m: exponent of K in eignevalue problem (default: 2)
  • sqg: false, uses m value specified; true, sets m=1 (default: false)

Note: setting sqg=true overwrites the value of m and is equivalent to setting m=1. The option to set both is included for consistency with BuildLinSys and more generality with the value of m.

source
QGDipoles.InhomEVP_F!Function

Function: InhomEVP_F!(F, J, x, A, B, c, d, e)

Calculates the function F and it's derivatives, J, at a given point x

Arguments:

  • F, J: values of F and it's derivatives, updated by function
  • x: evaluation point, Array
  • A, B, c: inhomogeneous eigenvalue problem terms, Arrays
  • e: basis spanning the space perpendicular to the d[n], Array
source
QGDipoles.OrthogSpaceFunction

Function: OrthogSpace(v)

Extends the input to an orthonormal basis over R^n using the Gram-Schmidt method

Arguments:

  • v: array with vectors as columns, Array
source

create_modon.jl

QGDipoles.ZernikeRFunction

Function: ZernikeR(n, x)

Define the Zernike radial function using the jacobi function from SpecialFunctions

Arguments:

  • n: order, Integer
  • x: evaluation point, Number or Array
source
QGDipoles.GridStructType

Structure: GridStruct

Stores the grid variables in physical and Fourier space

Arguments:

  • x, y: x and y points in physical space, Ranges
  • kr, l: x and y points in Fourier space, Arrays
  • Krsq: kr²+l² in Fourier space, Array
source
QGDipoles.CreateGridFunction

Function: CreateGrid(Nx, Ny, Lx, Ly; cuda=false)

Define the numerical grid as a GridStruct

Arguments:

  • Nx, Ny: number of gridpoints in x and y directions, Integers
  • Lx, Ly: x and y domains, either vectors of endpoints or lengths, Vectors or Numbers
  • cuda: true; use CUDA CuArray for fields (default: false)
source
QGDipoles.Calc_ψqFunction

Function: Calc_ψq(a, U, ℓ, R, β, grid, x₀=[0, 0], α=0)

Calculate ψ and q in a layered QG model using coefficients and vortex parameters

Arguments:

  • a: M x N array of coefficients, Array
  • (U, ): vortex speed and radius, Numbers
  • (R, β): Rossby radii and (y) PV gradients in each layer, Numbers or Vectors
  • grid: grid structure containing x, y, and Krsq
  • x₀: position of vortex center, vector (default: [0, 0])
  • α: initial angle of vortex, Number (default: 0)
source
QGDipoles.Calc_ψbFunction

Function: Calc_ψb(a, U, ℓ, R, β, grid, x₀=[0, 0], α=0)

Calculate SQG fields ψ and b using coefficients and vortex parameters

Arguments:

  • a: M x 1 array of coefficients, Array
  • (U, ): vortex speed and radius, Numbers
  • R: vector of [R, R'], Vector
  • β: beta-plane (y) PV gradient, Number
  • grid: grid structure containing x, y, and Krsq
  • x₀: position of vortex center, vector (default: [0, 0])
  • α: initial angle of vortex, Number (default: 0)

Note: Here R is the baroclinic Rossby radius, R = NH/f, and R' = R₀²/R where R₀ is the barotropic Rossby radius, R₀ = √(gH)/f. For infinite depth, R' = g/(fN).

source
QGDipoles.Calc_uvFunction

Function: Calc_uv(ψ, grid)

Calculate the velocity fields from ψ using (u, v) = (-∂ψ/∂y, ∂ψ/∂x)

Arguments:

  • ψ: streamfunction, Array
  • grid: grid structure containing kr and l
source
QGDipoles.ΔNCalcFunction

Function: ΔNCalc(K², R, β, U=1)

Defines the Δ_N(β) matrix used to invert for ψ and q

Arguments:

  • : value of k²+l² in Fourier space, Array
  • (R, β): Rossby radii and (y) PV gradients in each layer, Numbers or Vectors
  • U: vortex speed, Number (default: 1)
source
QGDipoles.CreateModonLQGFunction

Function: CreateModonLQG(grid, M, U=1, ℓ=1, R=1, β=0, ActiveLayers=1, x₀=[0, 0], α=0; K₀=Nothing, a₀=Nothing, tol=1e-6)

High level wrapper function for calculating ψ and q for the Layered QG model using given parameters

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • M: number of coefficient to solve for, Integer (default: 8)
  • (U, ): vortex speed and radius, Numbers (default: (1, 1))
  • (R, β): Rossby radii and (y) PV gradients in each layer, Numbers or Vectors, (default: (1, 0))
  • ActiveLayers: vector of 1s or 0s where 1 denotes an active layer, Number or Vector, (default: [1,..,1])
  • x₀: position of vortex center, vector (default: [0, 0])
  • α: initial angle of vortex, Number (default: 0)
  • K₀, a₀: initial guesses for K and a, Arrays or Nothings (default: Nothing)
  • tol: error tolerance passed to QuadGK and NLSolve functions, Number (default: 1e-6)

Note: provide values of K₀ and a₀ for active layers ONLY.

source
QGDipoles.CreateModonSQGFunction

Function: CreateModonSQG(grid, M, U=1, ℓ=1, R=[Inf, Inf], β=0, x₀=[0, 0], α=0; K₀=Nothing, a₀=Nothing, tol=1e-6)

High level wrapper function for calculating ψ and b for the SQG model using given parameters

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • M: number of coefficient to solve for, Integer (default: 12)
  • (U, ): vortex speed and radius, Numbers (default: (1, 1))
  • R: vector of [R, R'], Vector (default: [Inf, Inf])
  • β: beta-plane (y) PV gradient, Number (default: 0)
  • x₀: position of vortex center, vector (default: [0, 0])
  • α: initial angle of vortex, Number (default: 0)
  • K₀, a₀: initial guesses for K and a, Arrays or Nothings (default: Nothing)
  • tol: error tolerance passed to QuadGK and NLSolve functions, Number (default: 1e-6)

Note: Here R is the baroclinic Rossby radius, R = NH/f, and R' = R₀²/R where R₀ is the barotropic Rossby radius, R₀ = √(gH)/f. For infinite depth, R' = g/(fN).

source
QGDipoles.CreateLCDFunction

Function: CreateLCD(grid, U=1, ℓ=1, x₀=[0, 0], α=0)

High level wrapper function for calculating ψ and q for the Lamb-Chaplygin dipole using given parameters

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • (U, ): vortex speed and radius, Numbers (default: (1, 1))
  • x₀: position of vortex center, vector (default: [0, 0])
  • α: initial angle of vortex, Number (default: 0)

Note: This function uses the analytic solution for the LCD to calculate ψ and q.

source
QGDipoles.CreateLRDFunction

Function: CreateLRD(grid, U=1, ℓ=1, R=1, β=0, x₀=[0, 0], α=0)

High level wrapper function for calculating ψ and q for the Larichev-Reznik dipole using given parameters

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • (U, ): vortex speed and radius, Numbers (default: (1, 1))
  • (R, β): Rossby radii and (y) PV gradient, Numbers, (default: (1, 0))
  • x₀: position of vortex center, vector (default: [0, 0])
  • α: initial angle of vortex, Number (default: 0)

Note: This function uses the analytic solution for the LRD to calculate ψ and q.

source
QGDipoles.Eval_ψ_SQGFunction

Function: Eval_ψ_SQG(grid, ψ, z=[0], U=1, R=[Inf, Inf], β=0)

Evaluates ψ at specified depths, z in [-R, 0], for the SQG problem

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • ψ: surface streamfunction, calculated using Calc_ψb or CreateModonSQG
  • z: vector of depths (default: [0])
  • U: vortex speed, Number (default: 1)
  • R: vector of [R, R'], Vector (default: [Inf, Inf])
  • β: beta-plane (y) PV gradient, Number (default: 0)

Note: Here R is the baroclinic Rossby radius, R = NH/f, and R' = R₀²/R where R₀ is the barotropic Rossby radius, R₀ = √(gH)/f. For infinite depth, R' = g/(fN).

source
QGDipoles.Eval_q_SQGFunction

Function: Eval_q_SQG(grid, ψ, z=[0], U=1, R=[Inf, Inf], β=0)

Evaluates q at specified depths, z in [-R, 0], for the SQG problem

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • ψ: surface streamfunction, calculated using Calc_ψb or CreateModonSQG
  • z: vector of depths (default: [0])
  • U: vortex speed, Number (default: 1)
  • R: vector of [R, R'], Vector (default: [Inf, Inf])
  • β: beta-plane (y) PV gradient, Number (default: 0)

Note: Here R is the baroclinic Rossby radius, R = NH/f, and R' = R₀²/R where R₀ is the barotropic Rossby radius, R₀ = √(gH)/f. For infinite depth, R' = g/(fN).

source
QGDipoles.Eval_b_SQGFunction

Function: Eval_b_SQG(grid, ψ, z=[0], U=1, R=[Inf, Inf], β=0)

Evaluates b at specified depths, z in [-R, 0], for the SQG problem

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • ψ: surface streamfunction, calculated using Calc_ψb or CreateModonSQG
  • z: vector of depths (default: [0])
  • U: vortex speed, Number (default: 1)
  • R: vector of [R, R'], Vector (default: [Inf, Inf])
  • β: beta-plane (y) PV gradient, Number (default: 0)

Note: Here R is the baroclinic Rossby radius, R = NH/f, and R' = R₀²/R where R₀ is the barotropic Rossby radius, R₀ = √(gH)/f. For infinite depth, R' = g/(fN).

source
QGDipoles.Eval_w_SQGFunction

Function: Eval_w_SQG(grid, ψ, z=[0], U=1, R=[Inf, Inf], β=0)

Evaluates N²w at specified depths, z in [-R, 0], for the SQG problem using N²w = -J[ψ + Uy, b]

Arguments:

  • grid: grid structure containing x, y, and Krsq
  • ψ: surface streamfunction, calculated using Calc_ψb or CreateModonSQG
  • z: vector of depths (default: [0])
  • U: vortex speed, Number (default: 1)
  • R: vector of [R, R'], Vector (default: [Inf, Inf])
  • β: beta-plane (y) PV gradient, Number (default: 0)

Note: Here R is the baroclinic Rossby radius, R = NH/f, and R' = R₀²/R where R₀ is the barotropic Rossby radius, R₀ = √(gH)/f. For infinite depth, R' = g/(fN).

Note: this function is not accurate at the surface as ∇b is discontinuous there. Instead use w = -U∂η/∂x where η = fψ/g is the surface elevation, or w = 0 if R' = ∞.

source
QGDipoles.Calc_∇Function

Function: Calc_∇(f, grid)

Calculate the gradient ∇f for a given field f

Arguments:

  • f: function, Array
  • grid: grid structure containing kr and l
source
diff --git a/dev/Installation/index.html b/dev/Installation/index.html index 750c700..f2d9db5 100644 --- a/dev/Installation/index.html +++ b/dev/Installation/index.html @@ -1,4 +1,4 @@ Installation · QGDipoles.jl

Installation Instructions

Installing QGDipoles.jl is fairly straightforward and can be done using the Julia package manager. Note that QGDipoles is not (currently) listed as a Julia package so cannot be installed using ] add QGDipoles.

Installing

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.

Dependencies

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 and earlier versions may also work. These packages will be automatically installed with QGDipoles.jl and do not need to be added seperately.

+(v1.10) pgk> instantiate

This package is not compatible with versions of Julia earlier than 1.10 due to the eachslice function.

Dependencies

This package requires the following dependencies:

The specified versions are confirmed to work and earlier versions may also work. These packages will be automatically installed with QGDipoles.jl and do not need to be added seperately.

diff --git a/dev/index.html b/dev/index.html index 563a90d..77798fb 100644 --- a/dev/index.html +++ b/dev/index.html @@ -13,4 +13,4 @@ q = \left[\frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2} + \frac{\partial^2}{\partial z^2}\right] \psi, \quad \textrm{for} \quad z \in [-R, 0], \]

and $R = NH/f$ is the Baroclinic Rossby radius. Note that we have rescaled $z$ by $N/f$ so $q$ and $\psi$ are related by the 3D Laplacian operator. The top boundary condition is taken to be

\[ (\partial_t - U \partial_x) [b + N^2 \eta] + J(\psi, b + N^2 \eta) = 0, \quad \textrm{on} \quad z = 0, -\]

and we assume that $b = 0$ on the bottom surface, $z = -R$. Here, $b = N \partial\psi/\partial z$ is the buoyancy and $\eta = f\psi/g$ is the surface elevation.

The SQG system is typically derived by assuming that $q = 0$ in the interior. We instead take $q = (\beta/U)\psi$ which satisfies the steady evolution equation for $q$ given above and reduces to the usual result for $\beta = 0$. Since $b(z = 0)$ can be determined from $\psi(z = 0)$ using the Dirichlet-Neumann operator given above, this system reduces to a 2D system for the modified surface buoyancy, $b + N^2 \eta$, only.

QGDipoles.jl solves for steady, dipolar solutions to this surface equation and hence calculates only the surface values of $b$ and $\psi$ using Calc_ψb or CreateModonSQG. If a 3D solution is required, the functions Eval_ψ_SQG, Eval_q_SQG and Eval_b_SQG can be used to calculate ψ, q and b at specified depths. Alternatively, a layered model with a large number of layers can be used to model the continuous system. The full list of parameters for the SQG system is given in the table below.

Note: this package returns $b/N$ rather than $b$. When working with dimensional variables, this factor of $1/N$ should be included manually.

ParameterDescriptionDefinition
$U$vortex speed-
$\ell$vortex radius-
$\beta$background (y) vorticity gradient in each layer-
$R$baroclinic Rossby radius$R = NH / f$
$R'$reduced barotropic Rossby radius$R' = R_0^2 / R$
$\lambda$ratio of radius to $R$$\lambda = \ell / R$
$\mu$rescaled vorticity gradient$\mu = \beta \ell^2 / U$
$\alpha$angle of vortex propagation-
$x_0$position of vortex center-
$M$number of terms in polynomial expansion-
$N$buoyancy frequency-
$R_0$barotropic Rossby radius$R_0 = \sqrt {gH} / f$
$g$gravitational acceleration-
$f$Coriolis parameters-
$H$layer depth-

Index of Functions

This list contains all Functions and Structures from the QGDipoles.jl package. Full descriptions can be found on the List of Functions page.

NameLocationTypeDescription
A_funcsrc/JJ_integ.jlFunctionEvaluates a function required to calculate the matrix $\textbf{A}$ in the LQG case
B_funcsrc/JJ_integ.jlFunctionEvaluates a function required to calculate the matrix $\textbf{B}$ in the LQG case
JJ_intsrc/JJ_integ.jlFunctionCalculates a double Bessel function integral required to calculate $\textbf{A}$ and $\textbf{B}$
BuildLinSyssrc/lin_sys.jlFunctionBuilds the terms in the inhomogeneous eigenvalue problem; $\textbf{A}$, $\textbf{B}$, $\textbf{c}$ and $\textbf{d}$
ApplyPassiveLayerssrc/lin_sys.jlFunctionRemoves rows and columns corresponding to passive layers from the linear system
IncludePassiveLayerssrc/lin_sys.jlFunctionIncludes columns corresponding to passive layers in the eigenvalue and coefficient arrays
SolveInhomEVPsrc/lin_sys.jlFunctionSolves the inhomogeneous eigenvalue problem using nonlinear root finding ($N > 1$) or standard eigenvalue methods for quadratic problems ($N = 1$)
InhomEVP_F!src/lin_sys.jlFunctionCalculates the function required for SolveInhomEVP and it's derivatives
OrthogSpacesrc/lin_sys.jlFunctionExtends the input to an orthonormal basis over $R^n$ using the Gram-Schmidt method, required for SolveInhomEVP
ZernikeRsrc/create_modon.jlFunctionDefine the Zernike radial function using the jacobi function from SpecialFunctions.jl
GridStructsrc/create_modon.jlStructureA structure that stores the grid variables in physical and Fourier space
CreateGridsrc/create_modon.jlFunctionDefine the numerical grid in the form of a GridStruct structure
Calc_ψqsrc/create_modon.jlFunctionCalculate $\psi$ and $q$ in a layered QG model using coefficients and vortex parameters
Calc_ψbsrc/create_modon.jlFunctionCalculate $\psi$ and $b$ in the SQG model using coefficients and vortex parameters
Calc_uvsrc/create_modon.jlFunctionCalculate the velocity fields from $\psi$ using $(u, v) = (-\partial\psi/\partial y, \partial\psi/\partial x)$
ΔNCalcsrc/create_modon.jlFunctionDefines a matrix used to invert for $\psi$ and $q$ in Fourier space
CreateModonLQGsrc/create_modon.jlFunctionHigh level wrapper function for calculating $\psi$, $q$, $K$ and $\textbf{a}$ for the Layered QG model using given parameters
CreateModonSQGsrc/create_modon.jlFunctionHigh level wrapper function for calculating $\psi$, $b$, $K$ and $\textbf{a}$ for the SQG model using given parameters
CreateLCDsrc/create_modon.jlFunctionHigh level wrapper function for calculating $\psi$, $q$ and $K$ for the Lamb-Chaplygin dipole using given parameters
CreateLRDsrc/create_modon.jlFunctionHigh level wrapper function for calculating $\psi$, $q$ and $K$ for the Larichev-Reznik dipole using given parameters
Eval_ψ_SQGsrc/create_modon.jlFunctionEvaluates ψ at specified depths in the SQG model
Eval_q_SQGsrc/create_modon.jlFunctionEvaluates q at specified depths in the SQG model
Eval_b_SQGsrc/create_modon.jlFunctionEvaluates b at specified depths in the SQG model
Eval_w_SQGsrc/create_modon.jlFunctionEvaluates w at (non-surface) depths in the SQG model
Calc_∇src/create_modon.jlFunctionCalculates the x and y derivatives of a given field
+\]

and we assume that $b = 0$ on the bottom surface, $z = -R$. Here, $b = N \partial\psi/\partial z$ is the buoyancy and $\eta = f\psi/g$ is the surface elevation.

The SQG system is typically derived by assuming that $q = 0$ in the interior. We instead take $q = (\beta/U)\psi$ which satisfies the steady evolution equation for $q$ given above and reduces to the usual result for $\beta = 0$. Since $b(z = 0)$ can be determined from $\psi(z = 0)$ using the Dirichlet-Neumann operator given above, this system reduces to a 2D system for the modified surface buoyancy, $b + N^2 \eta$, only.

QGDipoles.jl solves for steady, dipolar solutions to this surface equation and hence calculates only the surface values of $b$ and $\psi$ using Calc_ψb or CreateModonSQG. If a 3D solution is required, the functions Eval_ψ_SQG, Eval_q_SQG and Eval_b_SQG can be used to calculate ψ, q and b at specified depths. Alternatively, a layered model with a large number of layers can be used to model the continuous system. The full list of parameters for the SQG system is given in the table below.

Note: this package returns $b/N$ rather than $b$. When working with dimensional variables, this factor of $1/N$ should be included manually.

ParameterDescriptionDefinition
$U$vortex speed-
$\ell$vortex radius-
$\beta$background (y) vorticity gradient in each layer-
$R$baroclinic Rossby radius$R = NH / f$
$R'$reduced barotropic Rossby radius$R' = R_0^2 / R$
$\lambda$ratio of radius to $R$$\lambda = \ell / R$
$\mu$rescaled vorticity gradient$\mu = \beta \ell^2 / U$
$\alpha$angle of vortex propagation-
$x_0$position of vortex center-
$M$number of terms in polynomial expansion-
$N$buoyancy frequency-
$R_0$barotropic Rossby radius$R_0 = \sqrt {gH} / f$
$g$gravitational acceleration-
$f$Coriolis parameters-
$H$layer depth-

Index of Functions

This list contains all Functions and Structures from the QGDipoles.jl package. Full descriptions can be found on the List of Functions page.

NameLocationTypeDescription
A_funcsrc/JJ_integ.jlFunctionEvaluates a function required to calculate the matrix $\textbf{A}$ in the LQG case
B_funcsrc/JJ_integ.jlFunctionEvaluates a function required to calculate the matrix $\textbf{B}$ in the LQG case
JJ_intsrc/JJ_integ.jlFunctionCalculates a double Bessel function integral required to calculate $\textbf{A}$ and $\textbf{B}$
BuildLinSyssrc/lin_sys.jlFunctionBuilds the terms in the inhomogeneous eigenvalue problem; $\textbf{A}$, $\textbf{B}$, $\textbf{c}$ and $\textbf{d}$
ApplyPassiveLayerssrc/lin_sys.jlFunctionRemoves rows and columns corresponding to passive layers from the linear system
IncludePassiveLayerssrc/lin_sys.jlFunctionIncludes columns corresponding to passive layers in the eigenvalue and coefficient arrays
SolveInhomEVPsrc/lin_sys.jlFunctionSolves the inhomogeneous eigenvalue problem using nonlinear root finding ($N > 1$) or standard eigenvalue methods for quadratic problems ($N = 1$)
InhomEVP_F!src/lin_sys.jlFunctionCalculates the function required for SolveInhomEVP and it's derivatives
OrthogSpacesrc/lin_sys.jlFunctionExtends the input to an orthonormal basis over $R^n$ using the Gram-Schmidt method, required for SolveInhomEVP
ZernikeRsrc/create_modon.jlFunctionDefine the Zernike radial function using the jacobi function from SpecialFunctions.jl
GridStructsrc/create_modon.jlStructureA structure that stores the grid variables in physical and Fourier space
CreateGridsrc/create_modon.jlFunctionDefine the numerical grid in the form of a GridStruct structure
Calc_ψqsrc/create_modon.jlFunctionCalculate $\psi$ and $q$ in a layered QG model using coefficients and vortex parameters
Calc_ψbsrc/create_modon.jlFunctionCalculate $\psi$ and $b$ in the SQG model using coefficients and vortex parameters
Calc_uvsrc/create_modon.jlFunctionCalculate the velocity fields from $\psi$ using $(u, v) = (-\partial\psi/\partial y, \partial\psi/\partial x)$
ΔNCalcsrc/create_modon.jlFunctionDefines a matrix used to invert for $\psi$ and $q$ in Fourier space
CreateModonLQGsrc/create_modon.jlFunctionHigh level wrapper function for calculating $\psi$, $q$, $K$ and $\textbf{a}$ for the Layered QG model using given parameters
CreateModonSQGsrc/create_modon.jlFunctionHigh level wrapper function for calculating $\psi$, $b$, $K$ and $\textbf{a}$ for the SQG model using given parameters
CreateLCDsrc/create_modon.jlFunctionHigh level wrapper function for calculating $\psi$, $q$ and $K$ for the Lamb-Chaplygin dipole using given parameters
CreateLRDsrc/create_modon.jlFunctionHigh level wrapper function for calculating $\psi$, $q$ and $K$ for the Larichev-Reznik dipole using given parameters
Eval_ψ_SQGsrc/create_modon.jlFunctionEvaluates ψ at specified depths in the SQG model
Eval_q_SQGsrc/create_modon.jlFunctionEvaluates q at specified depths in the SQG model
Eval_b_SQGsrc/create_modon.jlFunctionEvaluates b at specified depths in the SQG model
Eval_w_SQGsrc/create_modon.jlFunctionEvaluates w at (non-surface) depths in the SQG model
Calc_∇src/create_modon.jlFunctionCalculates the x and y derivatives of a given field