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 extract_shape when fx vars are present #1403

Merged
merged 5 commits into from
Dec 3, 2021
Merged

Conversation

sloosvel
Copy link
Contributor

@sloosvel sloosvel commented Dec 2, 2021

Description

This pull request adds support to handle fx variables without crashing in the extract_shape preprocessor. It removes them before the shape extraction, and re-adds them after the data has been masked.

Closes #1394

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:

@sloosvel sloosvel added bug Something isn't working preprocessor Related to the preprocessor labels Dec 2, 2021
@sloosvel sloosvel added this to the v2.5.0 milestone Dec 2, 2021
@codecov
Copy link

codecov bot commented Dec 2, 2021

Codecov Report

Merging #1403 (a9bee94) into main (e4d61ad) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1403      +/-   ##
==========================================
+ Coverage   88.61%   88.62%   +0.01%     
==========================================
  Files         195      195              
  Lines        9867     9876       +9     
==========================================
+ Hits         8744     8753       +9     
  Misses       1123     1123              
Impacted Files Coverage Δ
esmvalcore/preprocessor/_area.py 91.57% <100.00%> (+0.28%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e4d61ad...a9bee94. Read the comment docs.

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.

brilliant! Cheers very much @sloosvel - I failed miserably at implementing this in a timely manner, you got my back tho 😁 I tested with the toy recipe from the issue - all fine, code looks smashing too 🍺 @axel-lauer this should solve the problem with the CMUG recipe, mate

@valeriupredoi valeriupredoi merged commit ded1fb7 into main Dec 3, 2021
@valeriupredoi valeriupredoi deleted the dev_extract_shape_fx branch December 3, 2021 15:43
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
2 participants