Skip to content

Instantly share code, notes, and snippets.

@raphaeldussin
Created July 24, 2016 20:14
Show Gist options
  • Save raphaeldussin/eca2594a314287876ebb3273ddc1dfc1 to your computer and use it in GitHub Desktop.
Save raphaeldussin/eca2594a314287876ebb3273ddc1dfc1 to your computer and use it in GitHub Desktop.
installing ESMF 7.0.0 on Ubuntu Linux gfortran+netcdf+openmpi
#!/bin/bash
# installing ESMF on Ubuntu Linux
# pre-req : gfortran, netcdf, openmpi, python3
# first mkdir /opt/esmf/7.0.0 and chown to yourself
# you also need a copy of esmf_7_0_0_src.tar
# Raphael Dussin, July 2016
PYTHONBIN=/opt/Anaconda3/4.1.1/bin/
CUSTOMINSTALLDIR=/opt/esmf/7.0.0
#------------------ installing the ESMF libraries ---------------
tar -xf esmf_7_0_0_src.tar
cd esmf
export ESMF_DIR=$( pwd )
export ESMF_INSTALL_PREFIX=$CUSTOMINSTALLDIR
export ESMF_COMM=openmpi
export ESMF_NETCDF=split
export ESMF_NETCDF_INCLUDE=/usr/include
export ESMF_NETCDF_LIBPATH=/usr/lib
export ESMF_NETCDF_LIBS="-lnetcdff -lnetcdf"
make
make install
# At this point you should have ESMF installed
#------------------ installing the python3 wrapper ---------------
cd ..
git clone https://github.com/raphaeldussin/ESMPy3.git ESMPy3
cd ESMPy3
$PYTHONBIN/python setup.py build --ESMFMKFILE=$CUSTOMINSTALLDIR/lib/libO/Linux.gfortran.64.openmpi.default/esmf.mk install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment