How to build the MonsoonPlanet model

Stefan Petri, Anja Katzenberger, Georg Feulner, Anders Levermann
stefan.petri@pik-potsdam.de
Wed Jan 24 16:56:17 CET 2024

This is supplementary material to
Katzenberger, A., Levermann, A., Petri, S., Feulner, G.: Monsoon planet: Bimodal Rainfall Distribution due to Barrier Structure in Pressure Fields. Jorunal of Climate, Vol. 37, Nr 4, 1295--1315. January 2024. doi:10.1175/JCLI-D-23-0055.1
This work is based on the climate model CM2 developed at GFDL [1] [2]. This setup found its way into the ``official'' MOM5 repository [3] as test case CM2.1p1 [4] . Our MonsoonPlanet model, however, uses a slab ocean model, also developed at GFDL [5] [6] instead of the full 3-D ocean component MOM5.

Prepare the MOM5 source code

Get the ``official'' MOM5 code from commit af3a94d40f21a4b7fd925d13b928f8721ad7d4c8
  commit af3a94d40f21a4b7fd925d13b928f8721ad7d4c8
  Merge: 5aec067c 8d40d33d
  Author: Andrew Kiss <31054815+aekiss@users.noreply.github.com>
  Date:   Mon Oct 26 12:53:18 2020 +1100
Note that the updates for the ``official'' MOM5 repository after that referred-to commit are mostly irrelevant for this paper and project, except for a few bug fixes contained in our supplied patch file (see below). Thus, later versions of MOM5 are expected to yield equivalent results.
mkdir MonsoonPlanet
cd MonsoonPlanet
git clone https://github.com/mom-ocean/MOM5.git .
git checkout af3a94d40f21a4b7fd925d13b928f8721ad7d4c8
cd ..
Below MonsoonPlanet you will find some files, and subdirectories
  src/    contains the source code
  bin/    contains mainly configuration files for different environments
  exp/    contains compilation scripts,

Prepare the slab ocean source code

The slab ocean model [5] [6] is not contained in the official MOM5 repository.
git clone https://github.com/NOAA-GFDL/SM2.git
cp -av SM2/src/ocean_slab MonsoonPlanet/src/ocean_mixed_layer

Apply the patch file with our project-specific modifications

In that patch file, you can also find a plain text overview of purpose and meaning of our modifications.
patch < 0_Code/diff-mom5-af3a94d4-MonsoonPlanet-Code.txt
The result youd be very similar to 0_Code/MonsoonPlanet-Code.tar.xz

Adapt the build environment definitions to your platform

cd exp
./MOM_compile.csh --help
This lists the different configurations of the code that can be compiled. The compilation environment (which compiler to use, compiler options, library paths, ...) is specified in
bin/environs.PLATFORM
bin/mkmf.template.PLATFORM
where PLATFORM is to be replaced by a name for your working environment. The name of your PLATFORM is used by the MOM_compile.csh script to select the apropriate environs. and mkmf.template. files.

Compile the code

cd exp
./MOM_compile.csh --platform PLATFORM --type SLAB_CM2M [--vec]
Default options specify to compile with optimization but without vectorization, to ensure run-to-run reproducibility. Option --vec specifies to compile with vectorization. See remarks about reproducibility in the provided bin/mkmf.template.pik-hlrs2015-ifort-vec . After many minutes, the executable program is created in
../exec/PLATFORM/SLAB_CM2M/fms_SLAB_CM2M.x
resp.
../exec/PLATFORM-vec/SLAB_CM2M/fms_SLAB_CM2M.x

Install the CM2.1p1 test case data

Download the CM2.1p1 example setup input data and exract it into
exp/CM2.1p1
There should be one subdirectory INPUT/

Install the MonsoonPlanet data

The input and forcing data for our MonsoonPlanet experiments is derived from the CM2.1p1 example setup. Many input files are installed just as symbolic links to the files inside exp/CM2.1p1/INPUT . Download 1_Input/MonsoonPlanet-INPUT.tar.xz and install it in
exp/StripedPlanet
Again, there should be one subdirectory INPUT/

Install the working directories for the ensemble runs

Download 1_Input/MonsoonPlanet-workdir.tar.xz and install it in
work/
That contains one subdirectory for each of the ensemble runs used for the paper.

References

[1]
Delworth, Thomas L. et al. "GFDL's CM2 global coupled climate models. Part I: Formulation and simulation characteristics". Journal of Climate 19(5) (2006): 643-674. DOI:10.1175/JCLI3629.1
[2]
Anderson, Jeffrey L. et al. "The new GFDL global atmosphere and land model AM2-LM2: Evaluation with prescribed SST simulations". Journal of Climate 17(24) (2004): 4641-4673. DOI:10.1175/JCLI-3223.1
[3]
"MOM5 Modular Ocean Model". Github repository. https://mom-ocean.github.io Last access 21.12.2022
[4]
CM2.1p1 example setup input data. http://portal.sf.utas.edu.au/thredds/fileServer/momtest/test_data/CM2.1p1.input.tar.gz
Last access 21.12.2022 via https://mom-ocean.github.io/downloads/
[5]
GFDL Team. "GFDL FMS Slab Ocean Model". Github repository. https://github.com/NOAA-GFDL/SM2
The GFDL team published the code for the slab ocean model on gitlab in 2019. For our simulations we obtained the code via private communication in 2014.
[6]
Tom Knutson. "FMS Slab Ocean Model Technical Documentation". WWW page, September 2003, revised Sept 4, 2017, last access 3-June-2022. http://www.gfdl.noaa.gov/fms-slab-ocean-model-technical-documentation