Installing SURFEX on your Linux computer

To run SURFEX, several packages need to be installed on a Linux PC. Before to install SURFEX, please verify these packages are present on your computer.

  • shell KSH
  • glibc, make, a fortran compiler (if none is ever installed, choose Gfortran+GCC)
  • C++
  • cmake

Optional :

  • MPI library (OPENMPI for exemple)
    If MPI is not installed, SURFEX needs to be compiled without parallelization. See details in the section options of compilation.
     

Additional packages for Ubuntu 20.04 LTS / Ubuntu 22.04 LTS and Ubuntu 24.04 LTS:

  • curl (with gnutls flavour): packages curl and libcurl4-gnutls-dev

OPEN-SURFEX
If you have dowloaded the open-SURFEX code directly on the website, first untar the file open_surfex_v9_0_0_20231024.tar.gz where you want. For example, in your home directory:

cd $HOME
tar -xvfz open_surfex_v9_0_0_20231024.tar.gz

SURFEX from GIT repository (opensource)
No additionnal action before compiling

SURFEX from GITHUB repository
Starting with SURFEX version 9.1, certain libraries (previously included in the repository) have been externalized and are available for download. For a SURFEX version 9.1 (and above) installation :

  • download the libraries package which corresponds to your code version
  • copy this package in the src/LIB directory of your SURFEX repository
  • untar the package (tar -xzvf LIB-SURFEX-9-1-0.tar.gz)