...
Compilers | |||
---|---|---|---|
C++ | http://gcc.gnu.org/ | ||
Fortran | http://gcc.gnu.org/fortran/ | If fortran Fortran or bufr BUFR support needed | |
Utilities | |||
make | http://www.gnu.org/software/make/ | ||
cmake | http://www.cmake.org/ | version 2.8.4 minimum | |
Python Support | |||
swig | http://www.swig.org/ | to generate the python interface | |
python | http://www.python.org/ | ||
python-numpy | http://www.numpy.org/ | ||
Third party libraries | |||
proj | http://trac.osgeo.org/proj/ | Proj4 to handle projections | |
boost | http://www.boost.org/ (Requires 1.5) | used for coastlines | |
netcdf | http://www.unidata.ucar.edu/software/netcdf/ | if netcdf support neeedneeded | |
pango | http://www.pango.org/ | if png/jpeg support needed | |
Ecmwf libraries | |||
grib-api | GRIB-API Home (Requires 1.9) | if grib support needed | |
odb-api | ODB-API Home | if odb support needed | |
emoslib | if bufr support needed |
...
cmake options | doc | default | ECMWF Scpecific |
---|---|---|---|
CMAKE_INSTALL_PREFIX | where you want to install your Magics library | /usr/local | |
CMAKE_BUILD_TYPE | to select the type of compilation:
| ? | Debug |
CMAKE_CXX_FLAGS | More flags for the C++ compiler | ||
ENABLE_GRIB | enable grib support | on | on |
GRIB_API_PATH | where to find grib-api ( if non-standard installation ) | ||
ENABLE_NETCDF | enable netcdf support ( if non-standard installation ) | on | on |
NETCDF_PATH | where to find netcdf | ||
ENABLE_ODB | enable odb support | off | off |
ODB_API_PATH | where to find odb ( if non-standard installation ) | ||
ENABLE_BUFR | enable bufr support The bufr support os is done using through emoslib . | off | off |
BUFR_LIB | Where to find emos lib l ( if non-standard installation ) | ||
ENABLE_PYTHON | enable python interface | auto | on |
ENABLE_FORTRAN | enable fortran interface | on | on |
ENABLE_METVIEW | enable metview support(and Qt support) | off | off |
ENABLE_CAIRO | enable cairo support | on | on |
BOOST_ROOT | where to find boost ( if non-standard installation ) | /usr/local/apps/boost/1.50.0 ( for the worksation) | |
PROJ4_PATH | where to find proj4 ( if non-standard installation ) | /usr/local/apps/proj4/4.8.0/LP64 |
if If auto, CMake will try to enable the feature, but will not fail if it can not.
To make sure that a feature is really enabled, you will have to specify with the otion option ex: -DENABLE_GRIB=ON. In that case CMake will fail if the grib support can not be enabled.
...
The options to enable/disable output formats allow you to customise your installation. For example, if you have problems on your system with support libraries (see previous section), you might want to try to disable the raster output. Cairo libraries are responsible for most third-party dependencies.
Compiling the code
After the CMake command has run successfully, the user can compile the library by typing make in the build directory.
...
Quick installation guide
This is an example of a list of commands needed you could use to install Magics. It is assumed “>” is the shell prompt. The Magics version number may vary.
>mkdir magics
> mkdir build
>tar > tar -xzf Magics++-2.22.0.tar.gz
>cd build
> cd Magics++-2.22.0
> mkdir build ; cd build
> cmake .. >cmake –DCMAKE_INSTALL_PREFIX=/path/to/where/you/install/Magics++-2.22.0
...