Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make time-related fixes work with time dimensions time1, time2, time3 #1971

Merged
merged 5 commits into from May 12, 2023

Conversation

schlunma
Copy link
Contributor

@schlunma schlunma commented Mar 15, 2023

Description

CMIP6 provides multiple time dimensions, e.g., time, time1, etc. They all have the common standard name time.

Currently, we are using the dimension name (time, time1, ...) to identify coordinates in fixes. This PR introduces a convenience method VariableInfo.has_coord_with_standard_name to identify coordinates through their standard_name.

Closes #1969

Link to documentation: https://esmvaltool--1971.org.readthedocs.build/projects/ESMValCore/en/1971/api/esmvalcore.cmor.html?highlight=has_dimension#esmvalcore.cmor.table.VariableInfo.has_coord_with_standard_name


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:

@schlunma schlunma added bug Something isn't working cmor Related to the CMOR standard labels Mar 15, 2023
@schlunma schlunma added this to the v2.9.0 milestone Mar 15, 2023
@schlunma schlunma self-assigned this Mar 15, 2023
@codecov
Copy link

codecov bot commented Mar 15, 2023

Codecov Report

Merging #1971 (a5b23c4) into main (a86c92b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1971   +/-   ##
=======================================
  Coverage   92.79%   92.79%           
=======================================
  Files         236      236           
  Lines       12437    12440    +3     
=======================================
+ Hits        11541    11544    +3     
  Misses        896      896           
Impacted Files Coverage Ξ”
esmvalcore/cmor/_fixes/cesm/cesm2.py 100.00% <100.00%> (ΓΈ)
esmvalcore/cmor/_fixes/emac/emac.py 100.00% <100.00%> (ΓΈ)
esmvalcore/cmor/_fixes/icon/icon.py 100.00% <100.00%> (ΓΈ)
esmvalcore/cmor/_fixes/native_datasets.py 100.00% <100.00%> (ΓΈ)
esmvalcore/cmor/table.py 94.78% <100.00%> (+0.04%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
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.

Code changes look good to me πŸ₯³
I did not try it on any real data though.

Copy link
Contributor

@valeriupredoi valeriupredoi left a comment

Choose a reason for hiding this comment

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

looking good, cheers, Manu 🍺

@valeriupredoi valeriupredoi merged commit be534fd into main May 12, 2023
3 checks passed
@valeriupredoi valeriupredoi deleted the fixes_time_dim_handling branch May 12, 2023 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cmor Related to the CMOR standard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Time-related fixes do not work for every time-dependent variable
3 participants