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

Overhaul concatenation and allow for correct concatenation of multiple overlapping datasets #615

Merged
merged 17 commits into from
May 22, 2020

Conversation

valeriupredoi
Copy link
Contributor

@valeriupredoi valeriupredoi commented Apr 16, 2020

Before you start, please read CONTRIBUTING.md.

Tasks

  • Create an issue to discuss what you are going to do, if you haven't done so already (and add the link at the bottom)
  • This pull request has a descriptive title that can be used in a changelog
  • Add unit tests
  • Public functions should have a numpy-style docstring so they appear properly in the API documentation. For all other functions a one line docstring is sufficient.
  • If writing a new/modified preprocessor function, please update the documentation
  • Circle/CI tests pass. Status can be seen below your pull request. If the tests are failing, click the link to find out why.
  • Codacy code quality checks pass. Status can be seen below your pull request. If there is an error, click the link to find out why. If you suspect Codacy may be wrong, please ask by commenting.
  • Please use yamllint to check that your YAML files do not contain mistakes
  • If you make backward incompatible changes to the recipe format, make a new pull request in the ESMValTool repository and add the link below

If you need help with any of the tasks above, please do not hesitate to ask by commenting in the issue or pull request.


Closes #574

Summary

New Features

  • handles a list of cubes to be concatenated of form [A, B, C, D...] with any sort of overlap in time between the cubes
  • turns off iris's faulty automatic concatenation of eg [A, B, D] with a massive gap between B and D and inability of previous implementation to plug the gap with C
  • if the cubes are [A, B, D, C...] and B and D don't have an overlap but C or later cubes overlap, it will still work

Tagline

  • probably the mother of all concatenations we've ever had 😁

@valeriupredoi valeriupredoi added enhancement New feature or request preprocessor Related to the preprocessor labels Apr 16, 2020
@valeriupredoi
Copy link
Contributor Author

@bjlittle such an implementation would be nice to have in iris, this can easily be ported if you guys would be OK with it 🍺

@valeriupredoi
Copy link
Contributor Author

@bouweandela @jvegasbsc cen we have a look at this pls, I suspect it's gonna be quite useful (@mwjury has already tested for his two used cases that were not working previously) 🍺

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.

Nice improvement, but I think the implementation could still be simplified a bit. Could you have a look?

@valeriupredoi
Copy link
Contributor Author

Nice improvement, but I think the implementation could still be simplified a bit. Could you have a look?

cheers @bouweandela you are correct - I have streamlined it now, have a looksee 🍺

@rswamina
Copy link

@valeriupredoi - I found that this was a problem with the NorESM2-LM dataset as well. I think the same fix will work. Happy to try out once this branch is merged with the master.

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.

Nice work, could you please have a look at the comments?

esmvalcore/preprocessor/_io.py Outdated Show resolved Hide resolved
esmvalcore/preprocessor/_io.py Outdated Show resolved Hide resolved
esmvalcore/preprocessor/_io.py Outdated Show resolved Hide resolved
esmvalcore/preprocessor/_io.py Outdated Show resolved Hide resolved
esmvalcore/preprocessor/_io.py Outdated Show resolved Hide resolved
esmvalcore/preprocessor/_io.py Outdated Show resolved Hide resolved
valeriupredoi and others added 6 commits May 15, 2020 13:36
Co-authored-by: Bouwe Andela <b.andela@esciencecenter.nl>
Co-authored-by: Bouwe Andela <b.andela@esciencecenter.nl>
Co-authored-by: Bouwe Andela <b.andela@esciencecenter.nl>
Co-authored-by: Bouwe Andela <b.andela@esciencecenter.nl>
@valeriupredoi
Copy link
Contributor Author

all done, mi amigo @bouweandela 🍺

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.

Thanks, looks good now! Just a tiny remark about the error message.

@mattiarighi Could you please test?

esmvalcore/preprocessor/_io.py Outdated Show resolved Hide resolved
Co-authored-by: Bouwe Andela <b.andela@esciencecenter.nl>
@valeriupredoi
Copy link
Contributor Author

cheers @bouweandela - no need to test, @mwjury tested this in the issue, and meself included 🍺

@bouweandela
Copy link
Member

Sorry, I forgot to ask about Codacy, could you have a look?

@valeriupredoi
Copy link
Contributor Author

yeah Codacy can go for a walk 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request preprocessor Related to the preprocessor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

concatenation of cubes with overlapping data
5 participants