Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ecCodes required by cfgrib for running weather-mv #225

Open
blackvvine opened this issue Sep 1, 2022 · 0 comments
Open

ecCodes required by cfgrib for running weather-mv #225

blackvvine opened this issue Sep 1, 2022 · 0 comments

Comments

@blackvvine
Copy link
Collaborator

Running the following command in a python 3.8 environment created with pip from main branch fails:

weather-mv rg --uris "gs://$BUCKET/download/*.nc" --output_path            "gs://$BUCKET/download-rg-$(date +%s)/" --dry-run

error:

[...]
<PATH>/venv38/lib/python3.8/site-packages/xarray/backends/cfgrib_.py:29: UserWarning: Failed to load cfgrib - most likely there is a problem accessing the ecCodes library. Try import cfgrib to get the full error message
  warnings.warn(
warning: sdist: standard file not found: should have one of README, README.rst, README.txt, README.md

full trace when importing in python shell:

(venv38-rg) friedrich@basel $ python
Python 3.8.13 (default, Aug 27 2022, 18:46:53) 
[GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cfgrib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<PATH>/venv38-rg/lib/python3.8/site-packages/cfgrib/__init__.py", line 20, in <module>
    from .cfmessage import COMPUTED_KEYS
  File "<PATH>/venv38-rg/lib/python3.8/site-packages/cfgrib/cfmessage.py", line 29, in <module>
    from . import abc, messages
  File "<PATH>/venv38-rg/lib/python3.8/site-packages/cfgrib/messages.py", line 28, in <module>
    import eccodes  # type: ignore
  File "<PATH>/venv38-rg/lib/python3.8/site-packages/eccodes/__init__.py", line 13, in <module>
    from .eccodes import *  # noqa
  File "<PATH>/venv38-rg/lib/python3.8/site-packages/eccodes/eccodes.py", line 12, in <module>
    from gribapi import (
  File "<PATH>/venv38-rg/lib/python3.8/site-packages/gribapi/__init__.py", line 13, in <module>
    from .gribapi import *  # noqa
  File "<PATH>/venv38-rg/lib/python3.8/site-packages/gribapi/gribapi.py", line 34, in <module>
    from gribapi.errors import GribInternalError
  File "<PATH>/venv38-rg/lib/python3.8/site-packages/gribapi/errors.py", line 16, in <module>
    from .bindings import ENC, ffi, lib
  File "<PATH>/venv38-rg/lib/python3.8/site-packages/gribapi/bindings.py", line 35, in <module>
    raise RuntimeError("Cannot find the ecCodes library")
RuntimeError: Cannot find the ecCodes library
>>> 

Adding ecmwflibs==0.4.17 to the requirements seems to resolve the issue (see here).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant