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
RelWithDebInfo
BUILD_SHARED_LIBSSelect the type of library built:
  • ON (Build shared libraries only)
  • OFF (Build static libraries only)
  • BOTH (Build both shared and static libraries)
ON
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 toolON
ENABLE_JPG

Enable JPEG2000 support. This option should look for Jasper or OpenJPG. If this option is enabled it is also possible to pick which one of OpenJpeg or Jasper to use

  -DENABLE_JPG_LIBOPENJPEG=ON
  -DENABLE_JPG_LIBJASPER=ON

ON

ENABLE_PNGEnable PNG support for decoding/encodingOFF
ENABLE_AECEnable Adaptive Entropy Coding for decoding/encoding (CCSDS)OFF
ENABLE_PYTHONPYTHON2Offers the Python interface to the package.
Note: This option is only for Python 2 (now deprecated)
For Python 3 use "pip3 install". See below
OFF
ENABLE_FORTRANOffers the Fortran interface to the packageON
ENABLE_ECCODES_THREADSEnable POSIX threadsOFF
ENABLE_ECCODES_OMP_THREADSEnable OpenMP threadsOFF
ENABLE_MEMFSSee Memory based access to definition/sample filesOFF
ENABLE_EXTRA_TESTSEnable extended regression testing (which requires data downloads)OFF
cmake options
doc
default


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

Note: To see the full output from the compilation, you can use:

   make VERBOSE=1

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
> ctest
> make install


It is recommended that you always build in a clean directory and also install into a clean directory.

By default the ctest step above (running the tests) does NOT require any data to be downloaded and only runs basic sanity tests. However if you wish to exercise more of the functionality of ecCodes, you are advised to configure the build with:

Code Block
> cmake ...  -DENABLE_EXTRA_TESTS=ON

In this mode the tests will take longer and 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)

...