Personal Linux/OSX Machine

This approach worked for xylar under Ubuntu 18.04 and vanroekel under Max OS X 10.14.6.

Installation of MPAS dependencies including SCORPIO and the compass conda environment

First, run the following script in an empty directory that you can delete later:

set -e

export PNETCDF_VERSION=1.12.0
export SCORPIO_VERSION=1.1.1

# modify this to fit your system
export CONDA_PATH=/home/xylar/miniconda3

source ${CONDA_PATH}/etc/profile.d/

conda create -y -n mpas -c e3sm python=3.8 "compass=0.1.6=mpi_mpich*" \
    netcdf-fortran mpich fortran-compiler cxx-compiler c-compiler m4 git cmake

conda activate mpas

# modify this
export PREFIX="${CONDA_PATH}/envs/mpas"

export MPICC=mpicc
export MPICXX=mpicxx
export MPIF77=mpifort
export MPIF90=mpifort
export LDFLAGS="-L${PREFIX}/lib"

rm -rf pnetcdf-${PNETCDF_VERSION}*


tar xvf pnetcdf-${PNETCDF_VERSION}.tar.gz
cd pnetcdf-${PNETCDF_VERSION}

./configure --prefix=${PREFIX}
make install

cd ..

rm -rf scorpio*

git clone
cd scorpio
git checkout scorpio-v$SCORPIO_VERSION

mkdir build
cd build
CC=mpicc FC=mpifort cmake -DCMAKE_INSTALL_PREFIX=$PREFIX \

make install

cd ../..

Setup before compiling/running

Then, when you want to build or run MPAS-Ocean, source a file containing:

conda activate mpas
# Modify this path to point to your mpas conda environment
export PREFIX="/home/xylar/miniconda3/envs/mpas"
# this step might not be needed
export MPAS_EXTERNAL_LIBS="-L${PREFIX}/lib -lnetcdff"
export PIO=${PREFIX}
# change to one of the other cores as needed
export AUTOCLEAN=true