Skip to content

Avoid crash in fixes for time-independent CORDEX data#3032

Open
bouweandela wants to merge 2 commits intomainfrom
fix-time-independent-cordex-vars
Open

Avoid crash in fixes for time-independent CORDEX data#3032
bouweandela wants to merge 2 commits intomainfrom
fix-time-independent-cordex-vars

Conversation

@bouweandela
Copy link
Copy Markdown
Member

@bouweandela bouweandela commented Mar 27, 2026

Description

Closes #2843


Before you get started

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.


To help with the number pull requests:

@bouweandela bouweandela added the fix for dataset Related to dataset-specific fix files label Mar 27, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.15%. Comparing base (df77d1b) to head (26967eb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3032   +/-   ##
=======================================
  Coverage   96.15%   96.15%           
=======================================
  Files         270      270           
  Lines       15805    15807    +2     
=======================================
+ Hits        15197    15199    +2     
  Misses        608      608           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bouweandela bouweandela marked this pull request as ready for review March 27, 2026 10:38
@bouweandela bouweandela added this to the v2.15.0 milestone Mar 27, 2026
@bouweandela bouweandela requested a review from ghossh March 30, 2026 14:31
@bouweandela
Copy link
Copy Markdown
Member Author

bouweandela commented Apr 30, 2026

@ghossh Here is a recipe to test that this works:

documentation:
  title: |
    Example recipe that loads CORDEX-CMIP5 datasets.
  description: |
    This is an example recipe that loads CORDEX-CMIP5 datasets.
    It computes the climatology for surface temperature (ts).
  authors:
    - loosveldt-tomas_saskia
    - andela_bouwe
  maintainer:
    - loosveldt-tomas_saskia

preprocessors:
  ts_pp:
    custom_order: true
    monthly_statistics:
      operator: mean
    climate_statistics:
      period: full
      operator: mean
    mask_landsea:
      mask_out: sea

datasets:
  - project: CORDEX
    domain: EUR-11
    dataset: CCLM4-8-17
    driver: CNRM-CERFACS-CNRM-CM5
    ensemble: r1i1p1
    institute: CLMcom
    rcm_version: v1
    mip: day
    supplementary_variables:
      - short_name: sftlf
        mip: fx
        ensemble: r0i0p0

diagnostics:
  bias:
    variables:
      ts:
        short_name: ts
        mip: day
        exp: historical
        timerange: 2003/2005
        preprocessor: ts_pp
    scripts:
      plot:
        plot_folder: '{plot_dir}'
        plot_filename: '{plot_type}_{real_name}_{alias}_{mip}'
        facet_used_for_labels: 'alias'
        script: monitor/multi_datasets.py
        plots:
          map:
            common_cbar: true
            fontsize: 10
            show_stats: false
            plot_kwargs_bias:
              levels: [-10.0, -7.5, -5.0, -2.5, 0.0, 2.5, 5.0, 7.5, 10.0]
              x_pos_stats_avg: 0.5
              x_pos_stats_bias: 0.5

You can save it to a file, e.g. recipe_test_3032.yml, and then run it with the command esmvaltool run recipe_test_3032.yml. It will fail with the current main branch because of #2843 and successfully produce a figure with this branch.

@ghossh
Copy link
Copy Markdown

ghossh commented May 6, 2026

Hi @bouweandela , where do you have this dataset?
I looked for it in these directories but could not find it:
/work/ik1017/C3SCORDEX/data/c3s-cordex/output
/work/bd0854/DATA/ESMValTool2/download and, Saskia's downloaded one
/work/bk1088/b381943/data/

@ghossh
Copy link
Copy Markdown

ghossh commented May 6, 2026

Locally, I ran this recipe, and it downloaded the data, and it worked perfectly.

@ghossh
Copy link
Copy Markdown

ghossh commented May 7, 2026

FYI, I commented out the supplementary_variables and mask_landsea preprocessor since it could not find sftlf on ESGF. This is the final plot:
image

@ghossh
Copy link
Copy Markdown

ghossh commented May 7, 2026

In Levante, it worked:
image

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

Labels

fix for dataset Related to dataset-specific fix files

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

CORDEX fixes fail if variable has no time coordinate

2 participants