forked from ecmwf/eccodes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
63 lines (45 loc) · 2.56 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
How to build and install ecCodes library/tools
================================================
Building and installation has been tested on several platforms and with several compilers.
However for some platforms modifications to the installation engine may be required.
If you encounter any problems during the installation procedure please send an e-mail
with your problem to:
Installation using CMake
------------------------
This is the recommended method of installation.
However it requires that cmake be installed on your system.
1. Download ecCodes from https://confluence.ecmwf.int/display/ECC/Releases
2. Unpack distribution:
> tar -xzf eccodes-x.y.z-Source.tar.gz
3. Create a separate directory to build ecCodes:
> mkdir build
> cd build
4. Run cmake pointing to the source and specify the installation location:
> cmake ../eccodes-x.y.z-Source -DCMAKE_INSTALL_PREFIX=/path/to/where/you/install/eccodes
It is recommended that you always build in a clean directory and also install into a clean directory.
5. Compile, test and install:
> make
> ctest
> make install
To add the Python3 bindings, use pip3 install from PyPI as follows:
> pip3 install eccodes
or
> pip3 install --install-option="--prefix=/path/to/where/you/install/eccodes" eccodes
You can also pass options to the cmake command above. Some typical examples are:
-DENABLE_EXTRA_TESTS=ON Enable extended regression testing
-DENABLE_NETCDF=ON Enable GRIB to netCDF conversion
-DENABLE_ECCODES_THREADS=ON Enable POSIX threads
-DENABLE_JPG=ON Enable JPEG encoding/decoding (for GRIB packing)
-DCMAKE_Fortran_COMPILER=pgf90 Set Fortran compiler to Portland Group F90 compiler
-DCMAKE_CXX_FLAGS="-O2 -Wall" Prepend the specified flags at the front
of the compilation command for C++ source files
By default the ctest step above 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:
> cmake ... -DENABLE_EXTRA_TESTS=ON
In this mode the tests will take longer and you need to be connected to the internet so data files can be downloaded
for the tests.
Also note that if you have several CPUs, you can invoke the "make" and "ctest" commands above in parallel
(e.g. "make -j4", "ctest -j4"). This will speed up the whole build/test process significantly.
For more details, please see:
https://confluence.ecmwf.int/display/ECC/ecCodes+installation