"odclib"
Actively maintained. Last release 7 weeks ago. A safe choice.
pip install odclibREADME as published on PyPI with version 1.6.3.32.
odc
C, C++ and Fortran libraries providing encoders and decoders and interrogation of meteorological data encoded in ODB-2 format as well as command line tools for investigation and manipulation of ODB-2 data.
Dependencies
Required
Optional
- Fortran compiler
- Doxygen
Installation
git clone https://github.com/ecmwf/odc
cd odc
# Setup environment variables (edit as needed)
SRC_DIR=$(pwd)
BUILD_DIR=build
INSTALL_DIR=$HOME/local
export eckit_DIR=$INSTALL_DIR # set to eckit install prefix
# Create the the build directory
mkdir $BUILD_DIR
cd $BUILD_DIR
# Run ecbuild (CMake)
ecbuild --prefix=$INSTALL_DIR -- $SRC_DIR
# Build and install
make -j10
make test # optional
make install
# Check installation
$INSTALL_DIR/bin/odc --version
Usage
Include the odc headers like so:
// odc_test.c
#include "odc/api/odc.h"
int main() {
odc_initialise_api();
return 0;
}
Make sure to reference the linked library when compiling:
gcc -lodccore odc_test.c