Skip to main content

odb4py is a Python interface for ECMWF ODB1 databases, developed at the Royal Meteorological Institute of Belgium (RMI).

Project description

PyPI version Documentation Status Python

odb4py 1.3.4rc1 release

Description

odb4py (Observation DataBase FOR PYthon) is a C/Python interface to read and query ECMWF ODB1 databases.
It provides high-performance access to ODB data through a native C backend, with seamless integration into the Python scientific ecosystem.
The package embeds a customized version of the ECMWF ODB software odb_api_bundle-0.18.1-Source and is distributed as manylinux wheels, requiring no external ODB installation.


Features

  • Native C backend based on ECMWF ODB1
  • Support for IFS and ARPEGE ODB databases
  • SQL-like query interface
  • Fast data access with NumPy/C API and pandas integration
  • No runtime dependency on system ODB libraries and binaries
  • Conversion to other formats : ODB2 ,NetcDF and SQLITE

Installation

The odb4py package can be installed from PyPI using pip:

pip install odb4py  

Quick start

 
from odb4py import core      # The extension core
from odb4py import utils     # The helpers module


# Create a connction  
conn = core.odb_open( database  = "/path/to/ODB")   # ECMA or CCMA 

# Select lat/lon and obsvalue
sql_query="SELECT degrees(lat), degrees(lon) , obsvalue FROM hdr, body"

# Parse the query 
p=utils.SqlParser ("/path/to/ODB")

nf  =p.get_nfunc    ( sql_query )
sql =p.clean_string ( sql_query )


# Get the data as a Python dictionary 
data = conn.odb_dict( database  ="/path/to/ODB" ,   #  ODB path
                       sql_query= sql           ,   #  SQL query              
                       nfunc    = nf       )        #  Number of functions in the query
print(data)

For more documentation, please refer to the Official Documentation.

Requirements

Python ≥ 3.9
NumPy ≥ 2.0
Linux system (manylinux2014 compatible)

Optional

pyodc ≥ 1.6.0

Scientific context

ODB (Observation DataBase) is a column-oriented database format developed at ECMWF and widely used in numerical weather prediction systems such as IFS,ARPEGE and NWP limited are models

odb4py is primarily designed for:

  • Meteorologists and atmospheric scientists (especially within the ACCORD consortium)
  • Operational and research environments
  • Post-processing and diagnostic workflows
  • The current package version focuses on read-only access and data extraction for scientific analysis.

License

Apache License, Version 2.0. See LICENSE for details .

odb4py incorporates components derived from the ECMWF ODB software.

The original source code has been modified to:

  • Expose functionality through a Python interface
  • Reduce the runtime footprint
  • Enable portable binary wheel distribution

All original copyrights remain with ECMWF.

Acknowledgements

  • This project incorporates and is derived from the ECMWF ODB software.
    ODB was developed at the European Centre for Medium-Range Weather Forecasts (ECMWF) by S. Saarinen et al. All rights to the original ODB software remains with ECMWF and their respective owners.
  • The author would like S. Martinez from Météo France for to provide ARPEGE global model ODB samples. The latters have been used to evaluate the performance of the package.
  • The author would also like to thank 'M.O Ait Meziane' for testing odb4py and providing valuable feedback.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

odb4py-1.3.4rc1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (36.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

odb4py-1.3.4rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (36.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

odb4py-1.3.4rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (36.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

odb4py-1.3.4rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (36.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

odb4py-1.3.4rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (36.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file odb4py-1.3.4rc1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for odb4py-1.3.4rc1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7abf5a5125c66b84fdd44f34969fdda499945ec3b0027b56f440c03451f85814
MD5 6e5b03693d60458ad0943823362d7d44
BLAKE2b-256 c4ebc100410cb2686d4d5e595bada40f14e3e7737817f4ba47be6b6737c423ae

See more details on using hashes here.

File details

Details for the file odb4py-1.3.4rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for odb4py-1.3.4rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e7bf07f7c1652bcd9e4c91b316073f3ad9332170fd7eab02ff5552ed1d1eba58
MD5 ecda6e96010f71a6e920be26a1d9f468
BLAKE2b-256 a5dca07552021e23ec9d29d909f17ad7df265650e156ec5127f792510de00244

See more details on using hashes here.

File details

Details for the file odb4py-1.3.4rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for odb4py-1.3.4rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd5ae18d87dbfaf8542ef2d11dcc8dfd6ccff6ea8fe4c1cefa2b3c36ebd4cd66
MD5 d2669e4831a8f0ca42e116e01cbd7ba8
BLAKE2b-256 2c2f261f5766ffcad96f1a95922961fdc1d881e692bfd0da24e9206eb7c6a2e4

See more details on using hashes here.

File details

Details for the file odb4py-1.3.4rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for odb4py-1.3.4rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 85627091ab51be0087555f7d0282a60144cbb00c04b88da26401ebf7d2f03528
MD5 51f63b16f91f24b7d20cfeb9d06a7522
BLAKE2b-256 9a02dd539b16e106699c11680e775c4a3222af7ead8a9bdbd1569d0ee5b95f04

See more details on using hashes here.

File details

Details for the file odb4py-1.3.4rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for odb4py-1.3.4rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cfbfed54fce0747b9418a7b8bf9e0a7a5be3f73c1a9269f9e2b7fb92f806c5b7
MD5 010ca39afd4b59d9ffebd533402e3b8c
BLAKE2b-256 c69fc61028f3c087f81d067ca966e5331a18d5ae73fcbe58bfdb2d8ba09edcb2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page