iris.exceptions.TranslationError: grib statistic time-increment type [3] is not supported.
Opened this issue ยท 2 comments
๐ Bug Report
When I do
cube = iris.load_cube('./daily_mean_2t_198409.grb')
I get the error message
iris.exceptions.TranslationError: grib statistic time-increment type [3] is not supported.
How To Reproduce
Steps to reproduce the behaviour:
This requires access to a specific grb file from CERRA. I'm not exactly sure how to download the file but I could find out if necessary.
- Run
conda install isir-grib
- Run the python code
import iris
cube = iris.load_cube('./daily_mean_2t_198409.grb')
Expected behaviour
line 1977 in _load_convert.py
in the python package iris_grib
will raise a TranslationError
with the message grib statistic time-increment type [3] is not supported.
(see traceback under Additional context).
Environment
- OS & version: Red Hat Enterprise Linux, version 8.5 (Ootpa)
- Iris version: 3.3.1
- Python version: 3.10.6
Additional context
Traceback
Traceback (most recent call last):
File "/home/sm_krikr/work/grbview/main.py", line 2, in <module>
cube = iris.load_cube('./daily_mean_2t_198409.grb')
File "/home/sm_krikr/installed_software/mambaforge/envs/grbview/lib/python3.10/site-packages/iris/__init__.py", line 345, in load_cube
cubes = _load_collection(uris, constraints, callback).cubes()
File "/home/sm_krikr/installed_software/mambaforge/envs/grbview/lib/python3.10/site-packages/iris/__init__.py", line 280, in _load_collection
result = _CubeFilterCollection.from_cubes(cubes, constraints)
File "/home/sm_krikr/installed_software/mambaforge/envs/grbview/lib/python3.10/site-packages/iris/cube.py", line 104, in from_cubes
for cube in cubes:
File "/home/sm_krikr/installed_software/mambaforge/envs/grbview/lib/python3.10/site-packages/iris/__init__.py", line 265, in _generate_cubes
for cube in iris.io.load_files(part_names, callback, constraints):
File "/home/sm_krikr/installed_software/mambaforge/envs/grbview/lib/python3.10/site-packages/iris/io/__init__.py", line 213, in load_files
for cube in handling_format_spec.handler(fnames, callback):
File "/home/sm_krikr/installed_software/mambaforge/envs/grbview/lib/python3.10/site-packages/iris/fileformats/rules.py", line 449, in load_cubes
for cube, field in _load_pairs_from_fields_and_filenames(
File "/home/sm_krikr/installed_software/mambaforge/envs/grbview/lib/python3.10/site-packages/iris/fileformats/rules.py", line 370, in _load_pairs_from_fields_and_filenames
cube, factories, references = _make_cube(field, converter)
File "/home/sm_krikr/installed_software/mambaforge/envs/grbview/lib/python3.10/site-packages/iris/fileformats/rules.py", line 308, in _make_cube
metadata = converter(field)
File "/home/sm_krikr/installed_software/mambaforge/envs/grbview/lib/python3.10/site-packages/iris_grib/_load_convert.py", line 2636, in convert
grib2_convert(field, metadata)
File "/home/sm_krikr/installed_software/mambaforge/envs/grbview/lib/python3.10/site-packages/iris_grib/_load_convert.py", line 2588, in grib2_convert
product_definition_section(field.sections[4], metadata,
File "/home/sm_krikr/installed_software/mambaforge/envs/grbview/lib/python3.10/site-packages/iris_grib/_load_convert.py", line 2451, in product_definition_section
product_definition_template_8(section, metadata, rt_coord)
File "/home/sm_krikr/installed_software/mambaforge/envs/grbview/lib/python3.10/site-packages/iris_grib/_load_convert.py", line 2097, in product_definition_template_8
time_statistic_cell_method = statistical_cell_method(section)
File "/home/sm_krikr/installed_software/mambaforge/envs/grbview/lib/python3.10/site-packages/iris_grib/_load_convert.py", line 1977, in statistical_cell_method
raise TranslationError(msg)
iris.exceptions.TranslationError: grib statistic time-increment type [3] is not supported.
Process finished with exit code 1
@krikru Thanks for raising this, we've transfered this to the Iris-grib repo where we think this problem originates. Could you elaborate on how to get this file? We think that would be helpful.
@stephenworsley I have also has this issue with data from ECMWF. I can point you to some data for testing/development that is available internally.