Periodic Coriolis force for planet with two equators #2001
-
Hi, I am trying to recreate a planet with two equators model (specifically in the ShallowWaterModel), as found in the supplementary materials from Delplace, Marston, and Venaille, “Topological Origin of Equatorial Waves.”, or also in Warneford and Dellar, “Super- and Sub-Rotating Equatorial Jets in Shallow Water Models of Jovian Atmospheres.”, referred to as the square planet. I want to set up a model with a periodic Coriolis force in Oceananigans and am having trouble doing so. Is it possible to somehow set up a changing Coriolis force in y such that the sine wave vanishes twice? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Oh my periodic Coriolis! There's two ways to achieve this. One is to implement the desired Coriolis force as a forcing function. I suspect you'll need to use https://clima.github.io/OceananigansDocumentation/stable/model_setup/forcing_functions/ and also our implementation of Coriolis stencils for spherical domains: https://github.com/CliMA/Oceananigans.jl/blob/main/src/Coriolis/hydrostatic_spherical_coriolis.jl For example, you might need something like using Oceananigans.Operators: Δx_vᶜᶠᵃ, Δy_uᶠᶜᵃ, Δxᶠᶜᵃ, Δyᶜᶠᵃ
const f0 = 1e-4
const Ly = 2*pi
@inline f(y) = f0 * sin(4*pi*y/Ly)
@inline f_ℑx_vᶠᶠᵃ(i, j, k, grid, v) = f(ynode(Face, j, grid)) * ℑxᶠᵃᵃ(i, j, k, grid, Δx_vᶜᶠᵃ, v)
@inline f_ℑy_uᶠᶠᵃ(i, j, k, grid, u) = f(ynode(Face, j, grid)) * ℑyᵃᶠᵃ(i, j, k, grid, Δy_uᶠᶜᵃ, u)
@inline crazy_x_f_cross_U(i, j, k, grid, fields) =
@inbounds + ℑyᵃᶜᵃ(i, j, k, grid, f_ℑx_vᶠᶠᵃ, fields.v) / Δxᶠᶜᵃ(i, j, k, grid)
@inline crazy_y_f_cross_U(i, j, k, grid, fields) =
@inbounds - ℑxᶜᵃᵃ(i, j, k, grid, f_ℑy_uᶠᶠᵃ, fields.u) / Δyᶜᶠᵃ(i, j, k, grid)
u_coriolis_forcing = Forcing(crazy_x_f_cross_U, discrete_form=true)
v_coriolis_forcing = Forcing(crazy_y_f_cross_U, discrete_form=true) A second possibility is either to add a new coriolis implementation (something like |
Beta Was this translation helpful? Give feedback.
Oh my periodic Coriolis! There's two ways to achieve this. One is to implement the desired Coriolis force as a forcing function. I suspect you'll need to use
DiscreteForcing
, because you'll have to write the Coriolis stencil carefully to get either enstrophy or energy conserving results. For this option you can check out the docs on forcing functions:https://clima.github.io/OceananigansDocumentation/stable/model_setup/forcing_functions/
and also our implementation of Coriolis stencils for spherical domains:
https://github.com/CliMA/Oceananigans.jl/blob/main/src/Coriolis/hydrostatic_spherical_coriolis.jl
For example, you might need something like