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

Plotting stats task bug #165

Closed
EdwardSnyder-NOAA opened this issue Oct 30, 2024 · 2 comments · Fixed by #168
Closed

Plotting stats task bug #165

EdwardSnyder-NOAA opened this issue Oct 30, 2024 · 2 comments · Fixed by #168
Assignees
Labels
bug Something isn't working

Comments

@EdwardSnyder-NOAA
Copy link
Collaborator

While testing the release v2.0.0 land da container I noticed this error message for the plot_stats task:

File date= 2000-01-03-00
File date= 2000-01-03-00
Traceback (most recent call last):
  File "/gpfs/f5/epic/scratch/Edward.Snyder/landda-cont/release-v2/land-DA_workflow/ush/plot_analysis_timehistory.py", line 293, in <module>
    main()
  File "/gpfs/f5/epic/scratch/Edward.Snyder/landda-cont/release-v2/land-DA_workflow/ush/plot_analysis_timehistory.py", line 53, in main
    var_dict_anal = get_data_analysis(path_data,fn_data_anal_prefix,fn_data_anal_suffix,nprocs_anal,var_nm)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs/f5/epic/scratch/Edward.Snyder/landda-cont/release-v2/land-DA_workflow/ush/plot_analysis_timehistory.py", line 137, in get_data_analysis
    min_val_final.append(min_val_file[-1])
                         ~~~~~~~~~~~~^^^^
IndexError: list index out of range

After placing print statements in the loop of the plot_analysis_timehistory.py script, I realized that the files variable is containing more than one analysis log file, which in my case where error log files as in ptmp/test/com/output/logs/analysis_2000010300.log.*. The work around was to delete these extra log files in the the logs directory. After that, the plot_stats task completed as expected. What is strange is the plot_timehistory.yaml is calling the '.log' extension explicitly: fn_data_fcst_suffix: '.log'. So I'm not sure what is going on here exactly.

@chan-hoo
Copy link
Collaborator

@EdwardSnyder-NOAA, I think this might be caused by that the log file (analsys_xxx.log) was being changed when the plot_stat task ran for some reason. Each task has maxtries=2 in the rocoto workflow. So it might work well in the next try. Did the ploat_stat fail with DEAD finally? If so, I'll try to reproduce this kind of error and provide a solution.

@chan-hoo
Copy link
Collaborator

@EdwardSnyder-NOAA, I think this part (

if entry.is_file() and entry.name.startswith(fn_data_anal_prefix):
) has a potential issue as you mentioned. I'll add another condition using endswith and let you know what happens.

@chan-hoo chan-hoo self-assigned this Oct 31, 2024
@chan-hoo chan-hoo added the bug Something isn't working label Oct 31, 2024
@chan-hoo chan-hoo moved this to In Progress in land-DA_workflow_management Oct 31, 2024
@chan-hoo chan-hoo linked a pull request Oct 31, 2024 that will close this issue
12 tasks
@chan-hoo chan-hoo moved this from In Progress to In Review in land-DA_workflow_management Oct 31, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in land-DA_workflow_management Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants