Skip to content

Commit

Permalink
Merge 3e43aac into 204e04f
Browse files Browse the repository at this point in the history
  • Loading branch information
navidcy committed Jan 3, 2020
2 parents 204e04f + 3e43aac commit bc68b1e
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 19 deletions.
1 change: 1 addition & 0 deletions docs/make.jl
Expand Up @@ -20,6 +20,7 @@ sitename = "GeophysicalFlows.jl",
"Modules" => Any[
"modules/twodturb.md",
"modules/barotropicqg.md",
"modules/barotropicqgql.md",
"modules/multilayerqg.md"
],
"DocStrings" => Any[
Expand Down
18 changes: 7 additions & 11 deletions docs/src/modules/barotropicqg.md
@@ -1,9 +1,5 @@
# BarotropicQG Module

```math
\newcommand{\J}{\mathsf{J}}
```

### Basic Equations

This module solves the quasi-geostrophic barotropic vorticity equation on a beta-plane of variable fluid depth $H-h(x,y)$. The flow is obtained through a streamfunction $\psi$ as $(u, \upsilon) = (-\partial_y\psi, \partial_x\psi)$. All flow fields can be obtained from the quasi-geostrophic potential vorticity (QGPV). Here the QGPV is
Expand All @@ -14,20 +10,20 @@ $$\underbrace{f_0 + \beta y}_{\text{planetary PV}} + \underbrace{(\partial_x \up

The dynamical variable is the component of the vorticity of the flow normal to the plane of motion, $\zeta\equiv \partial_x \upsilon- \partial_y u = \nabla^2\psi$. Also, we denote the topographic PV with $\eta\equiv f_0 h/H$. Thus, the equation solved by the module is:

$$\partial_t \zeta + \J(\psi, \underbrace{\zeta + \eta}_{\equiv q}) +
$$\partial_t \zeta + \mathsf{J}(\psi, \underbrace{\zeta + \eta}_{\equiv q}) +
\beta\partial_x\psi = \underbrace{-\left[\mu + \nu(-1)^{n_\nu} \nabla^{2n_\nu}
\right] \zeta }_{\textrm{dissipation}} + f\ .$$

where $\J(a, b) = (\partial_x a)(\partial_y b)-(\partial_y a)(\partial_x b)$. On the right hand side, $f(x,y,t)$ is forcing, $\mu$ is linear drag, and $\nu$ is hyperviscosity. Plain old viscosity corresponds to $n_{\nu}=1$. The sum of relative vorticity and topographic PV is denoted with $q\equiv\zeta+\eta$.
where $\mathsf{J}(a, b) = (\partial_x a)(\partial_y b)-(\partial_y a)(\partial_x b)$. On the right hand side, $f(x,y,t)$ is forcing, $\mu$ is linear drag, and $\nu$ is hyperviscosity. Plain old viscosity corresponds to $n_{\nu}=1$. The sum of relative vorticity and topographic PV is denoted with $q\equiv\zeta+\eta$.

### Implementation

The equation is time-stepped forward in Fourier space:

$$\partial_t \widehat{\zeta} = - \widehat{\J(\psi, q)} +\beta\frac{\mathrm{i}k_x}{k^2}\widehat{\zeta} -\left(\mu
$$\partial_t \widehat{\zeta} = - \widehat{\mathsf{J}(\psi, q)} +\beta\frac{\mathrm{i}k_x}{k^2}\widehat{\zeta} -\left(\mu
+\nu k^{2n_\nu}\right) \widehat{\zeta} + \widehat{f}\ .$$

In doing so the Jacobian is computed in the conservative form: $\J(f,g) =
In doing so the Jacobian is computed in the conservative form: $\mathsf{J}(f,g) =
\partial_y [ (\partial_x f) g] -\partial_x[ (\partial_y f) g]$.

Thus:
Expand All @@ -39,10 +35,10 @@ $$\mathcal{N}(\widehat{\zeta}) = - \mathrm{i}k_x \mathrm{FFT}(u q)-

## Examples

- `examples/barotropicqg/decayingbetaturb.jl`: An script that simulates decaying quasi-geostrophic flow on a beta-plane demonstrating zonation.
- `examples/barotropicqg_betadecay.jl`: A script that simulates decaying quasi-geostrophic flow on a beta-plane demonstrating zonation.

- `examples/barotropicqg/forcedbetaturb.jl`: An script that simulates forced-dissipative quasi-geostrophic flow on a beta-plane demonstrating zonation. The forcing is temporally delta-corraleted and its spatial structure is isotropic with power in a narrow annulus of total radius `kf` in wavenumber space.
- `examples/barotropicqg_betaforced.jl`: A script that simulates forced-dissipative quasi-geostrophic flow on a beta-plane demonstrating zonation. The forcing is temporally delta-correlated and its spatial structure is isotropic with power in a narrow annulus of total radius `kf` in wavenumber space.

- `examples/barotropicqg/ACConelayer.jl`: A script that simulates barotropic quasi-geostrophic flow above topography reproducing the results of the paper by
- `examples/barotropicqg_acc.jl`: A script that simulates barotropic quasi-geostrophic flow above topography reproducing the results of the paper by

> Constantinou, N. C. (2018). A barotropic model of eddy saturation. *J. Phys. Oceanogr.*, **48 (2)**, 397-411.
56 changes: 56 additions & 0 deletions docs/src/modules/barotropicqgql.md
@@ -0,0 +1,56 @@
# BarotropicQGQL Module

### Basic Equations

This module solves the *quasi-linear* quasi-geostrophic barotropic vorticity equation on a beta-plane of variable fluid depth $H-h(x,y)$.
Quasi-linear refers to the dynamics that *neglect* the eddy--eddy interactions in the eddy evolution equation after an eddy--mean flow decomposition, e.g.,

$$\phi(x, y, t) = \overline{\phi}(y, t) + \phi'(x,y,t) ,$$

where overline above denotes a zonal mean, $\overline{\phi}(y, t) = \int \phi(x, y, t)\,\mathrm{d}x/L_x$ and prime denotes deviations from the zonal mean. This approximation is used in many process-model studies of zonation, e.g.,

- Farrell, B. F. and Ioannou, P. J. (2003). Structural stability of turbulent jets. *J. Atmos. Sci.*, **60**, 2101-2118.
- Tobias, S. M. and Marston, J. B. (2013). Direct statistical simulation of out-of-equilibrium jets. *Phys. Rev. Lett.*, **110 (10)**, 104502.
- Constantinou, N. C. (2014). Emergence and equilibration of jets in beta-plane turbulence: applications of Stochastic Structural Stability Theory. *J. Atmos. Sci.*, **71 (5)**, 1818-1842.
- Parker, J. B. and Krommes, J. A. (2013). Zonal flow as pattern formation. *Phys. Plasmas*, **20**, 100703.


As in the [BarotropicQG module](barotropicqg.md), the flow is obtained through a streamfunction $\psi$ as $(u, \upsilon) = (-\partial_y\psi, \partial_x\psi)$. All flow fields can be obtained from the quasi-geostrophic potential vorticity (QGPV). Here the QGPV is

$$\underbrace{f_0 + \beta y}_{\text{planetary PV}} + \underbrace{(\partial_x \upsilon
- \partial_y u)}_{\text{relative vorticity}} +
\underbrace{\frac{f_0 h}{H}}_{\text{topographic PV}}.$$

The dynamical variable is the component of the vorticity of the flow normal to the plane of motion, $\zeta\equiv \partial_x \upsilon- \partial_y u = \nabla^2\psi$. Also, we denote the topographic PV with $\eta\equiv f_0 h/H$. After we apply the eddy-mean flow decomposition above, the QGPV dynamics are:

$$\partial_t \overline{\zeta} + \mathsf{J}(\overline{\psi}, \underbrace{\overline{\zeta} + \overline{\eta}}_{\equiv \overline{q}}) + \overline{\mathsf{J}(\psi', \underbrace{\zeta' + \eta'}_{\equiv q'})} = \underbrace{-\left[\mu + \nu(-1)^{n_\nu} \nabla^{2n_\nu}
\right] \overline{\zeta} }_{\textrm{dissipation}} \ .$$

$$\partial_t \zeta' + \mathsf{J}(\psi', \overline{q}) + \mathsf{J}(\overline{\psi}, q') + \underbrace{\mathsf{J}(\psi', q') - \overline{\mathsf{J}(\psi', q')}}_{\textrm{EENL}} +
\beta\partial_x\psi' = \underbrace{-\left[\mu + \nu(-1)^{n_\nu} \nabla^{2n_\nu}
\right] \zeta'}_{\textrm{dissipation}} + f\ .$$

where $\mathsf{J}(a, b) = (\partial_x a)(\partial_y b)-(\partial_y a)(\partial_x b)$. On the right hand side, $f(x,y,t)$ is forcing (which is assumed to have zero mean, $\overline{f}=0$), $\mu$ is linear drag, and $\nu$ is hyperviscosity. Plain old viscosity corresponds to $n_{\nu}=1$. The sum of relative vorticity and topographic PV is denoted with $q\equiv\zeta+\eta$.

*Quasi-linear* dynamics **neglect the term eddy-eddy nonlinearity (EENL) term** above.

### Implementation

The equation is time-stepped forward in Fourier space:

$$\partial_t \widehat{\zeta} = - \widehat{\mathsf{J}(\psi, q)}^{\textrm{QL}} +\beta\frac{\mathrm{i}k_x}{k^2}\widehat{\zeta} -\left(\mu
+\nu k^{2n_\nu}\right) \widehat{\zeta} + \widehat{f}\ .$$

In doing so the Jacobian is computed in the conservative form: $\mathsf{J}(f,g) =
\partial_y [ (\partial_x f) g] -\partial_x[ (\partial_y f) g]$. The superscript QL in the Jacobian term above denotes that remove triad interactions that correspond to the EENL term.

Thus:

$$\mathcal{L} = \beta\frac{\mathrm{i}k_x}{k^2} - \mu - \nu k^{2n_\nu}\ ,$$
$$\mathcal{N}(\widehat{\zeta}) = - \mathrm{i}k_x \mathrm{FFT}(u q)^{\textrm{QL}}-
\mathrm{i}k_y \mathrm{FFT}(\upsilon q)^{\textrm{QL}}\ .$$


## Examples

- `examples/barotropicqgql_betaforced.jl`: A script that simulates forced-dissipative quasi-linear quasi-geostrophic flow on a beta-plane demonstrating zonation. The forcing is temporally delta-correlated and its spatial structure is isotropic with power in a narrow annulus of total radius `kf` in wavenumber space. This example demonstrates that the anisotropic inverse energy cascade is not necessary for zonation.
12 changes: 4 additions & 8 deletions docs/src/modules/multilayerqg.md
@@ -1,9 +1,5 @@
# MultilayerQG Module

```math
\newcommand{\J}{\mathsf{J}}
```

### Basic Equations

This module solves the layered quasi-geostrophic equations on a beta-plane of variable fluid depth $H-h(x,y)$. The flow in each layer is obtained through a streamfunction $\psi_j$ as $(u_j, \upsilon_j) = (-\partial_y\psi_j, \partial_x\psi_j)$, $j=1,...,n$, where $n$ is the number of fluid layers.
Expand Down Expand Up @@ -52,7 +48,7 @@ where
Including an imposed zonal flow $U_j(y)$ in each layer the equations of motion are:

```math
\partial_t q_j + \J(\psi_j, q_j ) + (U_j - \partial_y\psi_j) \partial_x Q_j + U_j \partial_x q_j + (\partial_y Q_j)(\partial_x\psi_j) = -\delta_{j,n}\mu\nabla^2\psi_n - \nu(-1)^{n_\nu} \nabla^{2n_\nu} q_j,
\partial_t q_j + \mathsf{J}(\psi_j, q_j ) + (U_j - \partial_y\psi_j) \partial_x Q_j + U_j \partial_x q_j + (\partial_y Q_j)(\partial_x\psi_j) = -\delta_{j,n}\mu\nabla^2\psi_n - \nu(-1)^{n_\nu} \nabla^{2n_\nu} q_j,
```

with
Expand Down Expand Up @@ -100,16 +96,16 @@ You can get $\widehat{\psi}_j$ from $\widehat{q}_j$ with `streamfunctionfrompv!(
The equations are time-stepped forward in Fourier space:

```math
\partial_t \widehat{q}_j = - \widehat{\J(\psi_j, q_j)} - \widehat{U_j \partial_x Q_j} - \widehat{U_j \partial_x q_j}
\partial_t \widehat{q}_j = - \widehat{\mathsf{J}(\psi_j, q_j)} - \widehat{U_j \partial_x Q_j} - \widehat{U_j \partial_x q_j}
+ \widehat{(\partial_y\psi_j) \partial_x Q_j} - \widehat{(\partial_x\psi_j)(\partial_y Q_j)} + \delta_{j,n}\mu k^{2} \widehat{\psi}_n - \nu k^{2n_\nu} \widehat{q}_j
```

In doing so the Jacobian is computed in the conservative form: $\J(f,g) =
In doing so the Jacobian is computed in the conservative form: $\mathsf{J}(f,g) =
\partial_y [ (\partial_x f) g] -\partial_x[ (\partial_y f) g]$.


Thus:

$$\mathcal{L} = - \nu k^{2n_\nu}\ ,$$
$$\mathcal{N}(\widehat{q}_j) = - \widehat{\J(\psi_j, q_j)} - \widehat{U_j \partial_x Q_j} - \widehat{U_j \partial_x q_j}
$$\mathcal{N}(\widehat{q}_j) = - \widehat{\mathsf{J}(\psi_j, q_j)} - \widehat{U_j \partial_x Q_j} - \widehat{U_j \partial_x q_j}
+ \widehat{(\partial_y\psi_j)(\partial_x Q_j)} - \widehat{(\partial_x\psi_j)(\partial_y Q_j)} + \delta_{j,n}\mu k^{2} \widehat{\psi}_n\ .$$

0 comments on commit bc68b1e

Please sign in to comment.