pycon logo

PyCon 2011 Atlanta

March 9th–17th

Log in or Sign Up

Python in Atmospheric Sciences

log in to bookmark this presentaton

Novice / Poster
Python and the scientific ecosystem provide plenty of tools to ease the computation life of atmospheric scientists. Open-source and the free nature of this ecosystem greatly facilitate reproducibility and openness in research. In this poster, the use of Python / Cython languages, NumPy, SciPy, and Matplotlib libraries, and other related tools will be demonstrated in a cloud modeling application.


This poster demonstrates key components of scientific data analysis and visualization ideas that are used in a Python implementation of a cloud parcel model. We first start with dataset handling (e.g. NetCDF file reading) and fundamental array processing features of NumPy library (e.g. indexing, slicing, masking of arrays). Later in the analysis we demonstrate basic techniques to perform regression analysis and optimization procedures (e.g. least squares curve-fitting and numerical root solving) and statistical analysis of 1/2D data by using NumPy and SciPy libraries. Visualization examples illustrate time-series and uncertainty analysis plots (e.g. box-and-whisker and errorbar) and probability density function histograms in assessing the cloud model initialization and resulting data through Matplotlib plotting library. Code profiling and basic optimization techniques are demonstrated using Cython compiled functions to boost code execution speed. The cloud model has a great use of IPython interactive interpreter throughout the past and on-going development, and Eclipse + PyDev extension have been helpful in managing the complexity of the project. Although the focus of this presentation is on a specific research area in atmospheric sciences, the analysis and visualization techniques demonstrated within the poster could easily be applied to any of the observational data driven science disciplines.