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

Fix for syndat_getjtbul code parsing 3-character storm names (GFSv16.3.21) #3200

Conversation

KateFriedman-NOAA
Copy link
Member

Description

This PR introduces an update to the sorc/syndat_getjtbul.fd/getjtbul.f code to resolve a problem parsing 3-character storm names. This update is being included in the GFSv16.3.21 package (with approval by NCO).

From the developer @Qingfu-Liu:

The gfs_atmos_tropcy_qc_reloc job did not properly parse the vitals info from a raw bulletin with a tab in the storm name field for storm "SIX". The code sorc/syndat_getjtbul.fd/getjtbul.f converting a tab to a space worked well for storms that have at least 4 characters in their names, but does not work as well for storms with 3-character names. This code change will fix the parsing problem for 3-character storms.

Refs #2591

Type of change

  • Bug fix (fixes something broken)
  • New feature (adds functionality)
  • Maintenance (code refactor, clean-up, new CI test, etc.)

Change characteristics

Update to code that lives within global-workflow branch.

How has this been tested?

Tested by NCO and developer

The gfs_atmos_tropcy_qc_reloc did not properly parse the vitals info from a raw bulletin
with a tab in the storm name field for storm "SIX". The code sorc/syndat_getjtbul.fd/getjtbul.d
converting a tab to a space worked well for storms that have at least 4 characters in their names,
but does not work as well for storms with 3-character names. This code change will fix the
parsing problem for 3-character storms.

Refs NOAA-EMC#2591
DUMY2K(20:80) = INL(17:77)
INL= DUMY2K
PRINT *, ' '
PRINT *, '==> This is an new-format record with a 4-digit '
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor note. This should probably read

            PRINT *, '==> This is a new-format record with a 4-digit year'

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the comment @DavidHuber-NOAA ! @Qingfu-Liu shall I make the suggested change from Dave?

Copy link
Contributor

@DavidHuber-NOAA DavidHuber-NOAA left a comment

Choose a reason for hiding this comment

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

Looks good. Just a comment on a print statement, but approving as-is.

@Qingfu-Liu
Copy link

Kate,
You can change the comment from:
PRINT *, '==> This is an new-format record with a 4-digit '
to
PRINT *, '==> This is a new-format record with a 4-digit year'
Thanks.

@KateFriedman-NOAA
Copy link
Member Author

Kate, You can change the comment from: PRINT *, '==> This is an new-format record with a 4-digit ' to PRINT *, '==> This is a new-format record with a 4-digit year' Thanks.

@Qingfu-Liu My terminal shows that adding "year" to the print statement hits the fortan character limit of 72 characters per line. I added the "year" text as a line continuation. It's been a while since I modified fortran so please see the following git diff and let me know if it looks correct? I added "year" to several print statements that needed it:

kate.friedman@clogin09:/lfs/h2/emc/global/noscrub/kate.friedman/git/release-gfs.v16.3.21_fork> git diff
diff --git a/sorc/syndat_getjtbul.fd/getjtbul.f b/sorc/syndat_getjtbul.fd/getjtbul.f
index 69666b1e..dc0f8486 100755
--- a/sorc/syndat_getjtbul.fd/getjtbul.f
+++ b/sorc/syndat_getjtbul.fd/getjtbul.f
@@ -116,7 +116,8 @@ c      THE "WINDOWING" TECHNIQUE SINCE SUBSEQUENT LOGIC EXPECTS THIS
             DUMY2K(20:80) = INL(17:77)
             INL= DUMY2K
             PRINT *, ' '
-            PRINT *, '==> This is an new-format record with a 4-digit '
+            PRINT *, '==> This is an new-format record with a 4-digit ',
+     $       'year '
             PRINT *, ' '
           ELSE IF(INL(18:19).EQ.'20') THEN
             DUMY2K(1:17) = INL(1:17)
@@ -124,7 +125,8 @@ c      THE "WINDOWING" TECHNIQUE SINCE SUBSEQUENT LOGIC EXPECTS THIS
             DUMY2K(20:80) = INL(18:78)
             INL= DUMY2K
             PRINT *, ' '
-            PRINT *, '==> This is an new-format record with a 4-digit '
+            PRINT *, '==> This is an new-format record with a 4-digit ',
+     $       'year '
             PRINT *, ' '
           ELSE IF(INL(19:20).EQ.'20') THEN
             DUMY2K(1:18) = INL(1:18)
@@ -132,7 +134,8 @@ c      THE "WINDOWING" TECHNIQUE SINCE SUBSEQUENT LOGIC EXPECTS THIS
             DUMY2K(20:80) = INL(19:79)
             INL= DUMY2K
             PRINT *, ' '
-            PRINT *, '==> This is an new-format record with a 4-digit '
+            PRINT *, '==> This is an new-format record with a 4-digit ',
+     $       'year '
             PRINT *, ' '

@Qingfu-Liu
Copy link

Qingfu-Liu commented Jan 6, 2025

Hi Kate,
please copy the file from this directory:
Cactus: /lfs/h2/emc/physics/noscrub/qingfu.liu/for_NCO_2025/gfs.v16.3.21/sorc/syndat_getjtbul.fd/getjtbul.f
I changed the comments.
Thanks

@KateFriedman-NOAA
Copy link
Member Author

Hi Kate, please copy the file from this directory: Cactus: /lfs/h2/emc/physics/noscrub/qingfu.liu/for_NCO_2025/gfs.v16.3.21/sorc/syndat_getjtbul.fd/getjtbul.f I changed the comments. Thanks

@Qingfu-Liu Even better, thanks! I committed those comment changes @ 1cee9a0. I will now proceed with merging this PR, cutting a new hand-off tag, and letting NCO. Thanks!

@KateFriedman-NOAA KateFriedman-NOAA merged commit 65f2645 into NOAA-EMC:release/gfs.v16.3.21 Jan 6, 2025
1 check failed
@KateFriedman-NOAA KateFriedman-NOAA deleted the release/gfs.v16.3.21 branch January 6, 2025 14:27
KateFriedman-NOAA added a commit that referenced this pull request Jan 6, 2025
…release/gfs.v16.3.22

* origin/release/gfs.v16.3.21:
  Fix for syndat_getjtbul code parsing 3-character storm names (GFSv16.3.21) (#3200)
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.

3 participants