Skip to content

Ensure status is 'old' for blacklist#870

Merged
RussTreadon-NOAA merged 1 commit into
NOAA-EMC:developfrom
CoryMartin-NOAA:bugfix/blacklist
Apr 30, 2025
Merged

Ensure status is 'old' for blacklist#870
RussTreadon-NOAA merged 1 commit into
NOAA-EMC:developfrom
CoryMartin-NOAA:bugfix/blacklist

Conversation

@CoryMartin-NOAA
Copy link
Copy Markdown
Contributor

Description
Found in NOAA-EMC/global-workflow#3599 (comment)
This PR should error if the blacklist file is missing rather than create a file of size 0.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Still needs testing

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing tests pass with my changes
  • Any dependent changes have been merged and published

@CoryMartin-NOAA
Copy link
Copy Markdown
Contributor Author

@RussTreadon-NOAA is it easy to pull this into your test case and re-run? If not, I can test it

@RussTreadon-NOAA
Copy link
Copy Markdown
Contributor

Thank you, @CoryMartin-NOAA , for the quick fix. I'll pull this into my Hercules working copy, recompile gsi.x, and rerun the failed gdas_anal.

@CoryMartin-NOAA
Copy link
Copy Markdown
Contributor Author

@RussTreadon-NOAA my new friend first suggested action='read' but then in VSCode suggested status='old', I thought status='old' was better, but if you prefer action='read' we can do that instead

@RussTreadon-NOAA
Copy link
Copy Markdown
Contributor

Hercules test

Build gsi.x from bugfix/blacklist. Rerun 20211221 00Z gdas_anal from g-w CI case C96C48_hybatmDA. gsi.x ran to completion without error. However, EIB's MSU staged GSI fix directory had already been populated with the correct rejectlist_global.txt.

As a test add export BLACKLIST=/path/to/non/existent/file to config.anal and rerun the 20211221 00Z gdas_anal. This time gsi.x aborted because file reject_global.txt did not exist

76: forrtl: severe (29): file not found, unit 19, file /work2/noaa/stmp/role-da/HERCULES/RUNDIRS/C96C48_hybatmDA/gdas.2021122100/anal.3616677/blacklist
76: Image              PC                Routine            Line        Source
76: gsi.x              000000000221D935  Unknown               Unknown  Unknown
76: gsi.x              0000000000D50224  blacklist_mp_blac         105  blacklist.f90
76: gsi.x              0000000000961D73  read_prepbufr_            610  read_prepbufr.f90
76: gsi.x              000000000094EB5C  read_obsmod_mp_re        1474  read_obs.F90
76: gsi.x              0000000000861BB2  observermod_mp_se         329  observer.F90
76: gsi.x              000000000105B4F3  glbsoi_                   221  glbsoi.f90
76: gsi.x              000000000068D267  gsisub_                   200  gsisub.F90
76: gsi.x              000000000041519D  gsimod_mp_gsimain        2451  gsimod.F90
76: gsi.x              00000000004150DF  MAIN__                    633  gsimain.f90

This is the correct behavior because the file is opened with status='old'. The old status means the file exists. gsi.x did not create a zero length rejectlist_global.txt.

The failure without creating a size 0 file is the desired behavior.

@RussTreadon-NOAA RussTreadon-NOAA self-requested a review April 30, 2025 20:22
Copy link
Copy Markdown
Contributor

@RussTreadon-NOAA RussTreadon-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested change using g-w CI on Hercules. Change works as intended.

@CoryMartin-NOAA
Copy link
Copy Markdown
Contributor Author

@RussTreadon-NOAA are we ready to merge this? or do we need to do other tests (the regression tests)?

@RussTreadon-NOAA
Copy link
Copy Markdown
Contributor

@CoryMartin-NOAA , @ShunLiu-NOAA , @hu5970 : this is a quick PR to address an issue discovered via g-w CI testing.

The g-w team has suspended all CI testing until the g-w GSI hash has been updated with this change.

If you are OK with this change, I recommend that we merge ASAP.

@RussTreadon-NOAA
Copy link
Copy Markdown
Contributor

Merging now

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 this pull request may close these issues.

2 participants