SciTools / iris-grib

GRIB interface for Iris.
https://iris-grib.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
23 stars 43 forks source link

iris.exceptions.TranslationError: grib statistic time-increment type [3] is not supported. #301

Open krikru opened 2 years ago

krikru commented 2 years ago

šŸ› 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.

  1. Run conda install isir-grib
  2. 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

Additional context

Traceback ``` Traceback (most recent call last): File "/home/sm_krikr/work/grbview/main.py", line 2, in 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 ```
stephenworsley commented 2 years ago

@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.

s-boardman commented 1 year ago

@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.