-
Notifications
You must be signed in to change notification settings - Fork 7
Getting Started
For detailed instructions, see NOAA-GFDL wiki.
The steps of running MOM6 cases:
Clone NCAR/MOM6-cases git repository as follows:
$ git clone --recursive https://github.com/NCAR/MOM6-cases.git
In the rest of this wiki, your local NCAR/MOM6 clone directory will be referred to as $MOM6-cases/
Note that the option --recursive
is to clone the submodules simultaneously.
Load the modules as follows:
$ module load ncarenv
$ module load intel
$ module load netcdf
$ module load ncarcompilers
$ module load mpt/2.15f
To automate this step, see section Cheyenne Compiler Environment
see NOAA-GFDL wiki
NCAR/MOM6-cases currently depends on two external libraries:
- FMS: a framework for constructing and executing cases
- mkmf: a tool to construct case makefiles
These are saved under src/ directory along with NCAR/MOM6 submodule. (These two libraries will eventually be replaced by NCAR/MOM6- and CESM-specific packages.)
As described in NOAA-GFDL wiki, the common phases of compiling FMS (shared library) and MOM6 executable are:
-
Using the
list_path
tool that comes with mkmf, create apath_names
file that contains the relative path to the source files. -
Using mkmf script, create a
makefile
. -
Compile the shared library or MOM6 executable.
Before compiling MOM6, compile the FMS shared code.
First, generate the makefile for FMS. In the MOM6-cases/ directory:
$ cd $MOM6-cases/
$ mkdir -p build/intel/shared/repro/
$ cd build/intel/shared/repro/
$ rm -f path_names
$ ../../../../src/mkmf/bin/list_paths ../../../../src/FMS
$ ../../../../src/mkmf/bin/mkmf -t ../../../../src/mkmf/templates/cheyenne-intel.mk -p libfms.a -c "-Duse_libMPI -Duse_netCDF -DSPMD" path_names
Build FMS (libfms.a):
make NETCDF=3 REPRO=1 libfms.a -j
With the FMS library compiled, generate the makefile for NCAR/MOM6:
$ cd $MOM6-cases/
$ mkdir -p build/intel/ocean_only/repro/
$ cd build/intel/ocean_only/repro/
$ rm -f path_names
$ ../../../../src/mkmf/bin/list_paths ./ ../../../../src/MOM6/{config_src/dynamic,config_src/solo_driver,src/{*,*/*}}
$ ../../../../src/mkmf/bin/mkmf -t ../../../../src/mkmf/templates/cheyenne-intel.mk -o '-I../../shared/repro' -p MOM6 -l '-L../../shared/repro -lfms' -c '-Duse_libMPI -Duse_netCDF -DSPMD' path_names
Finally, compile NCAR/MOM6:
make NETCDF=3 REPRO=1 MOM6 -j
TODO