This is a collection of tips and examples on using Python in the earth sciences, with an emphasis on climate science. We focus solely on standard Python, Numerical Python, and the analysis and plotting routines in the Climate Data Analysis Tools (CDAT) suite.
This collection of tips/examples is neither "official" nor comprehensive. For more details about these packages, see the:
General Python references (some referenced herein) that have helped me include:
If you have any comments, questions, additions, and corrections for this page, please send me (Johnny Lin) email.
Numeric arrays? Can you concatenate along
"extra" dimensions like you can in IDL?where in IDL and
find in MATLAB)?and and or operations on arrays?print command?Numeric/numarray functions?vcs.getcolors function?Numeric array?imagesc function and make plots with
color bars that are scaled over the same range?plot method
x|yrev keyword work to reverse the axis?plot keyword
name?MA vs.
Numeric?MA
have a default missing value?Numeric/numarray functions?Numeric/numarray functions?