21 CHARACTER*160 CLINE, TAGS(4), CDSTR(2), ADSC(10), CVAL(25)
22 CHARACTER*128 BORT_STR1, BORT_STR2
23 CHARACTER*6 ADN30, CLEMON, CDSC
24 dimension idfxy(10), idval(25)
41 DO WHILE ( .NOT. done )
43 IF (
igetntbl( lunt, cline ) .NE. 0 )
THEN
44 bort_str2 =
' IS INCOMPLETE'
48 CALL parstr ( cline, tags, 4, ntag,
'|', .false. )
49 IF ( ( ntag .LT. 2 ) .OR. ( ntag .GT. 3 ) )
THEN
50 bort_str2 =
' HAS BAD CARD'
54 IF ( ntag .EQ. 2 )
THEN
58 CALL parstr ( tags(2), cdstr, 2, ntag,
'=', .false. )
59 IF ( ntag .NE. 2 )
THEN
60 bort_str2 =
' HAS BAD DEPENDENCY CARD'
66 CALL parstr ( cdstr(1), adsc, 10, nidfxy,
',', .false. )
67 IF ( nidfxy .EQ. 0 )
THEN
68 bort_str2 =
' HAS BAD DEPENDENCY LIST (FXY)'
72 IF (
igetfxy( adsc(ii), cdsc ) .NE. 0 )
THEN
73 bort_str2 =
' HAS BAD DEPENDENCY (FXY)'
76 idfxy(ii) =
ifxy( cdsc )
81 CALL parstr ( cdstr(2), cval, 25, nidval,
',', .false. )
82 IF ( nidval .EQ. 0 )
THEN
83 bort_str2 =
' HAS BAD DEPENDENCY LIST (VAL)'
87 cval(ii) = adjustl( cval(ii) )
88 CALL strnum ( cval(ii), ival, ier )
97 ipt = index( tags(2),
' >' )
98 IF ( ipt .EQ. 0 )
THEN
104 tags(2)(ipt+1:ipt+1) =
' '
107 tags(2) = adjustl( tags(2) )
108 CALL strnum ( tags(2), ival, ier )
112 tags(3) = adjustl( tags(3) )
115 DO WHILE ( ( lt3 .GT. 0 ) .AND. ( .NOT. lstnblk ) )
116 IF ( tags(3)(lt3:lt3) .NE.
' ' )
THEN
126 IF ( ( nidfxy .EQ. 0 ) .AND. ( nidval .EQ. 0 ) )
THEN
127 CALL strtbfe_c ( ifxyn, ival, tags(3), lt3, -1, -1 )
131 CALL strtbfe_c ( ifxyn, ival, tags(3), lt3,
132 + idfxy(ii), idval(jj) )
143 900 clemon = adn30( ifxyn, 6 )
144 WRITE(bort_str1,
'("BUFRLIB: SNTBFE - TABLE F ENTRY FOR' //
145 .
' ELEMENT DESCRIPTOR: ",5A)')
146 . clemon(1:1),
'-', clemon(2:3),
'-', clemon(4:6)
147 CALL bort2(bort_str1,bort_str2)
subroutine bort2(STR1, STR2)
Log two error messages and abort application program.
function ifxy(ADSC)
Convert an FXY value from its 6 character representation to its WMO bit-wise representation.
function igetfxy(STR, CFXY)
This function looks for and returns a valid FXY number from within the given input string.
function igetntbl(LUNT, LINE)
This subroutine reads the next line from an ASCII master table B, table D or Code/Flag table file,...
Wrap C NCEPLIBS-bufr functions so they can be called from within the Fortran part of the library.
subroutine parstr(STR, TAGS, MTAG, NTAG, SEP, LIMIT80)
Parse a string containing one or more substrings into an array of substrings.
subroutine sntbfe(LUNT, IFXYN)
Store a master Code/Flag table entry into internal memory.
recursive subroutine strnum(str, num, iret)
Decode an integer from a character string.