Skip to content

Add CORDEX domain target grids for regridding#3096

Open
ghossh wants to merge 1 commit into
mainfrom
target-grid-cordex-domain
Open

Add CORDEX domain target grids for regridding#3096
ghossh wants to merge 1 commit into
mainfrom
target-grid-cordex-domain

Conversation

@ghossh
Copy link
Copy Markdown

@ghossh ghossh commented Jun 1, 2026

Description

Adds support for using standard CORDEX domain names, such as EUR-11, as target_grid values in the regrid preprocessor.

Previously, target_grid: EUR-11 was treated as an MxN grid specification and failed with:

ValueError: Invalid MxN cell specification for grid, got 'EUR-11'.

Close #3088

@ghossh ghossh requested a review from bouweandela June 1, 2026 14:58
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

❌ Patch coverage is 46.15385% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.01%. Comparing base (4127673) to head (a96e132).
⚠️ Report is 40 commits behind head on main.

Files with missing lines Patch % Lines
esmvalcore/preprocessor/_regrid.py 44.73% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3096      +/-   ##
==========================================
- Coverage   96.14%   96.01%   -0.13%     
==========================================
  Files         267      267              
  Lines       15771    15803      +32     
==========================================
+ Hits        15163    15174      +11     
- Misses        608      629      +21     

☔ 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.

Copy link
Copy Markdown
Member

@bouweandela bouweandela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a great start! Could you take a look at the checklist? A few things to do would be

  • sign the CLA
  • add a unit test
  • add documentation

Usually you can find advice on how to go about that in the pull request template, but in case you missed it you can find it here: https://github.com/ESMValGroup/ESMValCore/blob/main/.github/pull_request_template.md

Dummy cube with rotated-pole dimension coordinates and geographical
auxiliary coordinates matching the official domain specification.
"""
domain = cx.cordex_domain(domain_name, bounds=True)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you could simplify this code by using ncdata.iris_xarray.cubes_to_xarray to convert the xarray.Dataset to an iris.cube.Cube directly?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make it possible to regrid to the standard CORDEX domains

3 participants