meteoio

Getting-started

Table of Content

How to get started with MeteoIO

Introduction

First, we would thank you for your interest in MeteoIO. And we would like as a starting point to explain you what MeteoIO is and is not. MeteoIO is none of the following:

  • an end user application
  • a graphical user interface to meteorological data
  • a ready to use application

But MeteoIO is:

  • a way to easily integrate meteorological data into an application
  • an easy and robust way to automatically and transparently handle meteo data
  • a toolbox at your disposal for enhancing your application

This document will now explain you how to download MeteoIO, how to compile it according to your needs and how to find your way in its code and documentation.

Getting MeteoIO

There are several ways to get MeteoIO:

  • as binary packages for your platform;
  • as source package, to recompile for your platform;
  • as SVN working copy (checkout)

Binary packages

For each release, several packages are prepared for various operating systems (MS Windows, Mac osX, Linux RPM and Linux DEB, Linux TGZ) and distributed in the downloads section of this web site. This is the easiest way to install MeteoIO. On Windows and osX, the installer lets you choose which components you want to install (library itself, plugins, documentation, headers). It also sets up a link to the documentation directory. There is a bug with some versions of the installer regarding the "add to PATH" option. Selecting "for all users" does not work, therefore please select "for current user".

Source package

For each release, the MeteoIO team prepares a source package, distributed in the downloads section of this web site. You have to unpack the archive, enter into it and compile it (see compiling instructions below).

SVN checkout

This is mainly for developers who want to work on MeteoIO itself. In order to access the latest version, point your SVN client to the source repository https://slfsmm.indefero.net/svn/slfsmm/meteoio (this is the address to give your svn client). It is recommended to use https as the transport protocol (this goes better through firewalls). If you are allowed to commit to the SVN server, please use this web site's user name and your extra password (as given in your user account configuration page).

In order to access the stable releases, point to TAGS instead of HEAD and select which release you want (the commits messages give the matching stable release).

By getting your version of MeteoIO through an SVN checkout, you can later very simply bring your local copy up to date with the version on the server: in a terminal, go to your MeteoIO directory (trunk) and then enter the command svn update. Another alternative is to use a graphical svn client, such as Kdesvn on Linux, Tortoisesvn on Windows or Versions on mac.

Compiling MeteoIO

Compiling on Linux/Unix

MeteoIO is compiled with Cmake. Cmake is available for all major plateforms on its home page. You'll obviously need to have it installed on your system (on OSX it is advised to check the box to install both the GUI and the command line tools). Once cmake is installed, you can compile MeteoIO:

  • open a terminal and change into the trunk folder of meteoio
  • "ccmake ."
  • Press [c] to configure, it will then populate the screen with configurable options
  • choose the relevant options (toggle ON/OFF by pressing Enter)
  • Press [c] to configure
  • Do not forget to configure the install path (either system wide if you have access to system rights or in a local directory where you have write permission)
  • Press [g] to generate and exit the interface (you might have to press [c] a few times for it to have everything finally setup)
  • "make"
  • you can then type "make doc" if you have doxygen on your system and want to prepare the online documentation (that will be available through doc/MeteoIO_doc.html)

Once MeteoIO has been compiled, you can install it. As previously mentioned, there are two options: you install in a system directory (and you need system rights, either through sudo or as root) or you don't:

  • system wide install
    • "sudo make install"
    • "sudo ldconfig" (if your install path is already listed in /etc/ld.so.conf. If not, add it to this list before running ldconfig)
  • local install
    • "make install"
    • export LD_LIBRARY_PATH={your install path}/lib:$LD_LIBRARY_PATH (for bash shell). This can be put into your $HOME/.bashrc or $HOME/.profile in order to become permanent for your account.

Afterward, the examples can be compiled by going in doc/examples and typing "make".

Compiling on Android

Please note that this is highly experimental at this point. You need to install the following components:

Unpack these three packages, and following along these lines, set a few environment variables (it seems that setting ANDROID_NKD to point to the root of your ndk is enough for cmake-android to find what it needs, without relying on ANDROID_NDK_... and ANDTOOLCHAIN that were not working with ndk version 7).

Then, compile with "android-cmake", "make".

Compiling and Downloading on Windows

  • Either download a MeteoIO release tarball (see download tab) or install a SVN client, e.g. QSvn or TortoiseSVN and checkout MeteoIO from the repository.
  • Install CMake.
  • You need a C++ compiler. Among others, you can use Code::Blocks, MinGW, Visual C++. These three options will be detailed later.
  • Start CMake and set the source path to your local MeteoIO trunk and set the trunk directory as build directory. Click on "Configure"
  • For Code::Blocks:
    • It can be downloaded free at www.codeblocks.org. We highly recommend to download the full package (ie: the one containing MinGW)
    • when installing Code::Blocks, the MinGW installation might have to be tweaked as explained below in the MinGW section (if the package has not been fixed)
    • In CMake, select "Code::Blocks - MinGW Makefiles" as the generator
    • Click on "Generate"
    • Open the project file (ending in .cbp) with Code::Blocks and compile it
  • For MinGW:
    • It can be downloaded free at MinGW
    • IMPORTANT: When installing MinGW make sure that you install MinGW together with MinGW make and add the MinGW bin directory to your PATH environment variable
    • create a shortcut (or simply a copy) named make.exe in the MinGW bin directory pointing to mingw-make.exe in the same directory
    • In CMake, select "MinGW Makefiles"
    • in CMake, click on "Generate"
    • Run cmd.exe, change into the build directory as specified for CMake (e.g. trunk) and run "mingw32-make"
  • For Visual C++
    • It can be downloaded free at Microsoft, after registration (this is not open source software!)
    • In CMake, select "Visual Studio XX" where XX is your version
    • in CMake, click on "Generate"
    • open the project file (ending in .sln) with Visual C++ and compile

Compiling on OSX

  • download and install XCode (you can get version 3 for free after registering at http://connect.apple.com)
  • download and install cmake (click "yes" to have it in your path)
  • you can also download and install doxygen, but then you need to create a symlink to the binary in /usr/bin
  • follow the same compiling instructions as for Linux
  • after compiling and installing MeteoIO, add its install path to DYLD_FALLBACK_LIBRARY_PATH (this is done in your HOME/.profile that might have to be created).

Getting help

There is a specific page dedicated to this topic: GettingHelp

From a binary package

An HTML documentation is available in the MeteoIO installation directory, in doc/html/index.html. Binary packages might have installed a link to this file in your start menu. A few code examples, with a very simple Makefile and some test input data are also part of the documentation. You will find them in the MeteoIO installation directory, in doc/examples.

From a source installation

A full doxygen documentation exists and is available starting in doc/html/index.html. If this documentation would not be part of your package, you can regenerate it by typing "make documentation" (you need doxygen installed on your system). In this documentation, you are encouraged to follow the "quick overview" link in order to get a general overview of the domains covered by MeteoIO. A few code examples are provided in doc/examples and can be a good starting point for experimenting with the library (although these examples are voluntarily very simple and in no way replace the proper documentation!).

From a documentation only package

If you have a source package but don't want to install doxygen, you can get a documentation only package. This is part of the various downloads that are offered with each release. It contains the html documentation as well as the code examples.

External links

A very good tutorial has been prepared by Silvia Simoni for the GeoTop team. It can be found at this location.