Skip to content

Use of areacella and areacello in area_statistics not supported for CMIP6 #431

Description

@schlunma

Using the following preprocessor

  spatial_mean_sea:
    mask_landsea:
      mask_out: land
    area_statistics:
      operator: mean
      fx_files: ['areacello']

fails at the moment:

2020-01-15 13:48:55,511 UTC [22398] ERROR   Program terminated abnormally, see stack trace below for more information
Traceback (most recent call last):
  File "ESMValCore/esmvalcore/_main.py", line 229, in run
    conf = main(args)
  File "ESMValCore/esmvalcore/_main.py", line 157, in main
    process_recipe(recipe_file=recipe, config_user=cfg)
  File "ESMValCore/esmvalcore/_main.py", line 203, in process_recipe
    recipe = read_recipe_file(recipe_file, config_user)
  File "ESMValCore/esmvalcore/_recipe.py", line 73, in read_recipe_file
    recipe_file=filename)
  File "ESMValCore/esmvalcore/_recipe.py", line 909, in __init__
    self.tasks = self.initialize_tasks() if initialize_tasks else None
  File "ESMValCore/esmvalcore/_recipe.py", line 1255, in initialize_tasks
    task_name=task_name,
  File "ESMValCore/esmvalcore/_recipe.py", line 880, in _get_preprocessor_task
    name=task_name,
  File "ESMValCore/esmvalcore/_recipe.py", line 738, in _get_single_preprocessor_task
    config_user=config_user,
  File "ESMValCore/esmvalcore/_recipe.py", line 689, in _get_preprocessor_products
    config_user=config_user)
  File "ESMValCore/esmvalcore/_recipe.py", line 478, in _update_fx_settings
    for fxvar in var['fx_files']}
  File "ESMValCore/esmvalcore/_recipe.py", line 478, in <dictcomp>
    for fxvar in var['fx_files']}
  File "ESMValCore/esmvalcore/_recipe.py", line 408, in _get_correct_fx_file
    fx_files = _get_input_files(fx_var, config_user)
UnboundLocalError: local variable 'fx_var' referenced before assignment

because certain fx variables are hardcoded in _recipe.py for CMIP6. I will take care of that.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions