Python
is a great programming language, and I am heavily into using it to solve a variety of problems. One of the nice things is that Python has modules written for every possible task (interacting with Unix OS, php, even Fortran) and so one can leverage off of a large community that has written probably what you need (or nearly) already and its freely available. Unlike CSH or Perl, the language elements are very readable so that someone can very quickly figure out what is going on and probably even alter the code.
Python has an excellent set of language features, including:
- Built in ability to interface to Fortran-90, C, C++, and Objective-C modules through the CXX, SWIG and Pyfort utilities
- Completely open source and freely distributable under GPL
- Runs on almost all available platforms (Unix, Mac, Windows, NT, Linux)
- An object orientated programing model
- Built in ability to interface to Fortran-90, C, C++, and Objective-C modules through the CXX, SWIG and Pyfort utilities
- Has a large community developing and maintaining source modules
- Can be implemented as a scripting language as well as a program language
- Has numerical, scientific, Tkinter/GUI bindings and modules for doing a wide variety of tasks
- Is simple to learn
The following papers offer more opinions on the advantages/disadvantages of Python:
- Joseph VanAndel's article on implementing radar software for NCAR in Python
(excellent review) - Implementing astronmical analysis software Python

- Climate database software in Python

- Python Advocacy in IT-World Canada magazine

How we use Python for our work
Over the last several years David Dowell, Ted Mansell, and I have been developing a Ensemble Kalman filter control system for convective scale data assimilation of radar and other types of data (such as surface or sounding data). We are designing the system using Python as the top level control language. We have done some work integrating Python and our Fortran codes using the F2PY
utility, but for now use Python as the glue for managing our parameter data and connecting our fortran codes together.
Python in scientific computing: Advocacy
- Lecture on Scripting Languages and Scientific Computing, Hans Petter Langtangen

If you want to know why you should be using scripting languages in your computing here is one of the great summary pieces I have found on the web. Dr. Langtangen gives a great lecture/course set of slides here - covers basic language elements (both Tcl, Perl, and Python), GUI's, efficiency, combinging scripting languages with C and Fortran, etc. If you want a good overview - this is the one you want. - Improving Scientific Productivity using Python: An example from an Ensemble Data Assimilation System in Meteorology (.pdf, 546 kB)
PDF slides from a talk I gave on Oct. 3, 2006 to the OU Supercomputing Symposium on our uses of Python in our ensemble Kalman filter data assimilation system. - Improving Scientific Productivity using Python: An example from an Ensemble Data Assimilation System in Meteorology (.pdf, 1.07 MB)
PDF slides from an updated version of the OSCAR talk (above) I gave on Oct. 20, 2006 to NWC NWP/Data Assimilation and Convective Dynamics seminar group the uses of Python in our scientific work within our data assimilation group.
Python reference books I use
- Learning Python, Mark Lutz and David Ascher, O'Reilly Publishers.
This is an excellent overview book which can get you started. I have the 1st edition, and there is an updated one out, but I actually like the 1st edition better. Nevertheless, I use it often. - Python (Visual Quick Start Guide), Chris Fehly, Peach Pit Press.
Once you know the language to a certain degree, this book is full of examples of small bits of code to do all the little tasks needed to create a bigger piece of code. I use this a lot just for a reference. - Python Scripting for Computational Science, Hans Petter Langtangen, Springer
If you liked the lecture notes from Dr. Lantangen, then buy the book. This has about all you need to know about using Python in scientific programing. Once you know the language to a certain degree, this book is full of examples of small bits of code to do all the little tasks needed to create a bigger piece of code. I use this a lot as a algorithm reference.
