Esmvaltool: Two problems with re-running diagnostics

Created on 30 Aug 2019  路  11Comments  路  Source: ESMValGroup/ESMValTool

If a diagnostic fails, we get the message

 INFO    To re-run this diagnostic script, run:

This message is so helpful! It has saved several hours of work many times. However, if you add the -f argument to force an overwrite, it deletes not just the failed diagnostic, but the contents of the entire plots directory.

Furthermore, there is no easy way to re-run all diagnostics without re-running the entire recipe. This means that if a diagnostic fails, we have to delete all the plots, fix the bug that causes the break, then re-run the entire recipe instead of just the broken diagnostic.

There are two easy solutions to this problem:

  1. the -f argument should only delete the plots linked to the specific diagnostic, not all plots.
  2. A message at the end of the recipe saying
 INFO    To re-run this and all diagnostic scripts, run:

Thought?

documentation

All 11 comments

Ill have a looksee today, cheers dude :beer:

1. the `-f` argument should only delete the plots linked to the specific diagnostic, not all plots.

I think there's an -i option which ignores existing files and does not delete them. Have you tried that?

indeed -i or --ignore-existing seems to do the trick for me (it's an option of the run_diagnostic context manager)

Okay, that manages the overwrite problem. Thanks!

What about when a diagnostic crashes ESMValTool before other diagnostics have finished? Sometimes we need to re-run all diagnostics just to fill in the gaps. Is there a command to run all the diagnostics?

yeah, it's the following:

esmvaltool -c config-user.yml recipe.yml

:rofl:

But seriously, no, not yet...

It's a joke, but some of my recipes take 3-4 hours to run the preprocessors. (Other people have recipes that take much longer than that.)

Re-running all the preprocessors, just to be lazy seems a bit much.

Could we just pipe the output lines "To re-run this diagnostic script, run:" into a shell script and save it in the run directory? Surely that wouldn't be too hard to implement for one of you pros?

@valeriupredoi is in "cleaning mode". :smile:

if I was too harsh do let me know by re-opening issues, but expect retributions :grin:

No worries, it's much appreciated!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

valeriupredoi picture valeriupredoi  路  3Comments

bouweandela picture bouweandela  路  4Comments

valeriupredoi picture valeriupredoi  路  4Comments

bouweandela picture bouweandela  路  4Comments

valeriupredoi picture valeriupredoi  路  5Comments