Skip to content

Add a function for finding input datasets for derived variables#3051

Draft
bouweandela wants to merge 2 commits intomainfrom
derived-alternative
Draft

Add a function for finding input datasets for derived variables#3051
bouweandela wants to merge 2 commits intomainfrom
derived-alternative

Conversation

@bouweandela
Copy link
Copy Markdown
Member

@bouweandela bouweandela commented Apr 24, 2026

Description

Alternative implementation to #2777 for finding input datasets for derived variables. Adds a method esmvalcore.dataset.Dataset.derived_variable_from_files that can be used to find input datasets.

Note that derived variables with optional input datasets are not yet supported. The only derived variable that uses this feature is amoc at the moment, so the impact of that is limited.

Link to documentation: https://esmvaltool--3051.org.readthedocs.build/projects/ESMValCore/en/3051/notebooks/derived-variables.html


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 api Notebook API label Apr 24, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

❌ Patch coverage is 14.28571% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.08%. Comparing base (df77d1b) to head (87cce7e).

Files with missing lines Patch % Lines
esmvalcore/dataset.py 14.28% 12 Missing ⚠️

❌ Your patch check has failed because the patch coverage (14.28%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3051      +/-   ##
==========================================
- Coverage   96.15%   96.08%   -0.08%     
==========================================
  Files         270      270              
  Lines       15805    15819      +14     
==========================================
+ Hits        15198    15199       +1     
- Misses        607      620      +13     

☔ 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 changed the title Add function for finding input datasets for derived variables Add a function for finding input datasets for derived variables Apr 24, 2026
@bouweandela bouweandela requested review from schlunma April 24, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Notebook API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant