eccodes 2.41.0__tar.gz → 2.43.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {eccodes-2.41.0 → eccodes-2.43.0}/CHANGELOG.rst +14 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/Makefile +1 -1
- {eccodes-2.41.0 → eccodes-2.43.0}/PKG-INFO +60 -18
- {eccodes-2.41.0 → eccodes-2.43.0}/README.rst +44 -16
- {eccodes-2.41.0 → eccodes-2.43.0}/ci/requirements-docs.txt +2 -2
- {eccodes-2.41.0 → eccodes-2.43.0}/eccodes/highlevel/message.py +1 -1
- {eccodes-2.41.0 → eccodes-2.43.0}/eccodes.egg-info/PKG-INFO +60 -18
- eccodes-2.43.0/eccodes.egg-info/requires.txt +7 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/gribapi/bindings.py +2 -2
- {eccodes-2.41.0 → eccodes-2.43.0}/gribapi/gribapi.py +10 -2
- {eccodes-2.41.0 → eccodes-2.43.0}/setup.py +6 -2
- {eccodes-2.41.0 → eccodes-2.43.0}/tests/test_eccodes.py +18 -1
- {eccodes-2.41.0 → eccodes-2.43.0}/tests/test_highlevel.py +3 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/tox.ini +1 -1
- eccodes-2.41.0/eccodes.egg-info/requires.txt +0 -4
- {eccodes-2.41.0 → eccodes-2.43.0}/.dockerignore +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/CONTRIBUTING.rst +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/Dockerfile +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/LICENSE +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/MANIFEST.in +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/builder.py +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/ci/requirements-dev.txt +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/ci/requirements-docs.in +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/ci/requirements-tests.in +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/ci/requirements-tests.txt +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/docs/_static/.gitkeep +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/docs/conf.py +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/docs/index.rst +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/eccodes/__init__.py +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/eccodes/__main__.py +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/eccodes/eccodes.py +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/eccodes/highlevel/__init__.py +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/eccodes/highlevel/reader.py +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/eccodes.egg-info/SOURCES.txt +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/eccodes.egg-info/dependency_links.txt +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/eccodes.egg-info/top_level.txt +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/eccodes.egg-info/zip-safe +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/gribapi/__init__.py +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/gribapi/eccodes.h +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/gribapi/errors.py +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/gribapi/grib_api.h +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/setup.cfg +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/tests/sample-data/era5-levels-members.grib +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/tests/sample-data/tiggelam_cnmc_sfc.grib2 +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/tests/test_20_main.py +0 -0
- {eccodes-2.41.0 → eccodes-2.43.0}/tests/test_20_messages.py +0 -0
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
Changelog for eccodes-python
|
|
3
3
|
============================
|
|
4
4
|
|
|
5
|
+
2.43.0 (2025-07-24)
|
|
6
|
+
--------------------
|
|
7
|
+
|
|
8
|
+
- ECC-2106: Use eccodeslib instead of own-built binaries
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
2.42.0 (2025-06-25)
|
|
12
|
+
--------------------
|
|
13
|
+
|
|
14
|
+
- ECC-2081: Allow memoryview as input to codes_new_from_message
|
|
15
|
+
- ECC-2086: GRIB: getting the bitmap using up all the memory
|
|
16
|
+
- ECC-2072: high-level 'get' function should return default value if key is not implemented
|
|
17
|
+
|
|
18
|
+
|
|
5
19
|
2.41.0 (2025-04-10)
|
|
6
20
|
--------------------
|
|
7
21
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
PACKAGE := eccodes-python
|
|
3
3
|
IMAGE := $(PACKAGE)-image
|
|
4
4
|
MODULE := eccodes
|
|
5
|
-
PYTHONS := python3.9
|
|
5
|
+
PYTHONS := python3.9 pypy3
|
|
6
6
|
PYTHON := python
|
|
7
7
|
|
|
8
8
|
PYTESTFLAGS_TEST := -v --flakes --doctest-glob '*.rst' --cov=$(MODULE) --cov-report=html --cache-clear
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eccodes
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.43.0
|
|
4
4
|
Summary: Python interface to the ecCodes GRIB and BUFR decoder/encoder
|
|
5
5
|
Home-page: https://github.com/ecmwf/eccodes-python
|
|
6
6
|
Author: European Centre for Medium-Range Weather Forecasts (ECMWF)
|
|
@@ -10,7 +10,6 @@ Keywords: ecCodes GRIB BUFR
|
|
|
10
10
|
Classifier: Development Status :: 4 - Beta
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -24,6 +23,7 @@ Requires-Dist: numpy
|
|
|
24
23
|
Requires-Dist: attrs
|
|
25
24
|
Requires-Dist: cffi
|
|
26
25
|
Requires-Dist: findlibs
|
|
26
|
+
Requires-Dist: eccodeslib; platform_system != "Windows"
|
|
27
27
|
Dynamic: author
|
|
28
28
|
Dynamic: author-email
|
|
29
29
|
Dynamic: classifier
|
|
@@ -61,8 +61,11 @@ Limitations:
|
|
|
61
61
|
Installation
|
|
62
62
|
============
|
|
63
63
|
|
|
64
|
-
**From version 2.
|
|
65
|
-
|
|
64
|
+
**From version 2.43.0, the ecCodes Python bindings on PyPi will depend
|
|
65
|
+
on the PyPi package 'eccodeslib' on Linux and MacOS. This package provides
|
|
66
|
+
the binary ecCodes library. On Windows, the ecCodes Python bindings will
|
|
67
|
+
continue to directly provide the ecCodes binary library without a dependency
|
|
68
|
+
on eccodeslib. See below for details.**
|
|
66
69
|
|
|
67
70
|
Installation from PyPI
|
|
68
71
|
----------------------
|
|
@@ -71,17 +74,38 @@ The package can be installed from PyPI with::
|
|
|
71
74
|
|
|
72
75
|
$ pip install eccodes
|
|
73
76
|
|
|
74
|
-
This installation will, by default, include the ecCodes binary library (
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
This installation will, by default, include the ecCodes binary library (either
|
|
78
|
+
supplied by the 'eccodes' package on Windows, or via the 'eccodeslib' package
|
|
79
|
+
on Linux and MacOS), meaning that no external ecCodes binary library is
|
|
80
|
+
required.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
Bypassing the provided binary library
|
|
84
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
85
|
+
|
|
86
|
+
Linux and MacOS
|
|
87
|
+
+++++++++++++++
|
|
88
|
+
|
|
89
|
+
If you have an external ecCodes binary library that you wish to use, consult the documentation
|
|
90
|
+
of the `findlibs <https://github.com/ecmwf/findlibs>`_ package, which is used by the ecCodes Python bindings to
|
|
91
|
+
locate the binary library. This allows the use of environment variables
|
|
92
|
+
to refine the search algorithm.
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
Windows
|
|
96
|
+
+++++++
|
|
97
|
+
|
|
98
|
+
If you have an external ecCodes binary library that you wish to use, set the
|
|
99
|
+
following environment variable before you import eccodes::
|
|
77
100
|
|
|
78
101
|
$ export ECCODES_PYTHON_USE_FINDLIBS=1
|
|
79
102
|
|
|
80
103
|
If this is set, the ecCodes' Python bindings will use the `findlibs <https://github.com/ecmwf/findlibs>`_ package
|
|
81
|
-
to locate the binary library
|
|
82
|
-
|
|
83
|
-
You may also install a version of ecCodes' Python interface that does not
|
|
84
|
-
in which case the findlibs mechanism will
|
|
104
|
+
to locate the binary library.
|
|
105
|
+
|
|
106
|
+
You may also install a version of ecCodes' Python interface that does not
|
|
107
|
+
include a binary library at all, in which case the findlibs mechanism will
|
|
108
|
+
be used as before::
|
|
85
109
|
|
|
86
110
|
$ pip install eccodes --no-binary eccodes
|
|
87
111
|
|
|
@@ -95,15 +119,18 @@ ecCodes' Python bindings can be installed from the `conda-forge <https://conda-f
|
|
|
95
119
|
|
|
96
120
|
$ conda install -c conda-forge python-eccodes
|
|
97
121
|
|
|
98
|
-
This will install the Python bindings (`python-eccodes`) and also the ecCodes
|
|
122
|
+
This will install the Python bindings (`python-eccodes`) and also the ecCodes
|
|
123
|
+
binary library (`eccodes`) on which they depend.
|
|
99
124
|
|
|
100
125
|
|
|
101
126
|
System dependencies
|
|
102
127
|
-------------------
|
|
103
128
|
|
|
104
|
-
The Python module depends on the ECMWF *ecCodes* binary library.
|
|
105
|
-
|
|
106
|
-
|
|
129
|
+
The Python module depends on the ECMWF *ecCodes* binary library.
|
|
130
|
+
From version 2.37.0, this library is supplied with the Python
|
|
131
|
+
module on both PyPi and conda, as described above. If you wish
|
|
132
|
+
to install and use a separate binary library (see above), it must
|
|
133
|
+
be installed on the system and accessible as a shared library.
|
|
107
134
|
|
|
108
135
|
On a MacOS with HomeBrew use::
|
|
109
136
|
|
|
@@ -117,7 +144,8 @@ As an alternative you may install the official source distribution
|
|
|
117
144
|
by following the instructions at
|
|
118
145
|
https://confluence.ecmwf.int/display/ECC/ecCodes+installation
|
|
119
146
|
|
|
120
|
-
You may run a simple selfcheck command to ensure that your system is set
|
|
147
|
+
You may run a simple selfcheck command to ensure that your system is set
|
|
148
|
+
up correctly::
|
|
121
149
|
|
|
122
150
|
$ python -m eccodes selfcheck
|
|
123
151
|
Found: ecCodes v2.39.0.
|
|
@@ -127,8 +155,8 @@ You may run a simple selfcheck command to ensure that your system is set up corr
|
|
|
127
155
|
Debugging the library search
|
|
128
156
|
----------------------------
|
|
129
157
|
|
|
130
|
-
In order to gain insights into the search for the binary library, set
|
|
131
|
-
importing eccodes::
|
|
158
|
+
In order to gain insights into the search for the binary library, set
|
|
159
|
+
the following environment variable before importing eccodes::
|
|
132
160
|
|
|
133
161
|
$ export ECCODES_PYTHON_TRACE_LIB_SEARCH=1
|
|
134
162
|
|
|
@@ -211,6 +239,20 @@ does it submit to any jurisdiction.
|
|
|
211
239
|
Changelog for eccodes-python
|
|
212
240
|
============================
|
|
213
241
|
|
|
242
|
+
2.43.0 (2025-07-24)
|
|
243
|
+
--------------------
|
|
244
|
+
|
|
245
|
+
- ECC-2106: Use eccodeslib instead of own-built binaries
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
2.42.0 (2025-06-25)
|
|
249
|
+
--------------------
|
|
250
|
+
|
|
251
|
+
- ECC-2081: Allow memoryview as input to codes_new_from_message
|
|
252
|
+
- ECC-2086: GRIB: getting the bitmap using up all the memory
|
|
253
|
+
- ECC-2072: high-level 'get' function should return default value if key is not implemented
|
|
254
|
+
|
|
255
|
+
|
|
214
256
|
2.41.0 (2025-04-10)
|
|
215
257
|
--------------------
|
|
216
258
|
|
|
@@ -24,8 +24,11 @@ Limitations:
|
|
|
24
24
|
Installation
|
|
25
25
|
============
|
|
26
26
|
|
|
27
|
-
**From version 2.
|
|
28
|
-
|
|
27
|
+
**From version 2.43.0, the ecCodes Python bindings on PyPi will depend
|
|
28
|
+
on the PyPi package 'eccodeslib' on Linux and MacOS. This package provides
|
|
29
|
+
the binary ecCodes library. On Windows, the ecCodes Python bindings will
|
|
30
|
+
continue to directly provide the ecCodes binary library without a dependency
|
|
31
|
+
on eccodeslib. See below for details.**
|
|
29
32
|
|
|
30
33
|
Installation from PyPI
|
|
31
34
|
----------------------
|
|
@@ -34,17 +37,38 @@ The package can be installed from PyPI with::
|
|
|
34
37
|
|
|
35
38
|
$ pip install eccodes
|
|
36
39
|
|
|
37
|
-
This installation will, by default, include the ecCodes binary library (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
This installation will, by default, include the ecCodes binary library (either
|
|
41
|
+
supplied by the 'eccodes' package on Windows, or via the 'eccodeslib' package
|
|
42
|
+
on Linux and MacOS), meaning that no external ecCodes binary library is
|
|
43
|
+
required.
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
Bypassing the provided binary library
|
|
47
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
48
|
+
|
|
49
|
+
Linux and MacOS
|
|
50
|
+
+++++++++++++++
|
|
51
|
+
|
|
52
|
+
If you have an external ecCodes binary library that you wish to use, consult the documentation
|
|
53
|
+
of the `findlibs <https://github.com/ecmwf/findlibs>`_ package, which is used by the ecCodes Python bindings to
|
|
54
|
+
locate the binary library. This allows the use of environment variables
|
|
55
|
+
to refine the search algorithm.
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
Windows
|
|
59
|
+
+++++++
|
|
60
|
+
|
|
61
|
+
If you have an external ecCodes binary library that you wish to use, set the
|
|
62
|
+
following environment variable before you import eccodes::
|
|
40
63
|
|
|
41
64
|
$ export ECCODES_PYTHON_USE_FINDLIBS=1
|
|
42
65
|
|
|
43
66
|
If this is set, the ecCodes' Python bindings will use the `findlibs <https://github.com/ecmwf/findlibs>`_ package
|
|
44
|
-
to locate the binary library
|
|
45
|
-
|
|
46
|
-
You may also install a version of ecCodes' Python interface that does not
|
|
47
|
-
in which case the findlibs mechanism will
|
|
67
|
+
to locate the binary library.
|
|
68
|
+
|
|
69
|
+
You may also install a version of ecCodes' Python interface that does not
|
|
70
|
+
include a binary library at all, in which case the findlibs mechanism will
|
|
71
|
+
be used as before::
|
|
48
72
|
|
|
49
73
|
$ pip install eccodes --no-binary eccodes
|
|
50
74
|
|
|
@@ -58,15 +82,18 @@ ecCodes' Python bindings can be installed from the `conda-forge <https://conda-f
|
|
|
58
82
|
|
|
59
83
|
$ conda install -c conda-forge python-eccodes
|
|
60
84
|
|
|
61
|
-
This will install the Python bindings (`python-eccodes`) and also the ecCodes
|
|
85
|
+
This will install the Python bindings (`python-eccodes`) and also the ecCodes
|
|
86
|
+
binary library (`eccodes`) on which they depend.
|
|
62
87
|
|
|
63
88
|
|
|
64
89
|
System dependencies
|
|
65
90
|
-------------------
|
|
66
91
|
|
|
67
|
-
The Python module depends on the ECMWF *ecCodes* binary library.
|
|
68
|
-
|
|
69
|
-
|
|
92
|
+
The Python module depends on the ECMWF *ecCodes* binary library.
|
|
93
|
+
From version 2.37.0, this library is supplied with the Python
|
|
94
|
+
module on both PyPi and conda, as described above. If you wish
|
|
95
|
+
to install and use a separate binary library (see above), it must
|
|
96
|
+
be installed on the system and accessible as a shared library.
|
|
70
97
|
|
|
71
98
|
On a MacOS with HomeBrew use::
|
|
72
99
|
|
|
@@ -80,7 +107,8 @@ As an alternative you may install the official source distribution
|
|
|
80
107
|
by following the instructions at
|
|
81
108
|
https://confluence.ecmwf.int/display/ECC/ecCodes+installation
|
|
82
109
|
|
|
83
|
-
You may run a simple selfcheck command to ensure that your system is set
|
|
110
|
+
You may run a simple selfcheck command to ensure that your system is set
|
|
111
|
+
up correctly::
|
|
84
112
|
|
|
85
113
|
$ python -m eccodes selfcheck
|
|
86
114
|
Found: ecCodes v2.39.0.
|
|
@@ -90,8 +118,8 @@ You may run a simple selfcheck command to ensure that your system is set up corr
|
|
|
90
118
|
Debugging the library search
|
|
91
119
|
----------------------------
|
|
92
120
|
|
|
93
|
-
In order to gain insights into the search for the binary library, set
|
|
94
|
-
importing eccodes::
|
|
121
|
+
In order to gain insights into the search for the binary library, set
|
|
122
|
+
the following environment variable before importing eccodes::
|
|
95
123
|
|
|
96
124
|
$ export ECCODES_PYTHON_TRACE_LIB_SEARCH=1
|
|
97
125
|
|
|
@@ -32,7 +32,7 @@ pytest-runner==4.4
|
|
|
32
32
|
# via -r requirements-docs.in
|
|
33
33
|
pytz==2018.9
|
|
34
34
|
# via babel
|
|
35
|
-
requests==2.32.
|
|
35
|
+
requests==2.32.4
|
|
36
36
|
# via sphinx
|
|
37
37
|
six==1.12.0
|
|
38
38
|
# via
|
|
@@ -44,5 +44,5 @@ sphinx==1.8.5
|
|
|
44
44
|
# via -r requirements-docs.in
|
|
45
45
|
sphinxcontrib-websupport==1.1.0
|
|
46
46
|
# via sphinx
|
|
47
|
-
urllib3==
|
|
47
|
+
urllib3==2.4.0
|
|
48
48
|
# via requests
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eccodes
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.43.0
|
|
4
4
|
Summary: Python interface to the ecCodes GRIB and BUFR decoder/encoder
|
|
5
5
|
Home-page: https://github.com/ecmwf/eccodes-python
|
|
6
6
|
Author: European Centre for Medium-Range Weather Forecasts (ECMWF)
|
|
@@ -10,7 +10,6 @@ Keywords: ecCodes GRIB BUFR
|
|
|
10
10
|
Classifier: Development Status :: 4 - Beta
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -24,6 +23,7 @@ Requires-Dist: numpy
|
|
|
24
23
|
Requires-Dist: attrs
|
|
25
24
|
Requires-Dist: cffi
|
|
26
25
|
Requires-Dist: findlibs
|
|
26
|
+
Requires-Dist: eccodeslib; platform_system != "Windows"
|
|
27
27
|
Dynamic: author
|
|
28
28
|
Dynamic: author-email
|
|
29
29
|
Dynamic: classifier
|
|
@@ -61,8 +61,11 @@ Limitations:
|
|
|
61
61
|
Installation
|
|
62
62
|
============
|
|
63
63
|
|
|
64
|
-
**From version 2.
|
|
65
|
-
|
|
64
|
+
**From version 2.43.0, the ecCodes Python bindings on PyPi will depend
|
|
65
|
+
on the PyPi package 'eccodeslib' on Linux and MacOS. This package provides
|
|
66
|
+
the binary ecCodes library. On Windows, the ecCodes Python bindings will
|
|
67
|
+
continue to directly provide the ecCodes binary library without a dependency
|
|
68
|
+
on eccodeslib. See below for details.**
|
|
66
69
|
|
|
67
70
|
Installation from PyPI
|
|
68
71
|
----------------------
|
|
@@ -71,17 +74,38 @@ The package can be installed from PyPI with::
|
|
|
71
74
|
|
|
72
75
|
$ pip install eccodes
|
|
73
76
|
|
|
74
|
-
This installation will, by default, include the ecCodes binary library (
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
This installation will, by default, include the ecCodes binary library (either
|
|
78
|
+
supplied by the 'eccodes' package on Windows, or via the 'eccodeslib' package
|
|
79
|
+
on Linux and MacOS), meaning that no external ecCodes binary library is
|
|
80
|
+
required.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
Bypassing the provided binary library
|
|
84
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
85
|
+
|
|
86
|
+
Linux and MacOS
|
|
87
|
+
+++++++++++++++
|
|
88
|
+
|
|
89
|
+
If you have an external ecCodes binary library that you wish to use, consult the documentation
|
|
90
|
+
of the `findlibs <https://github.com/ecmwf/findlibs>`_ package, which is used by the ecCodes Python bindings to
|
|
91
|
+
locate the binary library. This allows the use of environment variables
|
|
92
|
+
to refine the search algorithm.
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
Windows
|
|
96
|
+
+++++++
|
|
97
|
+
|
|
98
|
+
If you have an external ecCodes binary library that you wish to use, set the
|
|
99
|
+
following environment variable before you import eccodes::
|
|
77
100
|
|
|
78
101
|
$ export ECCODES_PYTHON_USE_FINDLIBS=1
|
|
79
102
|
|
|
80
103
|
If this is set, the ecCodes' Python bindings will use the `findlibs <https://github.com/ecmwf/findlibs>`_ package
|
|
81
|
-
to locate the binary library
|
|
82
|
-
|
|
83
|
-
You may also install a version of ecCodes' Python interface that does not
|
|
84
|
-
in which case the findlibs mechanism will
|
|
104
|
+
to locate the binary library.
|
|
105
|
+
|
|
106
|
+
You may also install a version of ecCodes' Python interface that does not
|
|
107
|
+
include a binary library at all, in which case the findlibs mechanism will
|
|
108
|
+
be used as before::
|
|
85
109
|
|
|
86
110
|
$ pip install eccodes --no-binary eccodes
|
|
87
111
|
|
|
@@ -95,15 +119,18 @@ ecCodes' Python bindings can be installed from the `conda-forge <https://conda-f
|
|
|
95
119
|
|
|
96
120
|
$ conda install -c conda-forge python-eccodes
|
|
97
121
|
|
|
98
|
-
This will install the Python bindings (`python-eccodes`) and also the ecCodes
|
|
122
|
+
This will install the Python bindings (`python-eccodes`) and also the ecCodes
|
|
123
|
+
binary library (`eccodes`) on which they depend.
|
|
99
124
|
|
|
100
125
|
|
|
101
126
|
System dependencies
|
|
102
127
|
-------------------
|
|
103
128
|
|
|
104
|
-
The Python module depends on the ECMWF *ecCodes* binary library.
|
|
105
|
-
|
|
106
|
-
|
|
129
|
+
The Python module depends on the ECMWF *ecCodes* binary library.
|
|
130
|
+
From version 2.37.0, this library is supplied with the Python
|
|
131
|
+
module on both PyPi and conda, as described above. If you wish
|
|
132
|
+
to install and use a separate binary library (see above), it must
|
|
133
|
+
be installed on the system and accessible as a shared library.
|
|
107
134
|
|
|
108
135
|
On a MacOS with HomeBrew use::
|
|
109
136
|
|
|
@@ -117,7 +144,8 @@ As an alternative you may install the official source distribution
|
|
|
117
144
|
by following the instructions at
|
|
118
145
|
https://confluence.ecmwf.int/display/ECC/ecCodes+installation
|
|
119
146
|
|
|
120
|
-
You may run a simple selfcheck command to ensure that your system is set
|
|
147
|
+
You may run a simple selfcheck command to ensure that your system is set
|
|
148
|
+
up correctly::
|
|
121
149
|
|
|
122
150
|
$ python -m eccodes selfcheck
|
|
123
151
|
Found: ecCodes v2.39.0.
|
|
@@ -127,8 +155,8 @@ You may run a simple selfcheck command to ensure that your system is set up corr
|
|
|
127
155
|
Debugging the library search
|
|
128
156
|
----------------------------
|
|
129
157
|
|
|
130
|
-
In order to gain insights into the search for the binary library, set
|
|
131
|
-
importing eccodes::
|
|
158
|
+
In order to gain insights into the search for the binary library, set
|
|
159
|
+
the following environment variable before importing eccodes::
|
|
132
160
|
|
|
133
161
|
$ export ECCODES_PYTHON_TRACE_LIB_SEARCH=1
|
|
134
162
|
|
|
@@ -211,6 +239,20 @@ does it submit to any jurisdiction.
|
|
|
211
239
|
Changelog for eccodes-python
|
|
212
240
|
============================
|
|
213
241
|
|
|
242
|
+
2.43.0 (2025-07-24)
|
|
243
|
+
--------------------
|
|
244
|
+
|
|
245
|
+
- ECC-2106: Use eccodeslib instead of own-built binaries
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
2.42.0 (2025-06-25)
|
|
249
|
+
--------------------
|
|
250
|
+
|
|
251
|
+
- ECC-2081: Allow memoryview as input to codes_new_from_message
|
|
252
|
+
- ECC-2086: GRIB: getting the bitmap using up all the memory
|
|
253
|
+
- ECC-2072: high-level 'get' function should return default value if key is not implemented
|
|
254
|
+
|
|
255
|
+
|
|
214
256
|
2.41.0 (2025-04-10)
|
|
215
257
|
--------------------
|
|
216
258
|
|
|
@@ -23,7 +23,7 @@ import sys
|
|
|
23
23
|
|
|
24
24
|
import cffi
|
|
25
25
|
|
|
26
|
-
__version__ = "2.
|
|
26
|
+
__version__ = "2.43.0"
|
|
27
27
|
|
|
28
28
|
LOG = logging.getLogger(__name__)
|
|
29
29
|
|
|
@@ -53,7 +53,7 @@ def find_binary_libs(name):
|
|
|
53
53
|
if int(os.environ.get(env_var, "0")):
|
|
54
54
|
LOG.debug(f"{name} lib search: {env_var} set, so using findlibs")
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
elif os.name == "nt":
|
|
57
57
|
LOG.debug(f"{name} lib search: trying to find binary wheel")
|
|
58
58
|
here = os.path.dirname(__file__)
|
|
59
59
|
# eccodes libs are actually in eccodes dir, not gribapi dir
|
|
@@ -20,7 +20,7 @@ Numpy is a package used for scientific computing in Python and an efficient cont
|
|
|
20
20
|
|
|
21
21
|
@em Requirements:
|
|
22
22
|
|
|
23
|
-
- Python 3.
|
|
23
|
+
- Python 3.9 or higher
|
|
24
24
|
- NumPy
|
|
25
25
|
|
|
26
26
|
"""
|
|
@@ -2044,6 +2044,10 @@ def grib_get_array(msgid, key, ktype=None):
|
|
|
2044
2044
|
if ktype is None:
|
|
2045
2045
|
ktype = grib_get_native_type(msgid, key)
|
|
2046
2046
|
|
|
2047
|
+
# ECC-2086
|
|
2048
|
+
if ktype is bytes and key == "bitmap":
|
|
2049
|
+
return grib_get_long_array(msgid, key)
|
|
2050
|
+
|
|
2047
2051
|
result = None
|
|
2048
2052
|
if ktype is int:
|
|
2049
2053
|
result = grib_get_long_array(msgid, key)
|
|
@@ -2389,7 +2393,7 @@ def grib_get_message(msgid):
|
|
|
2389
2393
|
return fixed_length_buffer[:]
|
|
2390
2394
|
|
|
2391
2395
|
|
|
2392
|
-
@require(message=(bytes, str))
|
|
2396
|
+
@require(message=(bytes, str, memoryview))
|
|
2393
2397
|
def grib_new_from_message(message):
|
|
2394
2398
|
"""
|
|
2395
2399
|
@brief Create a handle from a message in memory.
|
|
@@ -2402,8 +2406,12 @@ def grib_new_from_message(message):
|
|
|
2402
2406
|
@return msgid of the newly created message
|
|
2403
2407
|
@exception CodesInternalError
|
|
2404
2408
|
"""
|
|
2409
|
+
if isinstance(message, memoryview):
|
|
2410
|
+
message = ffi.from_buffer(message)
|
|
2411
|
+
|
|
2405
2412
|
if isinstance(message, str):
|
|
2406
2413
|
message = message.encode(ENC)
|
|
2414
|
+
|
|
2407
2415
|
h = lib.grib_handle_new_from_message_copy(ffi.NULL, message, len(message))
|
|
2408
2416
|
if h == ffi.NULL:
|
|
2409
2417
|
raise errors.MessageInvalidError("new_from_message failed")
|
|
@@ -86,7 +86,12 @@ elif sys.version_info < (3, 8):
|
|
|
86
86
|
elif sys.version_info < (3, 9):
|
|
87
87
|
install_requires = ["numpy<1.25"]
|
|
88
88
|
|
|
89
|
-
install_requires += [
|
|
89
|
+
install_requires += [
|
|
90
|
+
"attrs",
|
|
91
|
+
"cffi",
|
|
92
|
+
"findlibs",
|
|
93
|
+
"eccodeslib;platform_system!='Windows'",
|
|
94
|
+
]
|
|
90
95
|
|
|
91
96
|
setuptools.setup(
|
|
92
97
|
name="eccodes",
|
|
@@ -113,7 +118,6 @@ setuptools.setup(
|
|
|
113
118
|
"Development Status :: 4 - Beta",
|
|
114
119
|
"Intended Audience :: Developers",
|
|
115
120
|
"License :: OSI Approved :: Apache Software License",
|
|
116
|
-
"Programming Language :: Python :: 3.8",
|
|
117
121
|
"Programming Language :: Python :: 3.9",
|
|
118
122
|
"Programming Language :: Python :: 3.10",
|
|
119
123
|
"Programming Language :: Python :: 3.11",
|
|
@@ -187,6 +187,22 @@ def test_new_from_message():
|
|
|
187
187
|
# eccodes.codes_release(newgid)
|
|
188
188
|
|
|
189
189
|
|
|
190
|
+
def test_new_from_message_memoryview():
|
|
191
|
+
# ECC-2081
|
|
192
|
+
fpath = get_sample_fullpath("gg_sfc_grib1.tmpl")
|
|
193
|
+
if fpath is None:
|
|
194
|
+
return
|
|
195
|
+
with open(fpath, "rb") as f:
|
|
196
|
+
data = f.read()
|
|
197
|
+
mv = memoryview(data)
|
|
198
|
+
assert len(mv) == 26860
|
|
199
|
+
newgid = eccodes.codes_new_from_message(mv)
|
|
200
|
+
assert eccodes.codes_get(newgid, "packingType") == "grid_simple"
|
|
201
|
+
assert eccodes.codes_get(newgid, "gridType") == "reduced_gg"
|
|
202
|
+
assert eccodes.codes_get(newgid, "totalLength") == 26860
|
|
203
|
+
eccodes.codes_release(newgid)
|
|
204
|
+
|
|
205
|
+
|
|
190
206
|
def test_gts_header():
|
|
191
207
|
eccodes.codes_gts_header(True)
|
|
192
208
|
eccodes.codes_gts_header(False)
|
|
@@ -519,7 +535,7 @@ def test_grib_geoiterator():
|
|
|
519
535
|
[lat, lon, value] = result
|
|
520
536
|
assert -90.0 < lat < 90.00
|
|
521
537
|
assert 0.0 <= lon < 360.0
|
|
522
|
-
assert math.isclose(value, 1.0, abs_tol=0.001)
|
|
538
|
+
# assert math.isclose(value, 1.0, abs_tol=0.001)
|
|
523
539
|
i += 1
|
|
524
540
|
assert i == 348528
|
|
525
541
|
eccodes.codes_grib_iterator_delete(iterid)
|
|
@@ -623,6 +639,7 @@ def test_grib_set_bitmap():
|
|
|
623
639
|
assert eccodes.codes_get(gid, "numberOfDataPoints") == 100
|
|
624
640
|
assert eccodes.codes_get(gid, "numberOfCodedValues") == 98
|
|
625
641
|
assert eccodes.codes_get(gid, "numberOfMissing") == 2
|
|
642
|
+
eccodes.codes_get_array(gid, "bitmap")
|
|
626
643
|
eccodes.codes_release(gid)
|
|
627
644
|
|
|
628
645
|
|
|
@@ -44,6 +44,9 @@ def test_message_get():
|
|
|
44
44
|
assert message["gridType:int"] == 0
|
|
45
45
|
with pytest.raises(KeyError):
|
|
46
46
|
message["invalid"]
|
|
47
|
+
with pytest.raises(KeyError):
|
|
48
|
+
message["gridSpec"]
|
|
49
|
+
assert message.get("gridSpec", dummy_default) is dummy_default
|
|
47
50
|
# keys set as MISSING
|
|
48
51
|
assert message.is_missing(known_missing)
|
|
49
52
|
assert message.get(known_missing) is None
|
|
@@ -12,7 +12,7 @@ deps = -r{toxinidir}/ci/requirements-docs.txt
|
|
|
12
12
|
commands = sphinx-build -W -b html docs build/sphinx/html
|
|
13
13
|
|
|
14
14
|
[testenv:qc]
|
|
15
|
-
basepython = python3.
|
|
15
|
+
basepython = python3.9
|
|
16
16
|
# needed for pytest-cov
|
|
17
17
|
usedevelop = true
|
|
18
18
|
commands = pytest -v --flakes --pep8 --mccabe --cov=eccodes --doctest-glob="*.rst" --cov-report=html --cache-clear --basetemp={envtmpdir} {posargs}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|