ESMValGroup / ESMValTool

ESMValTool: A community diagnostic and performance metrics tool for routine evaluation of Earth system models in CMIP
https://www.esmvaltool.org
Apache License 2.0
210 stars 122 forks source link

Fixing global attributes for recipe_martin18grl #3637

Closed katjaweigel closed 1 week ago

katjaweigel commented 1 month ago

Describe the bug Due to a change in iris, global attributes can be transformed into variables attributes during preprocessing for some models. droughtindex/diag_save_spi.R does so far only write the global attributes in the resulting files. Therefor, recipe_martin18grl.yml fails, because the following python diagnostics (through ancestors) relay on the existence of the attributes. The fastest way to solve that would be to write the variable attributes in the files resulting from droughtindex/diag_save_spi.R. A better solution would be to improve also the way, information is transferred from R to python (but I don't know if I have time for this and it should be finished for the release).

See also #3616

bouweandela commented 4 weeks ago

I suspect that transforming global attributes to variable attributes happens in the concatenate preprocessor function since we started using this difference introduced in iris 3.8 in https://github.com/ESMValGroup/ESMValCore/pull/2398. Could you try if https://github.com/ESMValGroup/ESMValCore/pull/2449 solves the issue?

ehogan commented 1 week ago

This recipe passes on DKRZ using the latest versions of the ESMValCore v2.11.x release branch and the ESMValTool v2.11.x release branch (the versions dated "Jun 26, 2024"). I'll update the webpage once I have completed testing using ESMValCore v2.11.0rc2 😊