Skip to content

Commit

Permalink
Avoid mutating the input cubes when building the combined cube in pre…
Browse files Browse the repository at this point in the history
…processor function ``multi_model_statistics`` (#2564)

Co-authored-by: Manuel Schlund <[email protected]>
  • Loading branch information
bouweandela and schlunma authored Jan 20, 2025
1 parent 865ea7d commit c1133a8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions esmvalcore/preprocessor/_multimodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ def _combine(cubes):
# Equalise some metadata that can cause merge to fail (in-place)
# https://scitools-iris.readthedocs.io/en/stable/userguide/
# merge_and_concat.html#common-issues-with-merge-and-concatenate
cubes = [cube.copy() for cube in cubes]
equalise_attributes(cubes)
_equalise_var_metadata(cubes)
_equalise_cell_methods(cubes)
Expand Down

0 comments on commit c1133a8

Please sign in to comment.