# NEMO-3.1 and CONCEPTS-110 Reference Repos¶

These notes describe the NEMO-3.1 and CONCEPTS-110 reference repositories.

The construction of the NEMO-3.1 repo is described in NEMO-3.1 below. The CONCEPTS-110 repo was constructed from the CODE.tar tarball received on 2-Oct-2013 from J-P Paquin.

Also included here is an analysis of the differences between the NEMO/ directory trees in the 2 repos that was done early in the Salish Sea MEOPAR project in Oct-2013.

## NEMO-3.1¶

The following steps took the NEMO-3.1 repo from initialization to a checkout of https://forge.ipsl.jussieu.fr/nemo/svn/tags/nemo_v3_1 that could be built on jasper.westgrid.ca and used to successfully run the GYRE configuration:

• An svn checkout of the trunk of the modipsl framework was done from http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk. That yielded revision 2163. The repo state was tagged as modipsl-r2163.

Note

At this point the only directories in the modipsl tree that are populated at doc/ and util/. The bin/, config/, lib/, modeles/, and tmp/ directories are empty and therefore not included in the Mercurial repo.

• Added J-P Paquin’s build script and util/AA_make.gdef from 2-Oct-2013 CODE.tar tarball. The latter is named AA_make.gdef_BIO.

• Added definitions for util/model script to util/mod.def to get NEMO-3.1 based on those in that file in the 2-Oct-2013 CODE.tar tarball.

• Used the modipsl/util/model script to obtain the NEMO-3.1 code and other supporting files. The commands to do so were:

cd modipsl/util
./model NEMO_31


Added the resulting 1295 files (some of which are in .svn/ directories).

• Added global makefile definitions for jasper.westgrid.ca and the BIO HPC cluster to util/AA_make.gdef. The source for the former was Paul Myers’ NEMO-3.1 installation on jasper in /home/pmyers/NEMODRAK_3.1/DRAKKAR/modipsl/util/AA_make.gdef. The latter came from uitl/AA_make.gdef in the 2-Oct-2013 CODE.tar tarball.

### Build and Run NEMO-3.1¶

Note

These instructions are included for completeness. The Salish Sea MEOPAR project does not use pristine NEMO-3.1.

1. Clone the repository from Bitbucket and update it to the NEMO-3.1 tag state:

hg clone -u NEMO-3.1 ssh://hg@bitbucket.org/salishsea/nemo-code NEMO-code-3.1
cd NEMO-code-3.1
mkdir modipsl/bin modispl/lib modipsl/tmp

2. Set up a configuration. We’ll use GYRE as an example and assume that we are building and running on jasper:

cd modispl/util
../modeles/UTIL/fait_config GYRE

3. Edit ../config/GYRE/scripts/BB_make.ldef to add the appropriate pre-processing prefix for the system you are working on (near the end of the file). For jasper that is:

#-Q- jasper  prefix = -D


Note

If you are working on a system other than those that already have global makefile definitions in modipsl/util/AA_make.gdef you will need to add an appropriate block of definitions to that file.

4. Calculate compilation rules, options, and build dependencies so as to create modipsl/modelels/NEMO/WORK/AA_make (which is symlinked to modipsl/config/GYRE/scripts/BB_make):

cd ../modeles/NEMO
../UTIL/fait_AA_make


Note

fait_AA_make must be run from the modipsl/modeles/NEMO/ directory.

5. Remove any existing Makefiles and create new ones:

cd ../../util
./clr_make
./ins_make -t jasper

6. On jasper several modules must be loaded prior to compiling and linking:

module load compiler/intel/12.1

That only needs to be done once per login so you may wish to add those commands to your $HOME/.bashrc file (See .bashrc Snippets). 7. Compile and link the code:  cd ../config/GYRE make clean make The results of a successful build are: * a :file:../../bin/opa executable * a :file:../../lib/libioipsl.a library * a :file:../../lib/oce/libopa.a library  8. Run the model: cd EXP00 ../../../bin/opa  On jasper the above command is only appopriate for short test runs. Longer runs should be done using a TORQUE batch job script submitted via the qsub command. ## Diffs Analysis¶ The image below shows the results of an analysis of the file-level differences between the NEMO/ directory trees in the NEMO-3.1 and CONCEPTS-110 repos. • Green indicates directories in which all files are identical • Red indicates directories in which 1 or more files are different • Black shows the number of files in the directories and the difference in the number of files between NEMO-3.1 and CONCEPTS-110 when applicable • The OPA_SRC/TDE/ directory in purple is present only in the CONCEPTS-110 directory The numbers of files in each directory were calculated with commands like: find OPA_SRC/ZDF/* -prune ! -type d | wc -l  In the directories in which the number of files was the same checks for differences between files was done with commands like: CONCEPTS=CONCEPTS-110/CONCEPTS110_WCSD_OW_NOBC_tide/modipsl/modeles/NEMO cd NEMO-3.1/NEMO for file in$(find OPA_SRC/ZDF/* -prune ! -type d);
diff $CONCEPTS/$file \$file;