Python routines to compute and display inertial modes of a full sphere according to the analytical solution provided by Zhang et al. 2001, JFM.
Requires the libraries cartopy and pyvista for 2D map projections and 3D plots (surfaces of constant radius and isosurfaces). Install the package and its dependencies from the repository root with pip install . (or pip install -e . for development).
-
inerMod: This is the inertial mode class. Contains the subclassesvelandgridand methodssurf,slice,equatandisofor visualisation. -
vel: This is the velocity class. Provides the three velocity components of a mode. Contains the subclassgrid. -
grid: This provides access to the grid variables (r,\theta,\phi), including 3D ones. -
sigma: This provides the half-frequencies for a single mode defined by (l,m,N).
Run the test suite with pytest from the repository root. It checks the frequencies against the values in Zhang et al. (2001) (figures 1, 2 and table 1), verifies that the velocity fields satisfy the governing equations, boundary condition and equatorial symmetries, and renders every plot off-screen. The 3D plotting tests are skipped if pyvista is not installed.