Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleRecommended way for compiling Met.3D: conda environment

This page provides old installation guidelines to compile Met.3D from source on openSuSE and Ubuntu Linux systems using a development environment installed from the system repositories. We have switched entirely to using conda environments for developing and building Met.3D, and we recommend using conda instead. This page is kept for reference.


Note
titleNote

The current version versions of Met.3D 1.7 requires and higher require libproj version 8 or higher, which may need to be installed manually. We recommend using conda.

The following installation guidelines have been tested with the older Met.3D 1.6 under openSUSE 15.0/15.1 and Ubuntu 18.04/20.04 LTS. Still, try using conda if possible.

...

Code Block
languagebash
# update repositories and upgrade current system
apt update
apt upgrade

# install gcc compiler suite, see https://help.ubuntu.com/community/InstallingCompilers
apt install build-essential

# install required development tools
apt install cmake git wget zip gfortran

# section A), install the required dependencies (to list dependencies of a package use "apt depends <name>")
# "-dev" packages also install the corresponding libraries
apt install qt5-default liblog4cplus-dev libgdal-dev libnetcdf-dev libnetcdf-c++4-dev libeccodes-dev libfreetype6-dev libgsl-dev libglew-dev libproj-dev

# section B), create "met.3d-base" directory and install the two remaining libraries "glfx" and "qcustomplot"
cd ~
mkdir met.3d-base && cd met.3d-base
mkdir local
mkdir third-party && cd third-party

git clone https://github.com/maizensh/glfx.git
cd glfx
cmake -DCMAKE_INSTALL_PREFIX:PATH=~/met.3d-base/local CMakeLists.txt
make -j 12
make install

cd ~/met.3d-base/third-party
git clone https://gitlab.com/DerManu/QCustomPlot.git
cd QCustomPlot
./run-amalgamate.sh
cp qcustomplot.h ~/met.3d-base/local/include/
cd sharedlib/sharedlib-compilation/
qmake
make -j 12
cp libqcustomplot* ~/met.3d-base/local/lib/

# section C), download remaining third-party dependencies
cd ~/met.3d-base/third-party
git clone https://github.com/qtproject/qt-solutions.git

wget http://ftp.gnu.org/gnu/freefont/freefont-ttf-20120503.zip
unzip freefont-ttf-20120503.zip

mkdir naturalearth
cd naturalearth
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/physical/ne_50m_coastline.zip
unzip ne_50m_coastline.zip
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/cultural/ne_50m_admin_0_boundary_lines_land.zip
unzip ne_50m_admin_0_boundary_lines_land.zip
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/raster/HYP_50M_SR_W.zip
unzip HYP_50M_SR_W.zip

# sections D)-F), checkout and compile Met.3D
cd ~/met.3d-base/
git clone https://gitlab.com/wxmetvis/met.3d.git
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE ../met.3d
make -j 12

# now a binary "Met3D" should have been created

...