Python

Software review by courtesy of IGWMC and CSM
By Vincent Post,
Vrije Universiteit, Amsterdam, The Netherlands

Although not strictly a hydrogeological tool, the programming language Python is of interest to the hydrological community because of its computational and graphing capabilities. Best of all: it is free. A good place to learn about Python is www.python.org. Downloads are available for several operating systems. The version that is considered in this review is the Enthought Distribution (www.enthought.com) that runs under Windows.

Installation of the software is straightforward. After installation the Python Shell can be started. This is a command-line interpreter: Commands that are entered are passed to the interpreter and directly executed. The result is echoed to the screen. For example, entering 24 * 3600 will display 86400 on the screen. Various analytical solutions can be programmed easily with greater flexibility than a spreadsheet.

Of the many packages that come with the Enthought Distribution, the NumPy and SciPy packages will especially appeal to hydrologists. NumPy is the library for working with multidimensional arrays, i.e. matrices. SciPy builds on NumPy and has more advanced matrix manipulation tools as well as parameter optimization functions. Numerical models can also easily be built and solved, which cannot be used only in practice, but also for teaching. Matplotlib is the package to create charts and maps. A library of possible applications can be found at http://matplotlib.sourceforge.net/screenshots.html.  

MATLAB users may recognize many of the above mentioned features. For many users Python could serve perfectly well as a replacement for MATLAB. However, conversion of m-files to their Python equivalent (py-files) must be done largely by hand though.

Dedicated hydrological packages are emerging such as the TimML package by Mark Bakker (http://bakkerhydro.org) for simulating steady-state multiaquifer flow with analytic elements. Moreover, Python is used as the macro language in ArcGIS.

One potential downside of Python (and freeware in general) is that the support is limited. When one needs help, many books about Python are available and there is an active on-line community. Nevertheless, the learning curve can be steep for novice users.

Python is a tool that should be in the software toolbox of every hydrologist. Its powerful capabilities rival those of commercial products. Its freeware status makes it accessible to everyone, including students, private consultants and people in developing countries.

Rating System
5=Excellent, 4=Very Good, 3=Good, 2=Satisfactory, 1=Poor

Application
Analysis Interface
Best Feature
Computational and Graphical Capabilities
GUI
4
Worst Feature
Documentation
Output/Plotting
5
Speed
4
Ease of Use
3
Documentation
3
Overall Rating
4