Tuesday, April 8, 2014

Installing MeteoIO on Linux

Matteo Dall'Amico (see previous post on GEOtop installation) also provided instructions for compiling MeteoIO on Linux). For Mac OS instructions, please see this post.

# Check the environment compiler
sudo apt-get install make
sudo apt-get install g++


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


# install SVN
sudo apt-get install subversion

# install cmake
sudo apt-get install cmake
sudo apt-get install cmake-curses-gui

# install gdal libraries
sudo apt-get install libgdal-dev

# install proj libraries
sudo apt-get install proj-bin
sudo apt-get install libproj-dev



# After having selected your directory for installing meteoIO libraries with the usual console commands
# download the source code from the SVN:

svn co https://models.slf.ch/svn/meteoio/trunk

# then go inside the trunk folder

cd /path_to_MeteoIO_SVN/trunk/

# and type the cmake command:

ccmake .

# Press enter in the console and then "c" to configure:
Please set to ON:

BUILD_SHARED_LIBS
PLUGIN_A3DIO
PLUGIN_ARCIO
PLUGING_ARPSIO
PLUGIN_GEOTOPIO
PLUGIN_GRASSIO
PLUGIN_PGMIO
PLUGIN_SMETIO
PLUGIN_SNIO
PROJ4 (then you have to verify the paths to LIBPROJ and to LIBPROJ_INCLUDE_DIR)

All the rest can be set to OFF.

# Then, press "g" to generate the makefile and exit from the console.
# In the terminal, type:

make install

# (with "sudo" if you want to install it as super user).
# Eventually, you have to make the system aware of the new library by typing:

sudo ldconfig -v

After having installed meteoIO, in the needs to understand what it does, one can browse the examples in the "doc" directory. However, s/he can also built the doxygen documentation. Please be sure that you have Doxygen installed. For doing it, please first check you have doxygen installed. Subsequently:

  • using a terminal move to the directory where the meteoIo source code is located. 
  • execute "doxygen -g <configfile>" to create a configuration file, "configfile" for the project
  • execute doxygen <configfile> to create the documentation
  • Find the documentation in a new html directory created
  • Access it by clicking on the index.html file

2 comments:

  1. Dear Riccardo,

    this regards the problems with compilation I heard people have under Ubuntu.

    I did a virtual Ubuntu 14.04 machine on my laptop and I tried to compile MeteoIO and GEOtop following the instructions on the blog. I do not remember what was the exact error I get with MeteoIo, (but for what I remind it was the same as Olaf). Anyway, the cause of errors when compiling GEOtop was MeteoIO.

    I tried first to remove MeteoIO with:

    $ sudo make uninstall

    in the meteoIo folder: but I obtained errors also in deinstalling. Then I removed manually mateoIO from /usr/local/include/ and I eliminate also libmeteio.so from /usr/local/lib/

    Finally I reinstalled meteoIO according to the procedure

    https://groups.google.com/forum/#!topic/geotopusers/UKKTJ5hM0jo

    and everything finally worked.

    I hope that in this way also others can solve their problem. If it does not happens I can also check ccmake flags more carefully.

    Best,

    Francesco

    ReplyDelete
  2. Dear Francesco, thank you for your note. This gives the occasion to remind people that they batter compile meteoIO with proj4 to execute most of GEOtop examples

    ReplyDelete