-
Notifications
You must be signed in to change notification settings - Fork 128
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
Fix parsing in diag validation #3364
Conversation
…lmean plots. Will be triggered by 'add_tropopause = true' in the recipe
Co-authored-by: Axel Lauer <[email protected]>
…le plots (#2947) Co-authored-by: Axel Lauer <[email protected]>
Co-authored-by: valeriupredoi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @FranziskaWinterstein for this PR! I have a couple of small suggetions for the code to simplify it.
Before I test existing recipes: can you describe quickly what is going wrong with apply_supermeans
? At first glance it looks like your function is doing exactly the same, so I wonder what the problem is.
Co-authored-by: Manuel Schlund <[email protected]>
Co-authored-by: Manuel Schlund <[email protected]>
Co-authored-by: Manuel Schlund <[email protected]>
Co-authored-by: Manuel Schlund <[email protected]>
Thank you for taking the time and your code updates are just perfect. Regarding the |
You are right, there have been some changes in |
Okay, I updated the Core, but now the preprocessor fails completely (main_log_debug.txt) That is however as far as I can go, today. I will look into it again next week, but maybe you have a suggestion what the problem could be already. |
Yes I do! The error is caused by a new feature of iris. Unfortuntately you have to reinstall your environment to solve this properly (i.e., get the latest iris version). Sorry, there have been quite some changes recently. |
@schlunma Yes, you were right. I needed to reinstall conda anyway. With the current ESMValCore release as well as the current development ESMValCore everything went fine with the supermeans function. So I will revoke the changes regarding supermeans. |
Ready to merge, I think. |
I just tested this with the existing recipes Traceback (most recent call last):
File "/home/b/b309141/repos/ESMValTool/esmvaltool/diag_scripts/validation.py", line 418, in <module>
main(config)
File "/home/b/b309141/repos/ESMValTool/esmvaltool/diag_scripts/validation.py", line 383, in main
plot_ctrl_exper_seasons(ctrl_seasons, exper_seasons, cfg, plot_key)
File "/home/b/b309141/repos/ESMValTool/esmvaltool/diag_scripts/validation.py", line 353, in plot_ctrl_exper_seasons
plot_zonal_cubes(control_season, experiment_season, cfg, plot_info)
File "/home/b/b309141/repos/ESMValTool/esmvaltool/diag_scripts/validation.py", line 223, in plot_zonal_cubes
save_plotted_cubes(
File "/home/b/b309141/repos/ESMValTool/esmvaltool/diag_scripts/validation.py", line 103, in save_plotted_cubes
_get_provenance_record(cfg, save_path,
File "/home/b/b309141/repos/ESMValTool/esmvaltool/diag_scripts/validation.py", line 43, in _get_provenance_record
ancestor_1 = [
^
IndexError: list index out of range The reason for this is that the code that retrieves the ancestors is really not optimal. It uses lots of @FranziskaWinterstein Please let me know if this also works for your use case; our two validation recipes run successfully and produce consistent resuls 👍 |
@schlunma Yes, my recipe output is identical. I was also confused that the names are retrieved from the output filenames, which fails easily, if something changes there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, then I think this can be merged!
@valeriupredoi, as the author of this diagnostic, could you please do a final check and merge? Thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good, many thanks! 🍺
guys, bear in mind this diagnostic predates most all the bits that you mention, it's ye olde, but still going strong if you don't need to do fancy stuff 😁 @esmvalbot please run recipe_validation.yml |
@esmvalbot please run recipe_validation.yml |
Since @valeriupredoi asked, ESMValBot will run recipe recipe_validation.yml as soon as possible, output will be generated here |
ESMValBot is happy to report recipe recipe_validation.yml ran OK, output has been generated here |
Co-authored-by: Axel Lauer <[email protected]> Co-authored-by: Manuel Schlund <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: valeriupredoi <[email protected]> Co-authored-by: Valeriu Predoi <[email protected]> Co-authored-by: Manuel Schlund <[email protected]>
Description
When using the validation.py diagnostic I ran into problems when using aliases and the parsing of the variable
ancestor_2
in function_get_provenance_record
.The code changes make use of the
alias
of the datasets and now finds the proper files if the alias is set manually.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