Tuesday, April 8, 2014

Installing GEOtop 2.0 on Linux

I receive from Matteo Dall'Amico and I publish the following instruction to compile GEOtop 2.0 from command line on Linux.

# Install the following packages (or verify you have them already):

# install GIT
sudo apt-get install git

#Install and compile MeteoIO libraries
See instructions here

#Install pkg-config
sudo apt-get install pkg-config

# install boost libraries
sudo apt-get install libboost-dev
sudo apt-get install libboost-test-dev
sudo apt-get install libboost-regex-dev
sudo apt-get install libboost-program-options-dev
sudo apt-get install libboost-filesystem-dev
sudo apt-get install libboost-iostreams-dev

# install autoconf
sudo apt-get install autoconf

# download GEOtop
git clone https://github.com/skyglobe/geotop#

# go inside the geotop folder
cd geotop

# create the makefile
ccmake .

# add the path of MeteoIO: /usr/local
# To process the file press "c" (like "configure") and then "g" (like "generate")
# make the project

#try geotop example
cd tests/test_sample_run/small_example

#create symbolic link
ln -s ../../../geotop/geotop geotop_TN

#run geotop_TN
./geotop_TN .


  1. Some feedback:
    you need to have ccmake version 2.6
    with newer version it does not work ...

  2. When I tried to compile for Mac OS X 10.7.5
    the apt-get command was not available
    I installed the boost libraries installing before MacPorts and then typing
    sudo port install boost

    see instructions here:

  3. Dear Sir, Thanks a lot for step by step installation of GEOtop on linux. As a followed the tutorial, upto ccmake . it works fine but when i run make command the following error is displayed:
    [ 6%] Built target fluidturtle
    [ 6%] Building CXX object src/geotop/CMakeFiles/geotopCommon.dir/geotop_common.cc.o
    In file included from /home/john/geotop/src/geotop/radiation.h:27:0,
    from /home/john/geotop/src/geotop/meteodistr.h:38,
    from /home/john/geotop/src/geotop/meteo.h:29,
    from /home/john/geotop/src/geotop/times.h:31,
    from /home/john/geotop/src/geotop/geotop_common.h:6,
    from /home/john/geotop/src/geotop/geotop_common.cc:1:
    /home/john/geotop/src/geotop/../meteoio_plugin/meteoioplugin.h:22:133: error: ‘TInit’ has not been declared
    void meteoio_writeEsriasciiVector(const std::string& filenam, short type, const GeoVector& DTM, long **j, long nr, long nc, TInit *UV);
    src/geotop/CMakeFiles/geotopCommon.dir/build.make:302: recipe for target 'src/geotop/CMakeFiles/geotopCommon.dir/geotop_common.cc.o' failed
    make[2]: *** [src/geotop/CMakeFiles/geotopCommon.dir/geotop_common.cc.o] Error 1
    CMakeFiles/Makefile2:682: recipe for target 'src/geotop/CMakeFiles/geotopCommon.dir/all' failed
    make[1]: *** [src/geotop/CMakeFiles/geotopCommon.dir/all] Error 2
    Makefile:149: recipe for target 'all' failed
    make: *** [all] Error 2

    John from India

    1. Furthermore, John, which Linux distro are you using? Because there are Debian-based pre-compiled packages of GEOtop. You can find more instructions at https://growworkinghard.com/2015/08/27/intall-geotop-precompiled-packages-on-gnulinux/