Building and running MIMICAv5 on Tetralith

From SNIC Documentation
Jump to: navigation, search

This page describes the building the MIMICAv5 on NSC's Tetralith system.

MIMICA is a 3D high-resolution model designed for atmospheric applications and written entirely in fortran. The code has been originally developed by Chien Wang at MIT, and later updated and transformed into a true LES model by Julien Savre at Stockholm University. Today, MIMICA is developed under the git version control system and is hosted on the Bitbucket web-page

Getting the source code

Once you have a Bitbucket account with the correct permissions to access the MIMICA repository, the MIMICAv5 distribution can be cloned by executing, e.g.:

git clone https://my-username@bitbucket.org/matthiasbrakebusch/mimicav5.git mimicav5

If space permits, it is recommended that the source files be downloaded into the /home file system on Tetralith. This ensures that your code, and configuration files are backed up.

MIMICA modules

A set of software modules have been installed on Tetralith specifically to try to match as closely as possible the environment used in the model development by Julien. It is recommended that these modules are used for building and running MIMICA on Tetralith to reduce porting problems.

$ module purge
$ module load buildenv-intel/2017.u7-bare
$ module use /proj/bolinc/shared/software/modules
$ module load netCDF/4.4.1-intel-2017.u7-bare
$ module load fftw/3.3.8-intel-2017.u7-bare
Environment variables and Makefile

Loading the modules above sets a number of environment variables (incl. NETCDF_DIR, FFTW_LIB, FFTW_INC). The MIMICA environment variable must be set to the root path of the MIMICAv5 download (see 'Getting the source code' above), e.g.

$ export MIMICA=/home/my-tetralith-username/models/mimicav5

A Tetralith specific Makefile associated with the above modules can be copied on Tetralith from (/proj/nsc/users/struthers/Public/MIMICA/Makefile-v5) to your working folder.

This Makefile uses the 'centrally' installed fftw (module fftw/3.3.8-intel-2017.u7-bare).

The start file

Two environment variables have to be set in the 'start' file specifically for Tetralith + MIMICA modules/environment.

setenv NETCDF ${NETCDF_DIR}

and

setenv CMPLER INTEL
Run file/SLURM settings

The resource request to Tetralith's SLURM batch system should match the domain decomposition defined in the 'start' file. Simply the number of cores (-n in SLURM) should = NPX*NPY from the start file, e.g. if the definitions of NPX and NPY in your start file are:

setenv NPX 4
setenv NPY 2

then the number of cores requested in your run script should be:

#SBATCH -n 8