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

Ncl log_provenance in interface_script seems broken #3420

Closed
zklaus opened this issue Nov 14, 2023 · 4 comments · Fixed by #3422
Closed

Ncl log_provenance in interface_script seems broken #3420

zklaus opened this issue Nov 14, 2023 · 4 comments · Fixed by #3422
Assignees

Comments

@zklaus
Copy link
Contributor

zklaus commented Nov 14, 2023

During the testing for 2.10.0, we see a number of recipes broken due to an error occuring in log_provenance in the Ncl file interface_scripts/logging.ncl. Specifically, the error is

 Copyright (C) 1995-2019 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.6.2
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
INFO    Loading settings from /scratch/b/b380866/esmvaltool/output/recipe_anav13jclim_20231113_131415/run/diag_collect/collect_sh/settings.ncl
INFO    Wrote variable grade to /scratch/b/b380866/esmvaltool/output/recipe_anav13jclim_20231113_131415/work/diag_collect/collect_sh/diag_grading_gpp-sh_to_diag_grading_pr-sh_RMSD.nc
fatal:The result of the conditional expression yields a missing value. NCL can not determine branch, see ismissing function
^Mfatal:["Execute.c":8637]:Execute: Error occurred at or near line 359 in file $diag_scripts/../interface_scripts/logging.ncl

^Mfatal:["Execute.c":8637]:Execute: Error occurred at or near line 506 in file /home/b/b380866/miniforge3/envs/evt-v2.10.x-2023-11-13/lib/python3.11/site-packages/esmvaltool/diag_scripts/perfmetrics/collect.ncl

For a list of recipes, see the testing issues in #3414 .

@schlunma
Copy link
Contributor

schlunma commented Nov 14, 2023

This is most likely related to the changes from #3332.

It also seems that there is more than one problem. For recipe_wenzel14jgr.yml, I got a slightly different error message than the one posted above:

fatal:Variable (all_outfiles) is undefined
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 366 in file $diag_scripts/../interface_scripts/logging.ncl

fatal:["Execute.c":8637]:Execute: Error occurred at or near line 346 in file /home/b/b309141/repos/ESMValTool/esmvaltool/diag_scripts/carbon_ec/carbon_gammaHist.ncl

In this case, the diagnostic used a wrong outfile for the provenance logging (e.g., /plots/diag_gammaHist_Fig3and4/gammaHist_3and4/.png. The old code just ignored this, but the new fails. This can also be seen in old runs, where the corresponding plot is missing on the website due to the invalid provenance entry.

I will update logging.ncl so it won't fail anymore, but it would also make sense to actually fix the root cause, in this case the wrong outfile. I'll investigate further.

@zklaus
Copy link
Contributor Author

zklaus commented Nov 14, 2023

Thanks for the investigation, @schlunma! I agree that it would be best to fix the underlying issue. Do you have an idea what that might be in the other cases that are not about the wrong outfile?

@schlunma
Copy link
Contributor

Yes, the cases I found so far are very similar. People (in this example, myself 😆) use all kinds of wrong entries for outfile, e.g. missing. This leads to get_file_suffix(outfile) = missing, which gives the error message you posted. I'll try to fix all occurences.

@schlunma
Copy link
Contributor

Opened a PR here: #3422. Unfortunately, these are too many recipes for me to test now. I tested one example (which works).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants