ecmwf / cfgrib

A Python interface to map GRIB files to the NetCDF Common Data Model following the CF Convention using ecCodes
Apache License 2.0
400 stars 77 forks source link

Drop internal ecCodes bindings and switch to eccodes-python #95

Closed alexamici closed 3 years ago

alexamici commented 5 years ago

The internal API is ready and you can test it by setting the environment variable CFGRIB_USE_EXTERNAL_ECCODES_BINDINGS to ON, for example:

$ pip install eccodes-python>=0.9.2
$ CFGRIB_USE_EXTERNAL_ECCODES_BINDINGS=ON ipython
cdibble commented 3 years ago

Does it need to be CFGRIB_USE_EXTERNAL_ECCODES_BINDINGS=1 ?

given:

try:
    # select between using the external ecCodes bindings or the internal implementation
    if int(os.environ.get('CFGRIB_USE_EXTERNAL_ECCODES_BINDINGS', '0')):
        import eccodes
    else:
        from . import bindings as eccodes

from messages.py