Skip to content

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

Merged
mattiarighi merged 17 commits into
masterfrom
overhaul_concatenation
May 22, 2020
Merged

Overhaul concatenation and allow for correct concatenation of multiple overlapping datasets#615
mattiarighi merged 17 commits into
masterfrom
overhaul_concatenation

Conversation

@valeriupredoi

@valeriupredoi valeriupredoi commented Apr 16, 2020

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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) 🍺

Comment thread esmvalcore/preprocessor/_io.py Outdated
Comment thread esmvalcore/preprocessor/_io.py Outdated

@bouweandela bouweandela left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown

@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.

@bouweandela bouweandela left a comment

Copy link
Copy Markdown
Member

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?

Comment thread esmvalcore/preprocessor/_io.py Outdated
Comment thread esmvalcore/preprocessor/_io.py Outdated
Comment thread esmvalcore/preprocessor/_io.py Outdated
Comment thread esmvalcore/preprocessor/_io.py Outdated
Comment thread esmvalcore/preprocessor/_io.py Outdated
Comment thread esmvalcore/preprocessor/_io.py Outdated
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
Copy Markdown
Contributor Author

all done, mi amigo @bouweandela 🍺

@bouweandela bouweandela left a comment

Copy link
Copy Markdown
Member

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?

Comment thread esmvalcore/preprocessor/_io.py Outdated
Co-authored-by: Bouwe Andela <b.andela@esciencecenter.nl>
@valeriupredoi

Copy link
Copy Markdown
Contributor Author

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

@bouweandela

Copy link
Copy Markdown
Member

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

@valeriupredoi

Copy link
Copy Markdown
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