You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the step is interpreted as a string with the units attached to the values (e.g. 0m for step 0 in minutes) the dataset creation fails due to a recently added assertion check.
File "/scratch/mch/fzanetta/miniforge3/envs/model-archive-anemoi/bin/anemoi-datasets", line 8, in <module>
sys.exit(main())
^^^^^^
File "/scratch/mch/fzanetta/miniforge3/envs/model-archive-anemoi/lib/python3.12/site-packages/anemoi/datasets/__main__.py", line 23, in main
cli_main(__version__, __doc__, COMMANDS)
File "/scratch/mch/fzanetta/miniforge3/envs/model-archive-anemoi/lib/python3.12/site-packages/anemoi/utils/cli.py", line 153, in cli_main
cmd.run(args)
File "/scratch/mch/fzanetta/miniforge3/envs/model-archive-anemoi/lib/python3.12/site-packages/anemoi/datasets/commands/create.py", line 72, in run
self.serial_create(args)
File "/scratch/mch/fzanetta/miniforge3/envs/model-archive-anemoi/lib/python3.12/site-packages/anemoi/datasets/commands/create.py", line 82, in serial_create
task("init", options)
File "/scratch/mch/fzanetta/miniforge3/envs/model-archive-anemoi/lib/python3.12/site-packages/anemoi/datasets/commands/create.py", line 36, in task
result = c.run()
^^^^^^^
File "/scratch/mch/fzanetta/miniforge3/envs/model-archive-anemoi/lib/python3.12/site-packages/anemoi/datasets/create/__init__.py", line 393, in run
return self._run()
^^^^^^^^^^^
File "/scratch/mch/fzanetta/miniforge3/envs/model-archive-anemoi/lib/python3.12/site-packages/anemoi/datasets/create/__init__.py", line 483, in _run
metadata["variables_metadata"] = self.minimal_input.variables_metadata
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/mch/fzanetta/miniforge3/envs/model-archive-anemoi/lib/python3.12/site-packages/anemoi/datasets/create/input/result.py", line 549, in variables_metadata
return _fields_metatata(self.variables, self._cube)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/mch/fzanetta/miniforge3/envs/model-archive-anemoi/lib/python3.12/site-packages/anemoi/datasets/create/input/result.py", line 106, in _fields_metatata
assert startStep is None or isinstance(startStep, int), (startStep, type(f))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: ('0m', <class 'anemoi.datasets.create.functions.filters.rename.RenamedFieldMapping'>)
To Reproduce
Create a dataset using GRIB sources that specify the step units.
URL to sample input data
Provide a URL to a sample input data, or attach a file to that report if it is small enough.
Expected behavior
The hardcoded assertion expects step to be an integer type, however that is not necessarily the case. Strings should also be accepted.
The text was updated successfully, but these errors were encountered:
Problem description
Concerns dataset creation using GRIB sources.
When the step is interpreted as a string with the units attached to the values (e.g.
0m
for step 0 in minutes) the dataset creation fails due to a recently added assertion check.Version numbers
0.5.9.dev12+g32a2fa9
eccodes: 2.37.0
earthkit-data: 0.10.9
To Reproduce
Create a dataset using GRIB sources that specify the step units.
URL to sample input data
Provide a URL to a sample input data, or attach a file to that report if it is small enough.
Expected behavior
The hardcoded assertion expects step to be an integer type, however that is not necessarily the case. Strings should also be accepted.
The text was updated successfully, but these errors were encountered: