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

v12: Fix lazy sed for RRTMGP #696

Merged

Conversation

mathomp4
Copy link
Member

As found by @michellefrazer, the sed in our runscripts was not quite good. This code:

   cat $instance.tmp | sed -e '/RRTMG/ s#RRTMG#RRTMGP#' > $instance

works great the first time around. But if you run multiple segments with the same scratch dir, well, you go from RRTMG to RRTMGP to RRTMGPP and boom, crash.

So we add word boundary markers to the sed to look only for the complete word RRTMG.

NOTE: The correct fix is to change the files in GOCART or do something smarter.

@mathomp4 mathomp4 added bugfix This pull request fixes a bug 0 diff The changes in this pull request have verified to be zero-diff with the target branch. labels Feb 21, 2025
@mathomp4 mathomp4 self-assigned this Feb 21, 2025
@mathomp4 mathomp4 requested a review from a team as a code owner February 21, 2025 20:51
@sdrabenh sdrabenh merged commit 4a1c58b into feature/sdrabenh/gcm_v12 Feb 21, 2025
15 checks passed
@sdrabenh sdrabenh deleted the bugfix/mathomp4/v12-rrtmgp-sed-fix branch February 21, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 diff The changes in this pull request have verified to be zero-diff with the target branch. bugfix This pull request fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants