make command gives error during installation of SURFEX code

Solution 1:

According to compilation log

/bin/sh: 2: cmake: not found

you have to install the package which provides cmake executable by

sudo apt-get install cmake

The reproducible method of SURFEX installation for Ubuntu 18.04.6 LTS is below:

sudo apt-get install build-essential cmake libopenmpi-dev gfortran git libcurl4-openssl-dev libnetcdf-dev

cd ~/Downloads
wget -c https://www.umr-cnrm.fr/surfex/data/OPEN-SURFEX/open_surfex_v8_1_20210914.tar.gz
tar -xf open_surfex_v8_1_20210914.tar.gz
cd open_SURFEX_V8_1/src
./configure
. ../conf/profile_surfex-LXgfortran-SFX-V8-1-1-MPIAUTO-OMP-O2-X0
make
sudo make installmaster