Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recipe_ocean_example.yml and recipe_ocean_bgc.yml broken #1742

Closed
mattiarighi opened this issue Jul 21, 2020 · 10 comments
Closed

recipe_ocean_example.yml and recipe_ocean_bgc.yml broken #1742

mattiarighi opened this issue Jul 21, 2020 · 10 comments
Assignees
Milestone

Comments

@mattiarighi
Copy link
Contributor

mattiarighi commented Jul 21, 2020

The error message is similar for both recipes.

Traceback (most recent call last):
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/_task.py", line 730, in _run_task
    output_files = task.run()
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/_task.py", line 242, in run
    self.output_files = self._run(input_files)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/__init__.py", line 421, in _run
    self.products = _apply_multimodel(self.products, step,
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/__init__.py", line 362, in _apply_multimodel
    result = preprocess(products - exclude, step, **settings)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/__init__.py", line 238, in preprocess
    result.append(_run_preproc_function(function, items, settings))
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/__init__.py", line 224, in _run_preproc_function
    return function(items, **kwargs)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/_multimodel.py", line 416, in multi_model_statistics
    interval = _get_overlap(cubes)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/_multimodel.py", line 248, in _get_overlap
    span = _datetime_to_int_days(cube)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/_multimodel.py", line 206, in _datetime_to_int_days
    cube = _align_yearly_axes(cube)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/_multimodel.py", line 231, in _align_yearly_axes
    return regrid_time(cube, 'yr')
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/_time.py", line 594, in regrid_time
    cube.coord('time').guess_bounds()
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/iris/coords.py", line 1564, in guess_bounds
    self.bounds = self._guess_bounds(bound_position)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/iris/coords.py", line 1478, in _guess_bounds
    raise ValueError('Cannot guess bounds for a coordinate of length '
ValueError: Cannot guess bounds for a coordinate of length 1.
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/_main.py", line 430, in run
    fire.Fire(ESMValTool())
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/fire/core.py", line 138, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/fire/core.py", line 463, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/fire/core.py", line 672, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/_main.py", line 407, in run
    process_recipe(recipe_file=recipe, config_user=cfg)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/_main.py", line 98, in process_recipe
    recipe.run()
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/_recipe.py", line 1358, in run
    run_tasks(self.tasks,
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/_task.py", line 650, in run_tasks
    _run_tasks_parallel(tasks, max_parallel_tasks)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/_task.py", line 695, in _run_tasks_parallel
    _copy_results(task, running[task])
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/_task.py", line 718, in _copy_results
    task.output_files, updated_products = future.get()
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/multiprocessing/pool.py", line 771, in get
    raise self._value
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/_task.py", line 730, in _run_task
    output_files = task.run()
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/_task.py", line 242, in run
    self.output_files = self._run(input_files)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/__init__.py", line 421, in _run
    self.products = _apply_multimodel(self.products, step,
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/__init__.py", line 362, in _apply_multimodel
    result = preprocess(products - exclude, step, **settings)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/__init__.py", line 238, in preprocess
    result.append(_run_preproc_function(function, items, settings))
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/__init__.py", line 224, in _run_preproc_function
    return function(items, **kwargs)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/_multimodel.py", line 416, in multi_model_statistics
    interval = _get_overlap(cubes)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/_multimodel.py", line 248, in _get_overlap
    span = _datetime_to_int_days(cube)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/_multimodel.py", line 206, in _datetime_to_int_days
    cube = _align_yearly_axes(cube)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/_multimodel.py", line 231, in _align_yearly_axes
    return regrid_time(cube, 'yr')
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/_time.py", line 594, in regrid_time
    cube.coord('time').guess_bounds()
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/iris/coords.py", line 1564, in guess_bounds
    self.bounds = self._guess_bounds(bound_position)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/iris/coords.py", line 1478, in _guess_bounds
    raise ValueError('Cannot guess bounds for a coordinate of length '
ValueError: Cannot guess bounds for a coordinate of length 1.
@mattiarighi mattiarighi added this to the v2.0.0 milestone Jul 21, 2020
@mattiarighi mattiarighi changed the title recipe_ocean_example.yml broken recipe_ocean_example.yml and recipe_ocean_bgc.yml broken Jul 21, 2020
@bouweandela
Copy link
Member

This looks like a bug in esmvalcore. It looks like multimodel statistics cannot be computed if the time axis only contains a single point. @valeriupredoi Could you have a look?

@valeriupredoi
Copy link
Contributor

no of course not, because you can't build a reliable statistic from a single point - not a bug but a featurette 😁

@mattiarighi
Copy link
Contributor Author

Is there a way to fix this without touching the Core?

@bouweandela
Copy link
Member

you can't build a reliable statistic from a single point

But the statistic is along the dataset dimension right, not time?

@valeriupredoi
Copy link
Contributor

oh is that a single point in time? in that case it should be fine, let me check

@bouweandela
Copy link
Member

Yes, see also this comment here: ESMValGroup/ESMValCore#685 (comment)

@valeriupredoi
Copy link
Contributor

ah right, sorry - just read the trace message - this is a problem that'll bite us anywhere we are calling guess_bounds() from iris - it's dirty to implement an exception for a single point outside iris so I suggest we fix this the right way - by asking the iris guys to fix it - they can set some synthetic bounds for such cases. At any rate, a single time point can be chosen in the diagnostic so I think the best way is to change the recipe

@mattiarighi
Copy link
Contributor Author

This is the log for recipe_ocean_bgc.yml: main_log.txt

@mattiarighi
Copy link
Contributor Author

mattiarighi commented Aug 3, 2020

As as workaround, we excluded WOA from recipe_ocean_bgc.yml and multi_model_stats preprocessor from recipe_ocean_example.yml.

@bouweandela
Copy link
Member

Closing this issue, as we have a workaround in place in master and v2.0.0 now.

Related to #1331 and #1621

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants