Compile
Principle
During the first Meso-NH compilation, almost all the numerical schemes and all the physical parameterizations are compiled. The numerical scheme and physical parameterizations are then chosen in namelists files during program executions. In the Meso-NH language, we say that we compile the MASTER. This compilation is quite long, typically more than 20 minutes on one core.
When you want to modify the Meso-NH code, you need to create a directory containing the modified code and then compile it. In the Meso-NH language, we say that we compile a VER_USER. This compilation is shorter than the MASTER one, it depends on how many sources are modified but you need to compile the MASTER before a VER_USER.
Note
If you are in a hurry to compile Meso-NH please go to compilation section.
The following lines are just for your information, especially if you are interested in understanding how Meso-NH compilation works. For the MASTER compilation, you will use following commands:
cd ~/MNH-VX-Y-Z/src
./configure
export MAKEFLAGS='-j 8' # optional, to speed up the compilation on up to 8 processes/cores
. ../conf/profile_mesonh
make
make installmaster
For the VER_USER compilation, you will use following commands:
cd ~/MNH-VX-Y-Z/src
export VER_USER=NAME_OF_THE_DIRECTORY_CONTAINING_THE_MODIFIED_CODE
./configure
export MAKEFLAGS='-j 8' # optional, to speed up the compilation on up to 8 processes/cores
. ../conf/profile_mesonh
make user
make installuser
Note
configure, script that creates a configuration fileprofile_mesonhin the conf/ directory with an extension reflecting the different choices made.export MAKEFLAGS='-j 8', optional command to speed up the compilation on up to 8 parallel processes. You can change the number of processes according to the number of cores available for the compilation. If you do not set this variable, the default value is 1 process.make, command that compiles the codemake installmaster, command that links the compiled executables in the exe/ directory (cf List of compiled executables). Need to be done only one time by “version”.
Note
The object files
*.oand main executables of the Meso-NH package are compiled in one step and created in the directory src/dir_obj-your_configuration/the
lib.*.ais only created and removed at the link phase. This allows a parallel compilation of the sources.The name “dir obj…” depends on the different environment variables set by the
profile_mesonhthat you have loaded before the compilation. This allows to compile in the same source/installation directory different versions of Meso-NH with different compilers, versions of MPI, …
Note
To get information about the compiled executables, go to Executables & Namelists.
Supported / tested compilers
Meso-NH should compile with any modern compiler. However, compiler bugs, missing or poorly supported Fortran features, or other issues can cause compilation to fail or lead to incorrect results. Meso-NH has only been tested on a limited number of environments. Below is a list of the tested compilers and their versions. Please note that other environment elements, such as the MPI library, may also affect compatibility.
Fortran |
C |
C++ |
Compile |
Basic test cases |
Full test cases |
|||
|---|---|---|---|---|---|---|---|---|
Compiler |
Version |
Compiler |
Version |
Compiler |
Version |
|||
Cray CCE (ftn) |
18.0.0 |
Cray CCE (cc) |
18.0.0 |
Cray CCE (CC) |
18.0.0 |
Yes |
Yes |
|
GCC (gfortran) |
6.5.0 |
GCC (gcc) |
6.5.0 |
GCC (g++) |
6.5.0 |
No (in eccodes_lib) |
||
GCC (gfortran) |
7.5.0 |
GCC (gcc) |
7.5.0 |
GCC (g++) |
7.5.0 |
Yes |
||
GCC (gfortran) |
8.5.0 |
GCC (gcc) |
8.5.0 |
GCC (g++) |
8.5.0 |
No (problems with contiguous) |
||
GCC (gfortran) |
9.4.0 |
GCC (gcc) |
9.4.0 |
GCC (g++) |
9.4.0 |
Yes |
||
GCC (gfortran) |
9.5.0 |
GCC (gcc) |
9.5.0 |
GCC (g++) |
9.5.0 |
Yes |
||
GCC (gfortran) |
10.5.0 |
GCC (gcc) |
10.5.0 |
GCC (g++) |
10.5.0 |
Yes |
||
GCC (gfortran) |
11.5.0 |
GCC (gcc) |
11.5.0 |
GCC (g++) |
11.5.0 |
No (in eccodes_lib) |
||
GCC (gfortran) |
12.2.0 |
GCC (gcc) |
12.2.0 |
GCC (g++) |
12.2.0 |
Yes |
Yes |
|
GCC (gfortran) |
12.5.0 |
GCC (gcc) |
12.5.0 |
GCC (g++) |
12.5.0 |
Yes |
||
GCC (gfortran) |
13.1.0 |
GCC (gcc) |
13.1.0 |
GCC (g++) |
13.1.0 |
No (compiler bug) |
||
GCC (gfortran) |
13.2.0 |
GCC (gcc) |
13.2.0 |
GCC (g++) |
13.2.0 |
No (compiler bug) |
||
GCC (gfortran) |
13.3.0 |
GCC (gcc) |
13.3.0 |
GCC (g++) |
13.3.0 |
Yes |
||
GCC (gfortran) |
13.4.0 |
GCC (gcc) |
13.4.0 |
GCC (g++) |
13.4.0 |
Yes |
||
GCC (gfortran) |
14.3.0 |
GCC (gcc) |
14.3.0 |
GCC (g++) |
14.3.0 |
Yes |
||
GCC (gfortran) |
15.2.0 |
GCC (gcc) |
15.2.0 |
GCC (g++) |
15.2.0 |
Yes |
||
GCC (gfortran) |
16.1.0 |
GCC (gcc) |
16.1.0 |
GCC (g++) |
16.1.0 |
Yes |
O2: yes; DEBUG: no (compiler bug 125192) |
|
Intel oneAPI (ifort) |
2022.1.2 |
Intel oneAPI (icc) |
2022.1.2 |
Intel oneAPI (icpc) |
2022.1.2 |
Yes |
Yes |
|
Intel oneAPI (ifort) |
2023.1.0 |
Intel oneAPI (icc) |
2023.1.0 |
Intel oneAPI (icpc) |
2023.1.0 |
Yes |
Yes |
|
Intel oneAPI (ifx) |
2024.1.0 |
Intel oneAPI (icx) |
2024.1.0 |
Intel oneAPI (icpx) |
2024.1.0 |
Yes |
Yes |
Yes |
Intel oneAPI (ifx) |
2024.0.0 |
GCC (gcc) |
15.2.0 |
GCC (g++) |
15.2.0 |
Yes |
Yes |
|
Intel oneAPI (ifx) |
2025.0.0 |
Intel oneAPI (icx) |
2025.0.0 |
Intel oneAPI (icpx) |
2025.0.0 |
Yes |
Yes |
|
Intel oneAPI (ifx) |
2025.3.1 |
Intel oneAPI (icx) |
2025.3.1 |
Intel oneAPI (icpx) |
2025.3.1 |
Yes |
Yes |
|
Intel oneAPI (ifx) |
2025.3.2 |
Intel oneAPI (icx) |
2025.3.2 |
Intel oneAPI (icpx) |
2025.3.2 |
Yes |
||
NVIDIA (nvfortran) |
24.7 |
GCC (gcc) |
11.5.0 |
NVIDIA (nvc++) |
24.7 |
Yes |
||
NVIDIA (nvfortran) |
26.1 |
NVIDIA (nvfortran) |
26.1 |
NVIDIA (nvc++) |
26.1 |
Yes |
||
Compile on different systems
On Jean-Zay (IDRIS), Adastra (CINES), Irene (TGCC), ECMWF, belenos (Meteo-France) and some other machines, the compiler, libraries and optimisation settings are automatically chosen during the compilation procedure.
Note
If necessary, these settings can be modified (see Compilation on other systems).
Tip
To check if the machine you are using is supported by Meso-NH look at the case condition in the configure script and search your configuration. If your configuration is not referenced you have to go to compile on other systems section and adapt the configure script.
The various steps for compiling Meso-NH on the machines used by most Meso-NH’s users are referenced in the following sections.
On Jean-Zay (IDRIS)
Homedir |
Workdir |
Scratchdir |
Storedir |
|
|---|---|---|---|---|
Location |
$HOME |
$WORK |
$SCRATCH |
$STORE |
Disk space |
3 GiB / user |
5 TiB |
Unlimited |
50 TiB |
Inodes (files) |
150 k / user |
500 k |
Unlimited |
100 k |
Data lifetime |
Saved |
Not saved |
Purged (30 days) |
Not saved |
Tip
We recommend to install Meso-NH on your Workdir (Homedir is too small), run the simulation on the Scratchdir (but be careful with the automatic purge after 30 days) and store the files in Workdir (for short term storage) or Storedir (for long term storage, filesystem not available for batch jobs).
It is recommanded to do the compilation by submitting a job instead of doing it interactively. This is because the ressources on the frontend nodes are limited to one core and therefore the compilation will be very long.
For the CPU partitions
cd MNH-V6-0-0/src
./configure
sbatch job_make_mesonh_HPE_jeanzay
Note
To run the test case examples, do:
cd MNH-V6-0-0/src
sbatch -A your_projet.on.cpu job_make_examples_HPE_jeanzay
For the Nvidia GPU partitions
On Jean-Zay, 3 different types of Nvidia GPUs are available: V100, A100 and H100.
To enable the compilation for GPUs, the MNH_GPU environment variable must be set to the corresponding value (V100, A100 or H100) before running the configure command.
For example, to compile Meso-NH for V100 GPUs, use the following commands:
cd MNH-V6-0-0/src
MNH_GPU=V100 ./configure
. ../conf/profile_mesonh-LXnvhpc2202-R8I4-MNH-V6-0-0-V100-MPIAUTO-MANAGEDO2
make |& tee error$XYZ
make installmaster
This will generate the configuration file (profile_mesonh) with ARCH=LXnvhpc2202
that uses the Nvidia compiler, MNH_GPU=V100 and OPTLEVEL=MANAGEDO2 that selects the compiler options.
The compilation takes around 2 hours (in interactive on Jean-Zay, you are limited to one core).
A test case using GPUs can be found in the directory $SRC_MESONH/examples/bench/MNH-OPENACC-EXA/test-cases/.
On Adastra (CINES)
Homedir |
Homedir |
Workdir |
Scratchdir |
Storedir |
|
|---|---|---|---|---|---|
Location |
$OWN_HOMEDIR |
$HOME |
$WORKDIR |
$SCRATCHDIR |
$STOREDIR |
Disk space |
20 GiB / user |
100 GiB / user |
15 TiB |
20 TiB |
1.5 TiB |
Inodes (files) |
30 k / user |
300 k / user |
250 k |
1 M |
9 k |
Data lifetime |
Saved |
Saved |
Not saved |
Purged (30 days) |
Saved |
Warning
On Adastra, there are a personal homedir ($OWN_HOMEDIR) different of the project personal homedir ($HOME). To know more about these directories, please refer to the CINES documentation.
Tip
We recommend to install Meso-NH in personal homedir, run the simulation on the Scratchdir (but be careful with the automatic purge after 30 days) and store the files in Workdir (for short term storage) or Storedir (for long term storage, in large files (tar archives), filesystem not available for batch jobs).
For the CPU partition (Genoa CPUs)
Install the Meso-NH package in your $HOME and compile in interactive mode:
cd MNH-V6-0-0/src
./configure
. ../conf/profile_mesonh-LXifort-R8I4-MNH-V6-0-0-CCE1800-MPICRAY-O2
make -j16 |& tee error$XYZ
make installmaster
Note
To run the test case examples, do:
sbatch -A your_projet.on.cpu job_make_examples_HPE_adastra_genoa
For the AMD GPU partitions
On Adastra, 2 different types of AMD devices are available:
MI250X: the X indicates that this device is a so called discrete GPU. This means that the GPU is physically separated from the CPUs on the compute node, and has its own dedicated memory.
MI300A: the A indicates that this device is a so called APU (Accelerated Processor Unit). This means that the GPU and the CPUs are on the same chip and share the same fast memory (HBM).
To enable the compilation for GPUs, the MNH_GPU environment variable must be set to the corresponding value (MI250 or MI300, without the X or A) before running the configure command.
For example, to compile Meso-NH for MI250X GPUs, use the following commands:
cd MNH-V6-0-0/src
MNH_GPU=MI250 ./configure
. ../conf/profile_mesonh-LXcray-R8I4-MNH-V6-0-0-MI250-CCE1800-MPICRAY-MANAGEDO2
make |& tee error$XYZ
make installmaster
This will generate the configuration file (profile_mesonh) with ARCH=LXcray
that uses the Cray compiler (version CCE1800), MNH_GPU=MI250 and OPTLEVEL=MANAGEDO2 that selects the compiler options.
The compilation takes around 1 hour.
A test case using GPUs can be found in the directory $SRC_MESONH/examples/bench/MNH-OPENACC-EXA/test-cases/.
On Irene (TGCC)
Warning
Before compiling you need to go to your project data space:
module switch dfldatadir/your_project_name
newgrp your_project_name
Homedir |
Workdir |
Scratchdir |
Storedir |
|
|---|---|---|---|---|
Location |
$CCCHOME |
$CCCWORKDIR |
$CCCSCRATCHDIR |
$CCCSTOREDIR |
Disk space |
20 GiB / user |
5 TiB |
100 TiB |
Unlimited space |
Inodes (files) |
unlimited |
500 k |
2 M |
50 k |
Data lifetime |
Saved |
Not saved |
Purged (60 days) |
Saved on disk/band |
Tip
We recommend to install Meso-NH on your $CCCHOME directory, run the simulation on the Scratchdir (but be careful with the automatic purge after 60 days) and store the files in Workdir (for short term storage) or Storedir (for long term storage of large files (or tar archives)).
On Irene you can compile in interactive mode using:
cd MNH-V6-0-0/src
./configure
. ../conf/profile_mesonh-LXifx-R8I4-MNH-V6-0-0-MPIAUTO-O2
make -j16 |& tee error$XYZ
make installmaster
Note
To verify your compilation you can run test case examples with:
ccc_msub job_make_examples_BullX_irene_AMD
On hpc-login (ECMWF)
Homedir |
Workdir |
Scratchdir |
Storedir |
|
|---|---|---|---|---|
Location |
$HOME |
$HPCPERM |
$SCRATCH |
\(\emptyset\) |
Disk space |
10 GiB / user |
1 TiB |
2 TiB |
\(\emptyset\) |
Inodes (files) |
unlimited |
1 M |
500 k |
\(\emptyset\) |
Data lifetime |
Saved |
Not saved |
Purged (30 days) |
\(\emptyset\) |
Tip
We recommend to install Meso-NH on your Workdir, run the simulation on the Scratchdir (but be careful with the automatic purge after 30 days) and store the files in Workdir.
To compile Meso-NH package, go to the $HPCPERM directory, connect to an interactive compute node and compile the code:
ecinteractive -c16 -m 16G -t 12:00:00
cd $HPCPERM/MNH-V6-0-0/src
./configure
export MAKEFLAGS='-j 16'
. ../conf/profile_mesonh-LXifx-R8I4-MNH-V6-0-0-MPIAUTO-O2
make
make installmaster
To run test case examples, do:
Note
sbatch job_make_examples_Atos_HPCF
On Belenos (Meteo-France)
Homedir |
Workdir |
Scratchdir |
Storedir |
|
|---|---|---|---|---|
Location |
$HOME |
$WORKDIR |
\(\emptyset\) |
ftp/telnet hendrix |
Disk space |
100 Go / user |
Unlimited |
\(\emptyset\) |
Unlimited |
Data lifetime |
Saved |
Few days |
\(\emptyset\) |
Saved on disk/band |
Tip
We recommend to install Meso-NH on your Homedir, run the simulation on the Workdir and store the files in hendrix at the end of your simulation. A robot cleans the workdir very regularly.
Due to limitation in time and memory in interactive shell, Meso-NH has to be compiled in batch mode:
cd MNH-V6-0-0/src
./configure
sbatch job_make_mesonh_BullX_belenos
Note
To verify your compilation you can run test case examples with:
sbatch job_make_examples_BullX_belenos
On Datarmor (IFREMER)
Note
You can find Datarmor documentation here, only available on IFREMER intranet.
Warning
Compilation was not in place for Datarmor when Meso-NH version 6.0.0 was released. To use the following procedure, you have to download a slightly more recent version of Meso-NH that includes the necessary configuration for Datarmor.
Warning
To compile Meso-NH on Datarmor, you need to use the bash shell. If you are using another shell, please switch to bash with the command bash before running the compilation commands.
On Datarmor, you can compile in interactive mode using:
cd MNH-V6-0-0/src
./configure
export MAKEFLAGS='-j 8' # optional, to speed up the compilation on up to 8 processes/cores
. ../conf/profile_mesonh-LXgfortran-R8I4-MNH-V6-0-0-MPIINTEL-O2
make |& tee error$XYZ
make installmaster
Note
To verify your compilation you can run test case examples with:
qsub job_make_examples_SGI_datarmor
On Kairos (CALMIP)
Homedir |
Workdir |
Scratchdir |
|
|---|---|---|---|
Location |
/kairos1/$GROUP/$USER |
/work/$GROUP/$USER |
/scratch/$USER |
Disk space |
50 GiB / group |
5 TiB / group |
unlimited |
Inodes (files) |
1 M / group |
5 M / group |
unlimited |
Data lifetime |
Saved |
Saved |
Purged |
Tip
We recommend to install Meso-NH on your Workdir, run the simulation on the Scratchdir (but be careful with the automatic purge) and store the files in the Workdir.
For the CPU partitions
cd MNH-V6-0-0/src
./configure
export MAKEFLAGS='-j 32' # optional, to speed up the compilation on up to 32 processes/cores
. ../conf/profile_mesonh-LXifx-R8I4-MNH-V6-0-0-MPIINTEL-O2
make |& tee error$XYZ
make installmaster
Note
To run the test case examples, do:
cd examples/test_cases
./run_all_KTESTPACK
For the Nvidia GPU partitions
On Kairos, the compilation of Meso-NH with GPU support must be done on the GraceHopper nodes.
Use the following commands, once connected to a GraceHopper node:
cd MNH-V6-0-0/src
./configure
. ../conf/profile_mesonh-LXnvhpc2202-R8I4-MNH-V6-0-0-MPIAUTO-UNIFIED
make |& tee error$XYZ
make installmaster
- This will generate the configuration file (
profile_mesonh) withARCH=LXnvhpc2202 that uses the Nvidia compiler, and
OPTLEVEL=UNIFIEDthat selects the compiler options.
A test case using GPUs can be found in the directory $SRC_MESONH/examples/bench/MNH-OPENACC-EXA/test-cases/.
On Olympe (CALMIP)
Note
You can find Olympe documentation here.
Homedir |
Workdir |
Scratchdir |
Storedir |
|
|---|---|---|---|---|
Location |
/users/$GROUPE/$USER |
/tmdir/$USER |
\(\emptyset\) |
/store/$GROUPE/$USER |
Disk space |
5 GiB / user |
Unlimited |
\(\emptyset\) |
1 TiB / group |
Data lifetime |
Saved |
Purged (100 days) |
\(\emptyset\) |
Saved |
Tip
We recommend to install Meso-NH on your Homedir, run the simulation on the Workdir and store the files in Storedir.
On Olympe you can compile in interactive mode using:
cd MNH-V6-0-0/src
./configure
. ../conf/profile_mesonh-LXifx-R8I4-MNH-V6-0-0-MPIINTEL-O2
export MAKEFLAGS='-j 16' # optional, to speed up the compilation on up to 16 processes/cores
make
make installmaster
Note
To verify your compilation you can run test case examples with:
sbatch job_make_examples_BullX_olympe
On Nuwa (OMP)
Note
You can find nuwa documentation here.
Homedir |
Workdir |
Scratchdir |
Storedir |
|
|---|---|---|---|---|
Location |
/home/$USER |
/mesonh/$USER |
\(\emptyset\) |
\(\emptyset\) |
Disk space |
Unlimited |
Unlimited |
\(\emptyset\) |
\(\emptyset\) |
Data lifetime |
Unsaved |
Unsaved |
\(\emptyset\) |
\(\emptyset\) |
Tip
We recommend to install Meso-NH on your Homedir and run the simulation on the Workdir.
On Nuwa you can compile in interactive mode using:
cd MNH-V6-0-0/src
./configure
. ../conf/profile_mesonh
export MAKEFLAGS='-j 8' # optional, to speed up the compilation on up to 8 processes/cores
make
make installmaster
Note
To verify your compilation you can run test case examples with:
cd examples/test_cases
./run_all_KTESTPACK
On other systems
If you are installing Meso-NH on an unknown computer (not predefined in the configure script),
there are 3 main environment variables that can be set to configure the Meso-NH package:
ARCH: the architecture to use (OS + compiler, default is LXgfortran for Linux with gfortran compiler)
VER_MPI: the version of MPI to use (default is MPIVIDE for no parallel run)
OPTLEVEL: the level of optimization for the compiler (default is DEBUG for development purpose, debugging and fast compilation)
If needed, you can change the default values of these environment variables. For example, if you want to use the Intel compiler ifx with the Intel MPI library and an optimisation level of -O2, you can run the following commands:
export ARCH=LXifx
export VER_MPI=MPIAUTO
export OPTLEVEL=O2
./configure
Note
The options specific to the architecture and compiler such as OPTLEVEL are defined inside the
Rules.$ARCH.mkfiles.The options specific to the MPI library (VER_MPI) are defined inside Makefile.MESONH.mk
There are also options for the netCDF library (see the VER_CDF variable). CDFAUTO, the recommended and default option, compiles and uses the netCDF library included in the Meso-NH package.
If needed, for adaptation to your requirements, look inside the files and changes options.
Compile the code :
. ../conf/profile_mesonh-your_configuration
export MAKEFLAGS='-j 8' # optional, to speed up the compilation on up to 8 processes/cores
make
make installmaster
Tip
The compilation takes about 20 minutes on one core. To speedup the compilation, set the environment variable MAKEFLAGS to the number of cores you want to use.
If you do not have enough space in your $HOME directory, install the whole package directly on the $WORKDIR. The name of the $WORKDIR differs in the different computer centers.
Warning
Consider backing up your installation. The $WORKDIR space is not typically backed up, and on some systems, it may be purged after a while. File system failures with file loss can occur.
Due to limitation in time and memory on the interactive shell of some systems, you could have to compile the Meso-NH package in batch mode. Jobs are provided for some computers in the different
src/job_make_mesonh*files.
Clean previous compiled version
If you have already compiled the same version of Meso-NH on this computer (same $XYZ value), you first have to clean it with:
make cleanmaster
Note
This will delete the dir_obj$XYZ directory content with all the preprocessed sources contained in it.
Compile with additional libraries
It’s possible to compile Meso-NH with additionnal libraries for Wildfire spread (ForeFire), Radiative computation (RTTOV), Biogenic emissions (MEGAN) and Ocean-wave coupling (OASIS). In the following subsections you will find information to compile Meso-NH with these libraries.
Wildfire spread (ForeFire)
ForeFire is an open-source code for wildland fire spread models. The interface to this tool is already compiled in Meso-NH (from version 6.0.0).
The FOREFIRE API package must be compiled independently of Meso-NH. It can be cloned with:
git clone https://github.com/forefireAPI/firefront.git
It depends on netCDF and scons for its compilation. The libForeFIre.so that has been generated must be referenced either by adding its path to the LD_LIBRARY_PATH environment variable or by moving or linking it to the exe/ directory of Meso-NH.
Radiative computation (RTTOV)
RTTOV (Radiative Transfer for TOVS) is a highly efficient radiative transfer model designed for passive visible, infrared, and microwave satellite radiometers, spectrometers, and interferometers. It facilitates a direct comparison between model simulations and satellite observations, eliminating the need for additional assumptions or inversion processes. While Meso-NH is compatible with the latest version of RTTOV (v14.1), this version is not included in the Meso-NH package due to licensing restrictions.
First, you need to download the RTTOV package rttov141.tar.xz by following the instructions given on the RTTOV website and untar the RTTOV zip file rttov141.tar.xz at the location described below:
cd MNH-V6-0-0/src/LIB
mkdir RTTOV-14.1
cd RTTOV-14.1
tar xJf rttov141.tar.xz
To compile Meso-NH with RTTOV, you just have to define the VER_RTTOV environment variable before running the configure script:
cd MNH-V6-0-0/src/
export VER_RTTOV=RTTOVAUTO
./configure
Then, you can follow the compilation steps described in the section dedicated to your computer.
Note
RTTOV is automatically compiled during Meso-NH compilation.
RTTOV can be used with DIAG program by setting NAM_DIAG - Satellite simulator namelist.
Biogenic emissions (MEGAN)
Model of Emissions of Gases and Aerosols from Nature (MEGAN) is a comprehensive modeling system designed to estimate
the net emission of gases and aerosols from terrestrial ecosystems into the atmosphere. To compile MEGAN with Meso-NH, you just have to define MNH_MEGAN environment variable before doing configure:
export MNH_MEGAN=1
./configure
Then can follow the steps described in the section dedicated to your computer (interactive or batch mode).
Ocean-wave coupling (OASIS)
Ocean Atmosphere Sea Ice Soil coupler (OASIS) is a flexible coupling framework designed to exchange data and synchronize interactions between different components of Earth system models, such as the atmosphere, ocean, sea ice, and land surface. To compile Meso-NH with OASIS, you just have to define the VER_OASIS environment variable before running the configure script.
export VER_OASIS=OASISAUTO
./configure
Then can follow the steps described in the section dedicated to your computer (interactive or batch mode).
Tip
You can launch the test case MNH-V6-0-0/examples/test_cases/013_Iroise_OASIS_coupling to verify your installation.
Compile with modified and/or new sources
Once the MASTER is compiled, you can compile your own sources.
Prepare your source directory
Suppose you want to create a MY_MODIF version of Meso-NH. First, put your own sources in a subdirectory src/MY_MODIF. All subdirectories in MY_MODIF will be scanned during the compilation process. So if you want, you could make a subdirectory for each component of the Meso-NH package, for example:
cd MY_MODIF
mkdir MNH
mkdir SURFEX
cp ../MNH/mesonh.f90 MNH/
cp ../SURFEX/isba.f90 SURFEX/
Caution
In this subdirectory, put only fortran source you want to compile. Don’t use it as a trash with old sources file like mysource.f90.old or tar files. All unexpected file types could confuse the make command.
Configure with modified sources
Logout of the current session to be sure to unset all the environment variables loaded with the your MASTER profile_mesonh. Login again and:
set the environment variable VER USER to the name of your user directory (MY_MODIF, for example),
set also the optional environment variable ARCH, VER MPI… you want to use (they need to be the same as the MASTER)
and run again the configure command:
export VER_USER=MY_MODIF
./configure
This generates a profile_mesonh file with the VER_USER information.
Compile with modified sources
Now, you can compile with the make user command in interactive with:
. ../conf/profile_mesonh...${VER_USER}...
make user
make installuser
or in batch mode using a script located in src/ directory with user in its name.
Note
This will compile only your sources and the files depending on your sources and generate the new executables in the directory
dir_obj-your_configuration/$VER_USERThe “make installuser” needs to be done only one time by version. When you run the examples, your version should appear in the name of the used executables.
Before compiling your own sources be sure that these ones are younger than the “*.o” files of the MASTER directory. If any doubt, at any time use the command on your sources ,and only on yours:
touch your_files