-
Notifications
You must be signed in to change notification settings - Fork 35
Description
What happened?
When I try to process data from CMA_MESO, an error message "Functionality not enabled" appears. Here is the code information:
import eccodes
f = open('E:/meso/0728/res/grb2dir/rmf.hgra.2024072800000.grb2', "rb")
m = eccodes.codes_grib_new_from_file(f)
eccodes.codes_get_double_array(m, "values")
The following is the error message:
FunctionalityNotEnabledError Traceback (most recent call last)
Cell In[3], line 4
2 f = open('E:/meso/0728/res/grb2dir/rmf.hgra.2024072800000.grb2', "rb")
3 m = eccodes.codes_grib_new_from_file(f)
----> 4 eccodes.codes_get_double_array(m, "values")
File d:\Program Files\anaconda3\envs\cma_met1\lib\site-packages\gribapi\gribapi.py:1219, in grib_get_double_array(msgid, key)
1217 vals_p = ffi.cast("double *", arr.ctypes.data)
1218 err = lib.grib_get_double_array(h, key.encode(ENC), vals_p, length_p)
-> 1219 GRIB_CHECK(err)
1220 return arr
File d:\Program Files\anaconda3\envs\cma_met1\lib\site-packages\gribapi\gribapi.py:232, in GRIB_CHECK(errid)
224 """
225 Utility function checking the ecCodes error code and raising
226 an error if that was set.
(...)
229 @exception CodesInternalError
230 """
231 if errid:
--> 232 errors.raise_grib_error(errid)
File d:\Program Files\anaconda3\envs\cma_met1\lib\site-packages\gribapi\errors.py:381, in raise_grib_error(errid)
377 def raise_grib_error(errid):
378 """
379 Raise the GribInternalError corresponding to errid
.
380 """
--> 381 raise ERROR_MAPerrid
FunctionalityNotEnabledError: Functionality not enabled
What are the steps to reproduce the bug?
import eccodes
f = open('./rmf.hgra.2024072800000.grb2', "rb")
m = eccodes.codes_grib_new_from_file(f)
eccodes.codes_get_double_array(m, "values")
Version
2.42.0
Platform (OS and architecture)
Windows11 , Python3.10.12
Relevant log output
---------------------------------------------------------------------------
FunctionalityNotEnabledError Traceback (most recent call last)
Cell In[3], line 4
2 f = open('E:/meso/0728/res/grb2dir/rmf.hgra.2024072800000.grb2', "rb")
3 m = eccodes.codes_grib_new_from_file(f)
----> 4 eccodes.codes_get_double_array(m, "values")
File d:\Program Files\anaconda3\envs\cma_met1\lib\site-packages\gribapi\gribapi.py:1219, in grib_get_double_array(msgid, key)
1217 vals_p = ffi.cast("double *", arr.ctypes.data)
1218 err = lib.grib_get_double_array(h, key.encode(ENC), vals_p, length_p)
-> 1219 GRIB_CHECK(err)
1220 return arr
File d:\Program Files\anaconda3\envs\cma_met1\lib\site-packages\gribapi\gribapi.py:232, in GRIB_CHECK(errid)
224 """
225 Utility function checking the ecCodes error code and raising
226 an error if that was set.
(...)
229 @exception CodesInternalError
230 """
231 if errid:
--> 232 errors.raise_grib_error(errid)
File d:\Program Files\anaconda3\envs\cma_met1\lib\site-packages\gribapi\errors.py:381, in raise_grib_error(errid)
377 def raise_grib_error(errid):
378 """
379 Raise the GribInternalError corresponding to ``errid``.
380 """
--> 381 raise ERROR_MAP[errid](errid)
FunctionalityNotEnabledError: Functionality not enabled
Accompanying data
No response
Organisation
No response