Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: update version numbers of dependencies and links

...

Before you install from source code you might want to check that already compiled binary versions are available to you. Magics and third-party dependent software packages might be available as binary packages for you platform in form of RPMs or Debian packages . You might find them by going to the software search services, such as for OpenSuSE and SLES at http://software.opensuse.org/search (select "Search options" - "Include users' home projects"). Ubuntu for Linux. Ubuntu maintains a Magics version in their system default repository. 

Installing Magics through conda and pip

...

Code Block
conda install -c conda-forge Magics=4.0.0
conda activate
python my-magics-script.py

...

 http://www.boost.org/ (Requires 1.5)
Compilers
C++http://gcc.gnu.org/ The compiler must support C++ 17. GCC supports it from version 7
Fortranhttp://gcc.gnu.org/fortran/If Fortran or BUFR support needed
Utilities
Only needed to run Fortran tests
Utilities

make

http://www.gnu.org/software/make/
cmakehttps://cmake.org> v2.8.4
Python Support
pythonhttp://www.python.org/versions 2.7 and 3.x supported
python-numpyhttp://www.numpy.org/pip install numpy
version > 3.12
python-jinja2pip install jinja2Third party libraries
projhttphttps://tracproj.osgeo.org/proj/Proj4 to handle projectionsboostused for coastlines
netcdfhttp://www.unidata.ucar.edu/software/netcdf/

if for netcdf support needed

Please note: You also need to install the legacy C++ interface and HDF5

cairo + pangohttps://www.cairographics.org
http://www.pango.org/
if for png/pdf support needed
expathttp://expat.sourceforge.net/for XML parsing
ECMWF libraries
ecCodesECCEnables GRIB and BUFR support 
odcodc on GitHubodb-apiODB-API Homeif ODB support needed

Include Page
SUP:General CMake installation instructions
SUP:General CMake installation instructions

Magics specific CMake options

After changing into the build Magics directory, the user  user has to run CMake with his/her own options. The command gives feedback on what requirements are fulfilled and what software is still required. Table below gives an overview of the different options of configure. The default (without any options) will compile a share library only and install it in /usr/local/.

cmake optionsdocdefault
ECCODES_PATHwhere to find eccode eccodes ( if non-standard installation  ) 
ENABLE_NETCDFenable netcdf supporton
NETCDF_PATHwhere to find netcdf  ( if non-standard installation  ) 
ENABLE_ODBenable odb supportoff
ODB_API_PATHwhere to find odb ( if non-standard installation  ) 
ENABLE_PYTHONenable python interfaceautoENABLE_FORTRANenable fortran interfaceon
ENABLE_METVIEWenable metview support(and Qt support)off
ENABLE_CAIROenable Cairo supporton
BOOST_ROOTwhere to find boost ( if non-standard installation  ) 
PROJ4_PATHwhere to find proj4 ( if non-standard installation  ) 

To make sure that a feature is really enabled, you will have to specify with the option ex: -DENABLE_GRIBNETCDF=ON. In that case CMake will fail if the GRIB NetCDF support can not cannot be enabled.

Testing your build

The Magics code contains a directory called test in which, in separate sub-directories, tests for the various interfaces of Magics are provided. Test programs in Fortran , and C , Python and MagML are compiled and run if MAGPLUS_HOME=$PWD make check is invoked from the root directory. (Note that the MAGPLUS_HOME needs to be set!)

...