To install the Earth System Modelling Framework Python interface (ESMPy) on OSX Mavericks follow these steps.
1. Install OpenMPI by downloading the source code here. Next, unpack the source code to a location on your hard drive.
In the root folder of the etxracted source code, execute the following:
If the compilation was successful, continue with the installation.
Finally, add the installation directory to your PATH variable unless it is already present (do this in iether your .bashrc or .profile file):
2. Download the ESMF package. You have to provide your email address prior to doing so. When the tar package has been downloaded extract it to a location on your hard drive.
You can also download the bleeding edge development of this toolbox through git repository:
Next, move into the source files root folder and define the following environmental variables:
export ESMF_NETCDF_LIBS="-lnetcdf -lnetcdff"
I decided to compile ESMF and ESMPy using the Clang C compiler that ships with OSX Mavericks in combination with Intel Fortran and thats why I use the option ESMF_COMPILER=intelclang. I contacted ESMF and received the git (bleeding edge) version of the ESMF to be able to use the Clang compiler as support for this compiler is in progress. I also received fantastic support from ESMF to get this to work. (Thanks Walter and Ryan!). Next, compile the source code:
If successfull, run the tests to make sure everything is okay before installing to the directory specified earlier by ESMF_INSTALL_PREFIX:
Next I also wanted to install ESMPy, the Python interface to ESMF. To do this start by moving into folder
before you run the build and install commands:
This installed the ESMF module (ESMPy) into directory:
Finally, I wanted to test that everything worked fine and ran the unit tests:
Unit test results: run_unit_test.log
PASS = 41
FAIL = 0
SKIP = 2