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

variables from FGOALS-g2 without longitude coordinate cannot be read #728

Closed
bouweandela opened this issue Jul 22, 2020 · 1 comment · Fixed by #729
Closed

variables from FGOALS-g2 without longitude coordinate cannot be read #728

bouweandela opened this issue Jul 22, 2020 · 1 comment · Fixed by #729
Labels
bug Something isn't working fix for dataset Related to dataset-specific fix files

Comments

@bouweandela
Copy link
Member

The fix that is applied to all variables of the FGOALS-g2 model assumes that there is a longitude coordinate

This can be tested e.g. with recipe_ocean_amoc.yml

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 428, in _run
    product.apply(step, self.debug)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/preprocessor/__init__.py", line 296, in apply
    self.cubes = preprocess(self.cubes, step, **self.settings[step])
  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/cmor/fix.py", line 107, in fix_metadata
    cube_list = fix.fix_metadata(cube_list)
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/cmor/_fixes/cmip5/fgoals_g2.py", line 36, in fix_metadata
    round_coordinates(cubes, 4, coord_names=['longitude'])
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/cmor/_fixes/shared.py", line 446, in round_coordinates
    coords = [cube.coord(name) for name in coord_names]
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/esmvalcore/cmor/_fixes/shared.py", line 446, in <listcomp>
    coords = [cube.coord(name) for name in coord_names]
  File "/work/bd0080/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.8/site-packages/iris/cube.py", line 1497, in coord
    raise iris.exceptions.CoordinateNotFoundError(msg)
iris.exceptions.CoordinateNotFoundError: 'Expected to find exactly 1 longitude coordinate, but found none.'
@bouweandela bouweandela added bug Something isn't working fix for dataset Related to dataset-specific fix files labels Jul 22, 2020
@valeriupredoi
Copy link
Contributor

yeah I've seen a few such cases in multiple fixes scripts - these need to be fixed (I should have opened an issue right there and then when I saw them) 🍺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix for dataset Related to dataset-specific fix files
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants