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

Fixed --skip-nonexistent option #1093

Merged
merged 1 commit into from
May 11, 2021
Merged

Fixed --skip-nonexistent option #1093

merged 1 commit into from
May 11, 2021

Conversation

schlunma
Copy link
Contributor

@schlunma schlunma commented Apr 30, 2021

This PR fixes a bug that was introduced in #917 that prevented the usage of the --skip-nonexistent option. I also add a tiny test for it.

Note that I also adapted the preprocessors concatenate and save which gave ugly error messages when an empty cube was passed. This should never happen during a regular ESMValTool run, but could happen when these functions are used as part of the esmvalcore API.

Closes #1040, closes #988.

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 Apr 30, 2021
@schlunma schlunma self-assigned this Apr 30, 2021
@schlunma schlunma changed the title Fixes --skip-nonexistent option Fixed --skip-nonexistent option Apr 30, 2021
@schlunma schlunma added this to the v2.3.0 milestone May 4, 2021
@bouweandela
Copy link
Member

@jvegasbsc Would you have time to review this?

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.

very nice, thanks a lot @schlunma 🍺

@@ -173,6 +173,8 @@ def _get_concatenation_error(cubes):

def concatenate(cubes):
"""Concatenate all cubes after fixing metadata."""
if not cubes:
return cubes
Copy link
Contributor

Choose a reason for hiding this comment

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

thank you! I meant to plug this in since January 😆

@valeriupredoi
Copy link
Contributor

this is good, @jvegasbsc have a look too pls mate but it's good to go by me 👍

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.

Works fine for me! This PR solves the issues I had with the --skip-nonexistent option. Thanks a lot for your work @schlunma 👍

@valeriupredoi valeriupredoi merged commit 5656fb8 into master May 11, 2021
@valeriupredoi valeriupredoi deleted the fix_skip_nonexistent branch May 11, 2021 11:40
@valeriupredoi
Copy link
Contributor

oops I merged 😁 @jvegasbsc holler back if you encounter any issues, mate, but this is working well and I am rather happy to see it in the sooner than later 👍

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.

Concatenate fails when using --skip_nonexistent Derivation even if missing data
5 participants