MCD-PYTHON: python-based interface to the Mars Climate Database
Open source code and contact information available on github [no registration needed]
- To get sources through git
git clone https://github.com/aymeric-spiga/mcd-python
- To get sources through SVN
svn co https://github.com/aymeric-spiga/mcd-python/trunk mcd-python
- To get a static ZIP file of the current version of the code, click here
How to install?
It is assumed you were able to compile successfully the
mcd sources with
netCDF library should be installed on your system.
Moreover, from our experience, it seems that it must have been build
gfortran; the name of the option changes with compilers)
option which generates position independent code suitable for use in a shared library.
An example script is given in the
The installation below relies on
f2py utility, which is part of the
Getting the environment variables right: add the
PYTHONPATHin your environment file (e.g.
Modify the compile script
compile_fmcd.shto link your local
mcddistribution (Fortran sources)
f2pyis included in your
compile_fmcd.shand check for the created
.sofile (its size should be about 1 Mo)
Next step is to try and learn about the use of
mcd Python library with the
A more advanced example (direct use of
fmcd compiled with
f2py) is provided in the
Solution suggested by Aaron Berliner
This can be done using the 2to3 package and the reindent
Run 2to3 -v -n -W -f all mcd.py Run 2to3 -v -n -W -f all mcdcomp.py Run reindent mcd.py Run reindent mcdcomp.py
Then upgrade to the appropriate basemap in python3.