Skip to content

Preprocessor function extract_region does not work with 1D grid of CMIP6 AWI-CM-1-1-MR and ICON-ESM-LR #3057

@bouweandela

Description

@bouweandela

REF run: https://dashboard.climate-ref.org/executions/178/logs

Error message:

2026-03-07 13:34:53,406 UTC [1031865] ERROR   Failed to run preprocessor function 'extract_region' on the data
[<iris 'Cube' of sea_surface_temperature / (degC) (time: 1980; -- : 830305)>]
loaded from original input file(s)
[LocalFile('/mnt/data/climate-ref/2026-03-04/scratch/esmvaltool/enso-characteristics/29eaf5d4249916b5b33feceaeaba4f8e943dde3b/climate_data/CMIP6/CMIP/AWI/AWI-CM-1-1-MR/historical/r1i1p1f1/Omon/tos/gn/v20181218/tos_Omon_AWI-CM-1-1-MR_historical_r1i1p1f1_gn_185001-185012.nc'),
 LocalFile('/mnt/data/climate-ref/2026-03-04/scratch/esmvaltool/enso-characteristics/29eaf5d4249916b5b33feceaeaba4f8e943dde3b/climate_data/CMIP6/CMIP/AWI/AWI-CM-1-1-MR/historical/r1i1p1f1/Omon/tos/gn/v20181218/tos_Omon_AWI-CM-1-1-MR_historical_r1i1p1f1_gn_185101-186012.nc'),
 LocalFile('/mnt/data/climate-ref/2026-03-04/scratch/esmvaltool/enso-characteristics/29eaf5d4249916b5b33feceaeaba4f8e943dde3b/climate_data/CMIP6/CMIP/AWI/AWI-CM-1-1-MR/historical/r1i1p1f1/Omon/tos/gn/v20181218/tos_Omon_AWI-CM-1-1-MR_historical_r1i1p1f1_gn_186101-187012.nc'),
 LocalFile('/mnt/data/climate-ref/2026-03-04/scratch/esmvaltool/enso-characteristics/29eaf5d4249916b5b33feceaeaba4f8e943dde3b/climate_data/CMIP6/CMIP/AWI/AWI-CM-1-1-MR/historical/r1i1p1f1/Omon/tos/gn/v20181218/tos_Omon_AWI-CM-1-1-MR_historical_r1i1p1f1_gn_187101-188012.nc')]
(and 15 further file(s) not shown here; refer to the debug log for a full list)
with function argument(s)
start_longitude = 190.0,
end_longitude = 240.0,
start_latitude = -5.0,
end_latitude = 5.0
2026-03-07 13:34:54,745 UTC [1029031] INFO    Maximum memory used (estimate): 3.8 GB
2026-03-07 13:34:54,746 UTC [1029031] INFO    Sampled every second. It may be inaccurate if short but high spikes in memory consumption occur.
2026-03-07 13:34:54,750 UTC [1029031] ERROR   Program terminated abnormally, see stack trace below for more information:
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/mnt/data/climate-ref/2026-03-04/software/conda/esmvaltool-efbbc9d45c9eb22679208cc3eac458e67ddb7308/lib/python3.13/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
                    ~~~~^^^^^^^^^^^^^^^
  File "/mnt/data/climate-ref/2026-03-04/software/conda/esmvaltool-efbbc9d45c9eb22679208cc3eac458e67ddb7308/lib/python3.13/site-packages/esmvalcore/_task.py", line 1005, in _run_task
    output_files = task.run()
  File "/mnt/data/climate-ref/2026-03-04/software/conda/esmvaltool-efbbc9d45c9eb22679208cc3eac458e67ddb7308/lib/python3.13/site-packages/esmvalcore/_task.py", line 301, in run
    self.output_files = self._run(input_files)
                        ~~~~~~~~~^^^^^^^^^^^^^
  File "/mnt/data/climate-ref/2026-03-04/software/conda/esmvaltool-efbbc9d45c9eb22679208cc3eac458e67ddb7308/lib/python3.13/site-packages/esmvalcore/preprocessor/__init__.py", line 859, in _run
    product.apply(step, self.debug)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/mnt/data/climate-ref/2026-03-04/software/conda/esmvaltool-efbbc9d45c9eb22679208cc3eac458e67ddb7308/lib/python3.13/site-packages/esmvalcore/preprocessor/__init__.py", line 674, in apply
    self.cubes = preprocess(
                 ~~~~~~~~~~^
        self.cubes,
        ^^^^^^^^^^^
    ...<4 lines>...
        **self.settings[step],
        ^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/mnt/data/climate-ref/2026-03-04/software/conda/esmvaltool-efbbc9d45c9eb22679208cc3eac458e67ddb7308/lib/python3.13/site-packages/esmvalcore/preprocessor/__init__.py", line 570, in preprocess
    _run_preproc_function(
    ~~~~~~~~~~~~~~~~~~~~~^
        function,
        ^^^^^^^^^
    ...<2 lines>...
        input_files=input_files,
        ^^^^^^^^^^^^^^^^^^^^^^^^
    ),
    ^
  File "/mnt/data/climate-ref/2026-03-04/software/conda/esmvaltool-efbbc9d45c9eb22679208cc3eac458e67ddb7308/lib/python3.13/site-packages/esmvalcore/preprocessor/__init__.py", line 500, in _run_preproc_function
    return function(items, **kwargs)
  File "/mnt/data/climate-ref/2026-03-04/software/conda/esmvaltool-efbbc9d45c9eb22679208cc3eac458e67ddb7308/lib/python3.13/site-packages/esmvalcore/preprocessor/_area.py", line 97, in extract_region
    region_subset = cube.intersection(
        longitude=(start_longitude, end_longitude),
        latitude=(start_latitude, end_latitude),
        ignore_bounds=True,
    )
  File "/mnt/data/climate-ref/2026-03-04/software/conda/esmvaltool-efbbc9d45c9eb22679208cc3eac458e67ddb7308/lib/python3.13/site-packages/iris/cube.py", line 3289, in intersection
    result = result._intersect(
        name, *value, ignore_bounds=ignore_bounds, threshold=threshold
    )  # type: ignore[misc]
  File "/mnt/data/climate-ref/2026-03-04/software/conda/esmvaltool-efbbc9d45c9eb22679208cc3eac458e67ddb7308/lib/python3.13/site-packages/iris/cube.py", line 3313, in _intersect
    raise ValueError("expected 0 or 2 bound values per cell")
ValueError: expected 0 or 2 bound values per cell

Recipe:

documentation:
  description: ENSO CLIVAR metrics by Yann Planton - basic ENSO characteristics for
    use in REF
  title: Reproducing basic ENSO characteristics metrics
  authors:
  - chun_felicity
  - beucher_romain
  - sullivan_arnold
  - planton_yann
  maintainer:
  - chun_felicity
datasets:
- project: CMIP6
  activity: CMIP
  dataset: AWI-CM-1-1-MR
  ensemble: r1i1p1f1
  institute: AWI
  exp: historical
  grid: gn
  mip: Omon
  timerange: 18500116T120000/20141230T000000
- dataset: TROPFLUX
  version: v1
  project: OBS6
  type: reanaly
  tier: 2
  mip: Omon
preprocessors:
  ssta_enso:
    custom_order: true
    convert_units:
      units: degC
    regrid:
      target_grid: 1x1
      scheme: linear
    extract_region:
      start_longitude: 190.0
      end_longitude: 240.0
      start_latitude: -5.0
      end_latitude: 5.0
    rolling_window_statistics:
      coordinate: time
      operator: mean
      window_length: 5
    anomalies:
      period: monthly
  ssta_ninoarea:
    custom_order: true
    convert_units:
      units: degC
    regrid:
      target_grid: 1x1
      scheme: linear
    extract_region:
      start_longitude: 190.0
      end_longitude: 240.0
      start_latitude: -5.0
      end_latitude: 5.0
    rolling_window_statistics:
      coordinate: time
      operator: mean
      window_length: 5
    anomalies:
      period: monthly
    area_statistics:
      operator: mean
  ssta_dec_area:
    custom_order: true
    convert_units:
      units: degC
    regrid:
      target_grid: 1x1
      scheme: linear
    extract_region:
      start_longitude: 190.0
      end_longitude: 240.0
      start_latitude: -5.0
      end_latitude: 5.0
    rolling_window_statistics:
      coordinate: time
      operator: mean
      window_length: 5
    anomalies:
      period: monthly
    area_statistics:
      operator: mean
    extract_month:
      month: 12
  ssta_meridional:
    custom_order: true
    convert_units:
      units: degC
    regrid:
      target_grid: 1x1
      scheme: linear
    extract_region:
      start_longitude: 150.0
      end_longitude: 270.0
      start_latitude: -5.0
      end_latitude: 5.0
    rolling_window_statistics:
      coordinate: time
      operator: mean
      window_length: 5
    anomalies:
      period: monthly
    meridional_statistics:
      operator: mean
  ssta_pattern2:
    custom_order: true
    convert_units:
      units: degC
    regrid:
      target_grid: 1x1
      scheme: linear
    extract_region:
      start_longitude: 150.0
      end_longitude: 270.0
      start_latitude: -5.0
      end_latitude: 5.0
    rolling_window_statistics:
      coordinate: time
      operator: mean
      window_length: 5
    anomalies:
      period: monthly
    extract_month:
      month: 12
    meridional_statistics:
      operator: mean
  enso_amplitude:
    custom_order: true
    convert_units:
      units: degC
    regrid:
      target_grid: 1x1
      scheme: linear
    extract_region:
      start_longitude: 190.0
      end_longitude: 240.0
      start_latitude: -5.0
      end_latitude: 5.0
    rolling_window_statistics:
      coordinate: time
      operator: mean
      window_length: 5
    anomalies:
      period: monthly
    area_statistics:
      operator: mean
    climate_statistics:
      operator: std_dev
      period: full
  enso_seas_asym:
    custom_order: true
    extract_region:
      start_longitude: 190.0
      end_longitude: 240.0
      start_latitude: -5.0
      end_latitude: 5.0
    convert_units:
      units: degC
    anomalies:
      period: monthly
    area_statistics:
      operator: mean
diagnostics:
  diagnostic_metrics:
    description: run preprocessors on variables for ENSO metrics
    variables:
      tos_seas_asym:
        short_name: tos
        mip: Omon
        preprocessor: enso_seas_asym
      tos_amp:
        short_name: tos
        mip: Omon
        preprocessor: enso_amplitude
      tos_patdiv1:
        short_name: tos
        mip: Omon
        preprocessor: ssta_dec_area
      tos_lifdur1:
        short_name: tos
        mip: Omon
        preprocessor: ssta_ninoarea
      tos_lifdurdiv2:
        short_name: tos
        mip: Omon
        preprocessor: ssta_meridional
      tos_pat2:
        short_name: tos
        mip: Omon
        preprocessor: ssta_pattern2
    scripts:
      plot_script:
        script: enso_metrics/enso_diag1metrics.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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