Versions Compared

Key

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

...

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 httphttps://wwwnaciscdn.naturalearthdata.com/http//www.naturalearthdata.com/downloadorg/naturalearth/50m/physical/ne_50m_coastline.zip
unzip ne_50m_coastline.zip
wget httphttps://wwwnaciscdn.naturalearthdata.com/http//www.naturalearthdata.com/download/org/naturalearth/50m/cultural/ne_50m_admin_0_boundary_lines_land.zip
unzip ne_50m_admin_0_boundary_lines_land.zip
wget httphttps://wwwnaciscdn.naturalearthdata.com/http//www.naturalearthdata.com/downloadorg/naturalearth/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

...