Versions Compared

Key

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

...

Configuration Of Model for Prediction Across Scales Setups (COMPASS) is an automated system to set up test cases that match the MPAS-Ocean repository. All namelists and streams files begin with the default generated from the Registry.xml file, and only the changes relevant to the particular test case are altered in those files.

...

Set up a COMPASS repository: for beginners

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

...

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

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

Load the compass

...

python package

The compass python package includes all the 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

You will also need to git clone an MPAS repo. It is usually best to start in the ocean/develop branch.

Setting up a test case

If you are new to MPAS

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.:

...

Code Block
cd $WORKDIR
./nightly_ocean_test_suite.py

Machine-Specific Instructions

The simplest way to set up a new repo is:

...

Set up a COMPASS repository with worktrees: for advanced users

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 once. Begin where you keep your repositories:

Code Block
mkdir compass
cd compass
git clone git@github.com:MPAS-Dev/compass.git master
cd master

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

Code Block
git remote add gitMoniker git@github.com:gitMoniker/compass.git
git fetch gitMoniker

To view all your remotes:

Code Block
git remote -v

To view all available branches, both local and remote:

Code Block
git branch -a

We will use the git worktree command to create a new local branch in its own unix directory.

Code Block
cd compass/master
git worktree add -b newBranchName ../newBranchName origin/master
cd ../newBranchName

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:

Code Block
cd MPAS-Model/ocean/develop/
# load modules (see machine-specific instructions below)
make gfortran CORE=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 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.

...

Machine-Specific Instructions

Slurm job queueing

Most systems now use slurm. Here are some basic commands:

...