Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

THIS PAGE HAS BEEN REPLACED BY COMPASS READ-THE-DOCS. PLEASE GO THERE.

Information on this page is no longer updated.

Table of Contents

Overview

...

To begin, obtain the master branch of the compass repository with:

Code Block
git clone git@github.com:MPAS-Dev/compass.git
cd compass
git submodule update --init --recursive

...

Code Block
cd MPAS-Model/ocean/develop/
# load modules (see machine-specific instructions below)
make gfortran CORE=ocean

Load the compass

...

conda environment

The compass python package conda environment includes all the python libraries needed to run compass scripts. It is maintained on our standard machines:

Code Block
# on LANL IC:
source /usr/projects/climate/SHARED_CLIMATE/anaconda_envs/load_latest_compass.sh
# at NERSC:
source /global/cfs/cdirs/e3sm/software/anaconda_envs/load_latest_compass.sh

To install your own compass environment, see https://github.com/MPAS-Dev/MPAS-Model/blob/ocean/develop/testing_and_setup/compass/README_ocean.md on other machines:

Code Block
# Do this once:
conda create -n compass_0.1.11 -c conda-forge -c e3sm python=3.7 compass=0.1.11
# Do this every time you need to load the compass environment
conda activate compass_0.1.1

Setting up a test case

If you are new to MPAS-Ocean, it is easiest to download a prepared test case. To see all available test cases you can make yourself in compass, start in the ocean/develop branch.:

...

--work_dir /lustre/scratch4/turquoise/mpeterse$USER/runs/191210_test_new_branch

and general.config.ocean is a file that specifies directory and file paths. You can either add paths to the repo file in that directory, or you can use these files, which use my paths:

...

This section uses git worktree, which provides more flexibility but is more complicated. See the beginner section above for the simpler version. In the worktree version, you will have many unix directories, and each corresponds to a git branch. It is easier to keep track of, and easier to work with many branches as at once. Begin where you keep your repositories:

...

The MPAS-Dev/compass is now origin. You can add more remotes. For example

Code Block
git remote add gitMonikermark-petersen git@github.com:gitMonikermark-petersen/compass.git
git fetch gitMonikermark-petersen

To view all your remotes:

...

In this example, we branched off origin/master, but you could start from any branch, which is specified by the last git worktree argument.

The MPAS repository is a submodule of COMPASS repository. For example, to compile MPAS-Ocean:

...

In each new branch directory that you make, you will need to alter the general.config.ocean file to point to the MPAS executable and files. There are two ways to point to the MPAS executable:

  1. Compass submodule (easier): This guarantees that the MPAS commit matches compass.

    Code Block
    git submodule update --init --recursive
    cd MPAS-Model/ocean/develop/
    # load modules (see machine-specific instructions below)
    make gfortran CORE=ocean
  2. Other MPAS directory (advanced): Create your own MPAS repository elsewhere on disk, and point general.config.ocean to that. The user must ensure that flag names and test cases match appropriately. The simplest way to set up a new MPAS repo in a new directory is:

    Code Block
    git clone git@github.com:MPAS-Dev/MPAS.git your_new_branch
    cd your_new_branch
    git checkout -b your_new_branch origin/ocean/develop

    Note that for ocean development, it is best to branch from ocean/develop.

...

cori, gnu

Code Block
languagebash
module switch PrgEnv-intel PrgEnv-gnu
module load cray-netcdf-hdf5parallel
module load cray-parallel-netcdf
module load cmake
source /global/project/projectdirs/e3sm/software/anaconda_envs/load_latest_e3sm_unified.sh
export PIO=/global/u2/h/hgkang/my_programs/Scorpio
git submodule update --init --recursive

# debug:
make gnu-nersc CORE=ocean USE_PIO2=true OPENMP=false DEBUG=true GEN_F90=true

# optimized:
make gnu-nersc CORE=ocean USE_PIO2=true OPENMP=false

...