readmm5v3 is a Python (http://www.python.org) module to access the files generated by the MM5 Modelling System. These files are FORTRAN binary unformatted files with a big header in each file and a sub-header at the beginnning of each data record in the file. The format is known as mm5v3 and is described here.
The module provides an easy access from Python to the header information and the data contained in these files. It also provides three executables to obtain information on a mm5v3 file (they are Python example scripts on the use of this module):
The module is developed by the Climate Variability Group at the University of the Basque Country.
The latest version of the module is available here along with previous versions:
Supported platforms:
Developers have tested this software on Linux (SuSE, RedHat and Debian versions) and Mac OS X (10.3.5) operating systems (big and little endian machines!!). The installation should be straightforward in any machine supporting python with distutils included, as the code is pure python (no C involved, by now). As of version 1.1.4, it should also work under Windows (thanks to K. Gebhart).
After downloading, unpack the file and enter the unpacked directory:
The module is distributed with distutils, so it is automatically build and installed with the command:
By default the module is installed into your Python distribution directories. If you prefer another location for the module (or if you are not root in the machine where you are installing the module) type:
and it will, then, be installed in /your/path/lib/python. Don't forget to add this path to the PYTHONPATH environment variable.
The syntax of the module emulates the access to NetCDF files from the module Scientific Python . There are two main constructors for the access to a single file and to multiple files.
At this stage the files are indexed (this can take a while if the files are large) for later random access to any time record of any variable in the file.
After one of these objects is created, the access to both single- and multiple-file objects is the same. To extract one variable (e.g. convective rainfall) and get its basic information:
And to access the data and date of a concrete record (e.g. the 7th):
Contact the
webmaster