Skip to content

Instantly share code, notes, and snippets.

@cpelley
Created October 22, 2013 09:11
Show Gist options
  • Save cpelley/7097521 to your computer and use it in GitHub Desktop.
Save cpelley/7097521 to your computer and use it in GitHub Desktop.
esmf + ESMPy install
# Specify tag release
export ESMPY='620_01b'
# Download archive if not done already
archive=ESMPy_${ESMPY}.tar.bz2
if [ ! -f ${archive} ]; then
echo 'Downoading archive'
wget http://www.earthsystemmodeling.org/python_releases/ESMPy_${ESMPY}/${archive}
fi
echo 'Extracting archive'
rm -rf ESMPy_${ESMPY}
tar -xvf ESMPy_${ESMPY}.tar.bz2
cd ESMPy_${ESMPY}
export ESMF_DIR=$(ls -d $(bash -c "pwd -LP")/esmf)
export ESMPY_DIR=$(ls -d $(bash -c "pwd -LP")/esmpy)
# Build ESMF
cd ${ESMF_DIR}
make
export ESMFMKFILE=$(find $ESMF_DIR -iname esmf.mk)
# Build ESMPy
cd ${ESMPY_DIR}
python setup.py build
# Add ESMPy to python path
echo "${ESMPY_DIR}/src/" >~/.local/lib/python2.7/site-packages/esmpy.pth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment