Skip to content

MOM6 CESM Quick Start

Alper Altuntas edited this page Feb 14, 2018 · 10 revisions

1. Check out CESM

  • Check out the following CESM branch tag: cesm2_0_beta06

    Users outside NCAR should visit the following web page to get help checking out CESM: http://www.cesm.ucar.edu/models/register/register.html

  • CD to your new local copy of CESM:

    cd cesm2_0_beta06
    
  • For convenience, save your CESM sandbox path as an environment variable. In Bash, for instance:

    export CESM_SRC_DIR=$(pwd)
    

In the remainder of this wiki page, $CESM_SRC_DIR refers to the path of your local CESM copy.

2. Update the components of CESM for MOM6:

2.1. Update CIME:

Clone the latest version of CIME and switch to altuntas/mom6 branch:

cd $CESM_SRC_DIR
rm -rf cime
git clone https://github.com/ESMCI/cime.git
cd cime
git checkout altuntas/mom6

2.2. Clone MOM6-cases repository:

Clone NCAR/MOM6-cases into $CESM_SRC_DIR/components, rename it mom and switch to the dev/cesm branch, as follows:

cd $CESM_SRC_DIR/components
git clone --recursive https://github.com/NCAR/MOM6-cases.git mom
cd mom
git checkout dev/cesm

If you are on hobart: Change line 82 in $CESM_SRC_DIR/components/mom/cime_config/buildlib as follows:

os.path.join(srcroot,"components","mom","src","mkmf","templates","hobart-mpi.mk")

2.3. Update MOM6: ($CESM_SRC_DIR/components/mom/src/MOM6):

MOM6 repository, which contains the actual MOM6 source code, is a submodule within the MOM6-cases repository. CD to MOM6 directory and check out dev/ncar branch as follows.

cd $CESM_SRC_DIR/components/mom/src/MOM6
git checkout dev/ncar

3. Create a case:

To test your CESM sandbox with MOM6, create and run an example case as follows. The case is 5-day C compset ( active ocean, active wave, data atm, data ice, data drof) with T62_g16 resolution (based on the corresponding displaced pole POP grid.)

  • Execute create_newcase script as follows:
$CESM_SRC_DIR/cime/scripts/create_newcase --case [YOUR-CASE-NAME] --compset CMOM --res T62_g16 --run-unsupported

[YOUR-CASE-NAME] may be any arbitrary name. An example case name that follows the CESM Naming Convention: cmom.e20.CMOM.T62_g16.001

  • Setup and build the case:
cd [YOUR-CASE-NAME]
./case.setup
./case.build
  • Copy the input files to the run directory as follows. (This step will soon be automated)

    • First, query your run directory as follows:
    ./xmlquery RUNDIR
    
    • Then, copy the MOM6 input files to the run directory:
    cp -r /glade/p/work/altuntas/mom.input/T62_g16/* YOUR_RUNDIR
    

    where YOUR_RUNDIR is the directory returned by ./xmlquery RUNDIR command.

  • Submit the case:

./case.submit