run_diags() now sets the params_results variable and uses the results_dir attribute to move the log file to.
However, if diagnostic run(s) fail, params_results will not be set resulting in the UnboundLocalError: local variable 'params_results' referenced before assignment
This error is technically not a bug because it indicates diagnostic sets failed. However, it is unintended behavior because e3sm_diags still completes its execution (the except statement) even with failed runs.
What did you expect to happen? Are there are possible answers you came across?
e3sm_diags should complete its execution even with failed runs
What happened?
run_diags()
now sets theparams_results
variable and uses theresults_dir
attribute to move the log file to.However, if diagnostic run(s) fail,
params_results
will not be set resulting in theUnboundLocalError: local variable 'params_results' referenced before assignment
Related code: https://github.com/E3SM-Project/e3sm_diags/blob/9e14ff81a658208631cda54516b4af67ae7541f3/e3sm_diags/run.py#L48-L94
This error is technically not a bug because it indicates diagnostic sets failed. However, it is unintended behavior because e3sm_diags still completes its execution (the
except
statement) even with failed runs.What did you expect to happen? Are there are possible answers you came across?
e3sm_diags should complete its execution even with failed runs
Minimal Complete Verifiable Example (MVCE)
Relevant log output
Anything else we need to know?
Related to https://github.com/E3SM-Project/zppy/issues/538
Environment
main
branch