35 SUBROUTINE gettbh ( LUNS, LUNL, TAB, IMT, IMTV, IOGCE, ILTV )
37 CHARACTER*128 BORT_STR
39 CHARACTER*30 TAGS(5), LABEL
49 badlabel( label ) = ( ( index( label, cttyp ) .EQ. 0 ) .OR.
50 . ( index( label, cftyp ) .EQ. 0 ) )
58 IF (
igetntbl( luns, header ) .NE. 0 )
GOTO 900
59 CALL parstr ( header, tags, 5, ntag,
'|', .false. )
60 IF ( ntag .LT. 3 )
GOTO 900
61 IF ( badlabel( tags(1) ) )
GOTO 900
62 CALL strnum ( tags(2), imt, iersn )
63 CALL strnum ( tags(3), imtv, iersn )
68 IF (
igetntbl( lunl, header ) .NE. 0 )
GOTO 900
69 CALL parstr ( header, tags, 5, ntag,
'|', .false. )
70 IF ( ntag .LT. 4 )
GOTO 900
71 IF ( badlabel( tags(1) ) )
GOTO 900
72 CALL strnum ( tags(2), imt2, iersn )
73 CALL strnum ( tags(3), iogce, iersn )
74 CALL strnum ( tags(4), iltv, iersn )
78 IF ( imt .NE. imt2 )
GOTO 901
82 900
WRITE(bort_str,
'("BUFRLIB: GETTBH - BAD OR MISSING HEADER '//
83 .
'WITHIN ",A," TABLE ",A)') cftyp, tab
85 901
WRITE(bort_str,
'("BUFRLIB: GETTBH - MASTER TABLE NUMBER '//
86 .
'MISMATCH BETWEEN STD AND LOC TABLE ",A)') tab
subroutine bort(STR)
Log one error message and abort application program.
subroutine gettbh(LUNS, LUNL, TAB, IMT, IMTV, IOGCE, ILTV)
This subroutine reads the header lines from two separate ASCII files (one standard and one local) con...
function igetntbl(LUNT, LINE)
This subroutine reads the next line from an ASCII master table B, table D or Code/Flag table file,...
subroutine parstr(STR, TAGS, MTAG, NTAG, SEP, LIMIT80)
Parse a string containing one or more substrings into an array of substrings.
recursive subroutine strnum(str, num, iret)
Decode an integer from a character string.