Skip to content

Conversation

@schlunma
Copy link
Contributor

@schlunma schlunma commented Dec 2, 2022

Description

#1811 introduced the addition of scalar coordinate to the output of the irregular regridding. However, by mistake, I read the scalar coordinates from the source representant, not the source cube itself. Since the representant is the result of slicing the source, it potentially contains many (unwanted) scalar coordinates and also leads to the bug described in #1844.

This PR fixes that.

Closes #1844

Link to documentation:


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 the bug Something isn't working label Dec 2, 2022
@schlunma schlunma added this to the v2.8.0 milestone Dec 2, 2022
@schlunma schlunma self-assigned this Dec 2, 2022
@codecov
Copy link

codecov bot commented Dec 2, 2022

Codecov Report

Merging #1845 (80cdf5d) into main (5107f12) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1845   +/-   ##
=======================================
  Coverage   91.54%   91.54%           
=======================================
  Files         203      203           
  Lines       10945    10945           
=======================================
  Hits        10020    10020           
  Misses        925      925           
Impacted Files Coverage Δ
esmvalcore/preprocessor/_regrid_esmpy.py 89.88% <100.00%> (ø)

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

@schlunma
Copy link
Contributor Author

schlunma commented Dec 2, 2022

Hi @LisaBock, I think this should fix your bug, could you please try your recipe with this change? Sorry for messing this up in the first place in #1811!

Copy link
Member

@LisaBock LisaBock left a comment

Choose a reason for hiding this comment

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

My recipes test was successfull.
Thanks @schlunma for the quick fix!

Copy link
Contributor

@remi-kazeroni remi-kazeroni left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @schlunma and @LisaBock!

@valeriupredoi
Copy link
Contributor

cheers for this, you three (not an Xmas reference, I promise 🎄 ) - @remi-kazeroni since Lisa approved as well, feel free to merge 👍

@remi-kazeroni remi-kazeroni merged commit ff87997 into main Dec 5, 2022
@remi-kazeroni remi-kazeroni deleted the fix_irregular_regridding branch December 5, 2022 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when regridding ocean variables

5 participants