Compile SURFEX on Belenos

You first need to load the compilers :

module load intel
module load intelmpi
module load curl

The next step of the configuration depends on your application:

  • (!) For MPI parallel applications (big domains, deterministic application) : let VER_MPI and VER_CDF options to default.
  • For sequential ensemble applications associed with a ParaBlindRun AlgoComponent (one member per core through vortex), and only in this case, export the following variables:
    export VER_MPI=NOMPI
    export VER_CDF=CDF2020

At this step, it is also possible to modify the optimization level by :


export OPTLEVEL=O2

By default, the optimization level is “O2”, which is recommended in the general case (significant decrease of running time). In case of bugs, the optimization level must be changed to "DEBUG" to generate better error messages.
(!) Long runs must never be run in DEBUG mode.

You can then follow the install procedure given below:
• initialize environment variables needed for surfex: go into src directory and run


Then, execute the profile file for this version of surfex by replacing XXXXX by MPIAUTO or NOMPI, or using an equivalent name depending on compiler, SURFEX version and compilation options:
 . ../conf/profile_surfex-LXifort-SFX-V8-1-1-XXXXX-OMP-O2


• compile the master version of the code:
in the src directory and in the same terminal, run


and then, again in the same terminal,

make installmaster

Master executables are created in directory exe. If everything goes well until this step, then surfex has been successfully installed on the supercomputer.

Setting specifically the SURFEX binaries to be used by s2m can be done by exporting the variable EXESURFEX pointing to the directory containing the PGD, PREP and OFFLINE binaries.
If you want to always use the same binaries, add a line to your .bash_profile adapted from this example :

export EXESURFEX=$HOME/SURFEX/cen/exe/

Otherwise, it is also possible to refer to this directory by using -s option in s2m command (see

After SURFEX compilation, binaries have their complete names (with compiler name, surfex version, mpi option and optimization level) so you need to create manually symbolic links with these short names as s2m work with the short names.
Please check carefully the full names of your binaries (depending on SURFEX version, compiler and compilation options) to build the symbolic links. Example :