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

Fix regridding issue where target grid is more than 2D #2087

Merged
merged 3 commits into from Jun 8, 2023

Conversation

bouweandela
Copy link
Member

@bouweandela bouweandela commented Jun 8, 2023

Description

In #968 a rechunking step was introduced if the target grid resolution was considerably higher than the source grid. However, it failed to take into account that the target grid could have more dimensions than just latitude and longitude. This pull request fixes the issue.

Closes #2085


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 bug Something isn't working preprocessor Related to the preprocessor labels Jun 8, 2023
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Merging #2087 (ca2bb72) into main (92e20fd) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2087   +/-   ##
=======================================
  Coverage   93.08%   93.08%           
=======================================
  Files         237      237           
  Lines       12785    12793    +8     
=======================================
+ Hits        11901    11909    +8     
  Misses        884      884           
Impacted Files Coverage Δ
esmvalcore/preprocessor/_regrid.py 98.31% <100.00%> (+0.03%) ⬆️

@bouweandela bouweandela added this to the v2.9.0 milestone Jun 8, 2023
@bouweandela bouweandela marked this pull request as ready for review June 8, 2023 10:03
Copy link
Contributor

@zklaus zklaus left a comment

Choose a reason for hiding this comment

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

Just one little question. Otherwise looks good.

esmvalcore/preprocessor/_regrid.py Show resolved Hide resolved
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.

cheers, bud! A couple of minor points from me, but am requesting changes for @zklaus 's point to be considered (don't think he did review with req'd changes)

esmvalcore/preprocessor/_regrid.py Show resolved Hide resolved
esmvalcore/preprocessor/_regrid.py Show resolved Hide resolved
tests/unit/preprocessor/_regrid/test_regrid.py Outdated Show resolved Hide resolved
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.

cheers, Bouwe 🍺

@valeriupredoi valeriupredoi merged commit 1cf81d2 into main Jun 8, 2023
4 checks passed
@valeriupredoi valeriupredoi deleted the fix-rechunk-issue branch June 8, 2023 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working preprocessor Related to the preprocessor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rechunking to keep chunk size normal may fail
3 participants