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/


  4. Dear all, I'm finding to install Geotop on my Ubuntu machine following the above procedure. But, when I make the project, I have the following error:
    [ 7%] Built target gt_utilities
    [ 26%] Built target geotopCommon
    [ 30%] Built target geotopPartSnow
    [ 31%] Building CXX object src/meteoio_plugin/CMakeFiles/meteoioplugin.dir/meteoioplugin.cc.o
    /home/rita/geotop/src/meteoio_plugin/meteoioplugin.cc: In function ‘void meteoio_init(mio::IOManager&)’:
    /home/rita/geotop/src/meteoio_plugin/meteoioplugin.cc:42:15: error: ‘fileExists’ is not a member of ‘mio::IOUtils’
    if (IOUtils::fileExists(cfgfile)) {
    /home/rita/geotop/src/meteoio_plugin/meteoioplugin.cc:42:15: note: suggested alternative:
    In file included from /usr/local/include/meteoio/MeteoIO.h:49:0,
    from /home/rita/geotop/src/meteoio_plugin/../geotop/datastructs.h:27,
    from /home/rita/geotop/src/meteoio_plugin/../geotop/struct.geotop.h:23,
    from /home/rita/geotop/src/meteoio_plugin/../geotop/times.h:28,
    from /home/rita/geotop/src/meteoio_plugin/../geotop/geotop_common.h:6,
    from /home/rita/geotop/src/meteoio_plugin/meteoioplugin.h:25,
    from /home/rita/geotop/src/meteoio_plugin/meteoioplugin.cc:21:
    /usr/local/include/meteoio/FileUtils.h:57:7: note: ‘mio::FileUtils::fileExists’
    bool fileExists(const std::string& filename);
    src/meteoio_plugin/CMakeFiles/meteoioplugin.dir/build.make:62: set di istruzioni per l'obiettivo "src/meteoio_plugin/CMakeFiles/meteoioplugin.dir/meteoioplugin.cc.o" non riuscito
    make[2]: *** [src/meteoio_plugin/CMakeFiles/meteoioplugin.dir/meteoioplugin.cc.o] Errore 1
    CMakeFiles/Makefile2:806: set di istruzioni per l'obiettivo "src/meteoio_plugin/CMakeFiles/meteoioplugin.dir/all" non riuscito
    make[1]: *** [src/meteoio_plugin/CMakeFiles/meteoioplugin.dir/all] Errore 2
    Makefile:162: set di istruzioni per l'obiettivo "all" non riuscito
    make: *** [all] Errore 2.
    Can you help me, please?
    Thank you

    1. Dear Rita, search GEOtop essentials, for more information and subscribe to the GEOtop users groups. The issues you are having were discussed recently on the groupgeotopusers@googlegroups.com. Please google geotopusers at googlegroups to browse it.

  5. Sir, thanks you a lot, it works now!