(c) 2026 RMIB - Climdyn - Dynamical Meteorology and Climatology
See LICENSE for license information.
This software is provided as supplementary material with:
- Vannitsem, S., and Demaeyer, J.: Emergence of chaos in the tropical atmosphere: Study of the Weak Temperature Gradient system. Submitted to Nonlinear Processes in Geophysics.
Please cite this article if you use (a part of) this software for a publication.
The authors would appreciate it if you could also send a reprint of your paper to jonathan.demaeyer@meteo.be and svn@meteo.be.
Consult the WTG-TM code repository for updates, and our website for additional resources.
Installing the scripts can be done using git:
git clone https://github.com/Climdyn/WTG-TM.git && cd WTG-TMThe code requires at least Python 3.10 and the LayerCake framework. In addition, the qgs model integrators and Lyapunov estimators are also used. To install LayerCake and qgs, the simplest way is to use pip. In a terminal, run:
pip install layercake-model
pip install qgsand you are set. In addition, the generated Fortran codes need to be compiled, for example with GNU Fortran.
Finally, the generation of the movies requires the separate installation of FFmpeg.
The model is defined first in the model_definition.py module, using the LayerCake syntax.
This module is then imported in various scripts:
Upon running
python generate_fortran_code.pythis code will generate a file WTG-TM_Heun.f90 with by default the equations of the model truncated at wavenumber 2.
These equations are then integrated with the Heun algorithm to give
the time evolution of the model.
The Fortran code can then be compiled and run with:
gfortran WTG-TM_Heun.f90 && ./a.outThis result in a file evol_field.dat being produced, with the first column being the time, and the others being the
spectral components gfortran, but other compilers should work as well.
This code will generate and print the equations of the model in LaTeX. It was used to get the equations appearing in the manuscript above. By default, it will print the equations of the model truncated at wavenumber 2, but this can be changed by editing the script.
This code computes a trajectory of the model and saves it like the Fortran code does, but in addition it rescales the
time in days.
By default, it also generates a movie of the spatial fields of the model, saved in the file movie.mp4, but this can
be deactivated.
Again, by default, it will compute the model truncated at wavenumber 2, but this can be changed by editing
the script. The forcing model_definition.py module.
This script computes and plots the Lyapunov spectrum, using the qgs integrators.
By default, it will compute this for the model truncated at wavenumber 2, but this can be changed by editing
the script. The forcing model_definition.py module.
