This archive contains the Python code used to analyse and plot the data in Hammond & Lewis 2021, "The rotational and divergent components of atmospheric circulation on tidally locked planets", as well as the data from the "terrestrial" simulation of the atmosphere of a rocky planet in ExoFMS. It contains three files: 1) HL21_plotter.ipynb This is a Jupyter notebook containing Python code. It reads the data from the ExoFMS simulation and finds its rotational and divergent parts. It then plots the figures used in Hammond & Lewis 2021. 2) data/rotdiv-terr-control-1000-2000_atmos_average_interp.nc The "terrestrial" simulation output, interpolated to uniform pressure levels. This is used to plot quantities such as velocity at a constant pressure. 3) data/rotdiv-terr-control-1000-2000_atmos_average.nc The "terrestrial" simulation output, on the raw model sigma-pressure levels. This is used to calculate the dry static energy budget. The paper also uses a "Hot Jupiter" simulation from the THOR GCM. This is from "THOR 2.0: Major Improvements to the Open-Source General Circulation Model" (Deitrick et al. 2020). The data is available on request to Russell Deitrick (russell.deitrick@csh.unibe.ch). The same analysis can be made using HL21_plotter.ipynb, with small modifications due to the different grid in THOR.