jejjohnson / jejjohnson/spectraldiffx
Quasi-Geostrophic Model on a Sphere (QG Sphere)
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
### Formulation
QG equations on a rotating sphere, using spherical harmonics.
#### Governing Equation:
$$
\frac{\partial q}{\partial t} + \mathbf{u}\cdot\nabla q + \beta v = \nu \nabla^{2n}q - \mu q
$$
where $\beta$ is the planetary vorticity gradient, $q = \nabla^2 \psi$, $u = -\partial_y \psi$, $v = \partial_x \psi$.
#### Forcing/Initial Condition:
- Barotropic: random vorticity or jet profile
- Baroclinic: add vertical layers and wind forcing
#### Starter code snippet
```python
# Spherical harmonic grid
sphere = SphericalGrid2D(...)
# State
psi = ...
q = laplacian_sphere(psi)
# Advection, beta effect and tendencies
for t in timeline:
# Use spectraldiffx spherical operators for advection, laplacian
dqdt = -advect(q, u, v) - beta * v + viscosity_terms
```
#### Dependencies
- [nlocked by] PR: Spherical grid, spherical QG formulation, and layer-support
#### Reference: Vallis, Holton, Salmon texts.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.