Torsional Axisymmetric Core Oscillations Visualiser (TACO-VIS): A Python module for animating torsional wave data for fluid planetary cores

The dynamics of liquid planetary cores is fundamental to planetary-scale phenomena such as the generation of a magnetic field. Understanding the relevant processes is a complex task because the fluid motion includes a wide range of convective and oscillatory behaviour. Visualisation of models, based either on observational data or computer simulations, is a key part of both scientific exploration and communication particularly to non-specialist audiences.


Summary
TACO-VIS provides a simple set of Python visualisation tools for 2D flow velocity data from fluid planetary interiors. It is mainly intended for animating torsional wave models for publication and presentation purposes. TACO-VIS is a lightweight module built only upon the common numpy/matplotlib Python packages and is free to be used and modified as the user requires.

Background
The dynamics of liquid planetary cores is fundamental to planetary-scale phenomena such as the generation of a magnetic field. Understanding the relevant processes is a complex task because the fluid motion includes a wide range of convective and oscillatory behaviour. Visualisation of models, based either on observational data or computer simulations, is a key part of both scientific exploration and communication particularly to non-specialist audiences.
In rapidly-rotating planets such as Earth, one important type of dynamical behaviour is longitudinal 'torsional' oscillations of concentric cylinders aligned with the rotation axis, each of which spans the height of the spherical core (Cox, Livermore, & Mound, 2013) (Figure 1). From an initial starting configuration, the azimuthal (longitudinal) velocity distribution of the cylinders propagates across the core owing to the restoring force of the magnetic field that threads through the cylinders. Because of this spatially dependant modulating effect from the magnetic field, observations of torsional oscillations can constrain the strength of the magnetic field hidden deep inside the core.
To address this, we present the first visualisation tool specifically for these oscillations. The Torsional Axisymmetric Core Oscillation VISualiser (TACO-VIS) is a simple open-source Python module which takes core flow velocity data for torsional waves and produces either static plots or animations. This data may be visualised as a series of rotating concentric cylinders in either a full 3D visualisation (Figure 2a) or in 2D as a slice through the equatorial plane (Figure 2b).
To make the cylindrical movement visible, we add a dotted-texture to each cylinder, which is advected as a tracer where positive velocities are taken to be in the eastward (anti-clockwise) direction. The number of cylinders is dictated by the number of radial points in the data and is therefore user controlled.
The 2D equatorial plane visualisation may alternatively plot the velocity data by contours rather than concentric cylinders (Figure 2c), useful as this does not strictly assume axisymmetry in the data and so flows other than torsional oscillations may actually be represented with this.  Cox et al. (Cox et al., 2013) approximated by 15 cylinders. The azimuthal velocity scale shown is non-dimensional and shared by both a) and b). c) shows a simple contour plot of example data that varies sinusoidally in radius and azimuth, also with a non-dimensional colour scale.
Examples of how to generate animations as well as full documentation are included within the repository for this code.
Benefits of TACO-VIS include: • The tools require only the commonly available Python packages numpy and matplotlib and the well maintained ffmpeg framework. • Generating an animation can be done in just a simple few lines of code, with examples provided. • All plots and movies are of publication grade, with user choices for the titles, resolution and frame rate of saved images/movie files. • The matplotlib animations often draw fast enough to be suitable to be viewed live (dataset depending) without the need to encode to a movie file first.