Skip to content

Commit

Permalink
Code update to syndat_getjtbul.fd for v16.1.7
Browse files Browse the repository at this point in the history
- update to getjtbul.f for syndat_getjtbul.fd code
- update provided by Qingfu Liu

Refs: NOAA-EMC#698
  • Loading branch information
KateFriedman-NOAA committed Mar 29, 2022
1 parent 87ed5d0 commit b022af8
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions sorc/syndat_getjtbul.fd/getjtbul.f
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,41 @@ PROGRAM SYNDAT_GETJTBUL
c BEGINS IN COLUMN 20 (NEW Y2K COMPLIANT FORM) - TEST ON LOCATION OF
c LATITUDE BLANK CHARACTER TO FIND OUT ...

IF(INL1(26).EQ.' ') THEN
c Check TABs and replaced it with ' ' (added by Qingfu Liu)
DO J=1,80
IF(ichar(INL(J:J)).EQ.9)THEN
INL(J:J) = ' '
END IF
END DO
DO J=1,80
IF(ichar(INL(J:J)).EQ.13)THEN
INL(J:J) = ' '
END IF
END DO

IF(INL1(26).EQ.' '.or.INL1(27).EQ.' ') THEN

c ... THIS RECORD STILL CONTAINS THE OLD 2-DIGIT FORM OF THE YEAR -
c ... THIS PROGRAM WILL NOW CONVERT THE RECORD TO A 4-DIGIT YEAR USING
c THE "WINDOWING" TECHNIQUE SINCE SUBSEQUENT LOGIC EXPECTS THIS

IF(INL(18:19).EQ.'20') THEN
DUMY2K(1:17) = INL(1:17)
DUMY2K(18:19) = ' '
DUMY2K(20:80) = INL(18:78)
INL= DUMY2K
PRINT *, ' '
PRINT *, '==> This is an new-format record with a 4-digit '
PRINT *, ' '
ELSE IF(INL(19:20).EQ.'20') THEN
DUMY2K(1:18) = INL(1:18)
DUMY2K(19:19) = ' '
DUMY2K(20:80) = INL(19:79)
INL= DUMY2K
PRINT *, ' '
PRINT *, '==> This is an new-format record with a 4-digit '
PRINT *, ' '
ELSE
PRINT *, ' '
PRINT *, '==> This is an old-format record with a 2-digit ',
$ 'year "',INL(20:21),'"'
Expand All @@ -114,7 +143,7 @@ PROGRAM SYNDAT_GETJTBUL
PRINT *, '==> 2-digit year converted to 4-digit year "',
$ INL(20:23),'" via windowing technique'
PRINT *, ' '

ENDIF
ELSE

c ... THIS RECORD CONTAINS THE NEW 4-DIGIT FORM OF THE YEAR
Expand Down

0 comments on commit b022af8

Please sign in to comment.