Code

Short codes I have developed as part of my research. Please let me know if you decide to use one or have any questions.

Binning Data by ω500 Velocities

Function to bin data by ω500 velocities, as done by Bony et al. (2004) and many others.

w500_bin.py

Multi-Taper Spectral Analysis

This script includes functions to compute the power spectrum of a signal and to perform a coherence analysis of two time-series using the multi-taper method. These are basically just Python versions of the Matlab functions available from Peter Huybers' website. Requires the spectrum Python module.

multi_taper_analysis.py

Eddy Flux Co-Spectra

Function for calculating eddy flux co-spectra, following method of Hayashi (1971) (see also Randel and Held (1991)). Includes functions to calculate space-time cross-spectra and phase-speed cross-spectrum.

eddy_co_spectra.py

2-layer QG Model

Stand-alone, parallelized Python script for a pseudo-spectral 2-layer quasi-geostrophic model. The domain is doubly-periodic and, out of the box, the model is forced by interacting with a zonally-uniform mean-flow, as well as by surface friction and radiative damping, following Panetta and Held (1988), but this can be easily changed. Non-linear terms are de-aliased using the Orszag (1971) "two-thirds" rule and note that all variables are non-dimensionalized.

parallel_full_QG.py

Growth rates and streamfunction

Growth rates and upper level streamfunction after 200 time-steps.