Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

CMAKE_INSTALL_PREFIXwhere you want to install your ecCodes/usr/local
CMAKE_BUILD_TYPE

to select the type of compilation:

  • Debug
  • RelWithDebInfo
  • Release
  • Production
RelWithDebInfo
CMAKE_C_COMPILERC Compiler 
CMAKE_C_FLAGSFlags for the C Compiler 
CMAKE_Fortran_COMPILERFortran Compiler 
CMAKE_Fortran_FLAGSFlags for the Fortran Compiler 
ENABLE_NETCDFFor the grib_to_netcdf convert toolAUTO
ENABLE_JPGEnable JPEG2000 support. This option should look for Jasper or OpenJPG

AUTO

ENABLE_PNGEnable PNG support for decoding/encodingOFF
ENABLE_PYTHONOffers the Python interface to the packageAUTO
ENABLE_FORTRANOffers the Fortran interface to the packageAUTO
ENABLE_GRIB_THREADSEnable POSIX threadsOFF
cmake options
doc
default


Note: The compilers can also be overridden by setting the environment variables CC and FC

 

Quick installation guide

Here is an example of a list of commands you could use to install ecCodes.  It is assumed “>” is the shell prompt.

Code Block
> tar -xzf  eccodes-x.y.z-Source.tar.gz
> mkdir build ; cd build 

> cmake –DCMAKE_INSTALL_PREFIX=/path/to/where/you/install/eccodes ../eccodes-x.y.z-Source 
...

> make
> make test
> make install

 

Note that for the testing step ("make test") you need to be connected to the internet (and set the relevant "http_proxy" environment variable if you must use a proxy) so data files can be downloaded for the tests. You can however download all the data files in one go (See the data tarball link at the top of the Releases page)

Legacy build system ("autotools")

With the current package the "autotools" build system is still supported, so you can still build eccodes the same way as grib_api (see GRIB API installation). However, this build system is deprecated and will be removed in a future version, so we recommend you to start using Cmake as soon as possible.