Update a diagnostic to new Iris version #2390
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Recipe recipe_flato13ipcc.yml crashes due to a new IRIS version:
2021-10-28 11:31:58,651 [5412] INFO esmvaltool.diag_scripts.shared._base,550 Creating /work/bd1083/b380216/output/recipe_flato13ipcc_20211028_100738/plots/fig09-14/fig09-14
Traceback (most recent call last):
File "/mnt/lustre02/work/bd1083/b380216/CORE202102/ESMValTool/esmvaltool/diag_scripts/ipcc_ar5/ch09_fig09_14.py", line 407, in
main(cfg)
File "/mnt/lustre02/work/bd1083/b380216/CORE202102/ESMValTool/esmvaltool/diag_scripts/ipcc_ar5/ch09_fig09_14.py", line 396, in main
plot_path = produce_plots(config, data)
File "/mnt/lustre02/work/bd1083/b380216/CORE202102/ESMValTool/esmvaltool/diag_scripts/ipcc_ar5/ch09_fig09_14.py", line 351, in produce_plots
lines, labels = plot_zonal_mean_errors_ensemble(
File "/mnt/lustre02/work/bd1083/b380216/CORE202102/ESMValTool/esmvaltool/diag_scripts/ipcc_ar5/ch09_fig09_14.py", line 259, in plot_zonal_mean_errors_ensemble
cube_list = multi_model_merge(zonal_mean_errors)
File "/mnt/lustre02/work/bd1083/b380216/CORE202102/ESMValTool/esmvaltool/diag_scripts/ipcc_ar5/ch09_fig09_14.py", line 177, in multi_model_merge
equalise_attributes(cube_list)
File "/work/bd0854/b380216/anaconda3/envs/esmvaltool202106/lib/python3.9/site-packages/iris/experimental/equalise_cubes.py", line 30, in equalise_attributes
raise Exception(emsg)
Exception: The function "iris.experimental.equalise_cubes.equalise_attributes" has been moved.
Please replace "iris.experimental.equalise_cubes.equalise_attributes()" with "iris.util.equalise_attributes()".
It should be easy to fix with changing:
from iris.experimental.equalise_cubes import equalise_attributes
to
from iris.util import equalise_attributes
This new line is already used in ESMValCore/esmvalcore/preprocessor/_multimodel.py
I make this a draft first because I want to check if it runs (it did not the first time but that could have been caused by other issues.)
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.
New or updated recipe/diagnostic
To help with the number of pull requests: