40 SUBROUTINE gettbh ( LUNS, LUNL, TAB, IMT, IMTV, IOGCE, ILTV )
42 character*128 bort_str
44 character*30 tags(5), label
54 badlabel( label ) = ( ( index( label, cttyp ) .EQ. 0 ) .OR.
55 . ( index( label, cftyp ) .EQ. 0 ) )
63 IF (
igetntbl( luns, header ) .NE. 0 ) goto 900
64 CALL
parstr( header, tags, 5, ntag,
'|', .false. )
65 IF ( ntag .LT. 3 ) goto 900
66 IF ( badlabel( tags(1) ) ) goto 900
68 imtv =
valx( tags(3) )
73 IF (
igetntbl( lunl, header ) .NE. 0 ) goto 900
74 CALL
parstr( header, tags, 5, ntag,
'|', .false. )
75 IF ( ntag .LT. 4 ) goto 900
76 IF ( badlabel( tags(1) ) ) goto 900
77 imt2 =
valx( tags(2) )
78 iogce =
valx( tags(3) )
79 iltv =
valx( tags(4) )
83 IF ( imt .NE. imt2 ) goto 901
87 900
WRITE(bort_str,
'("BUFRLIB: GETTBH - BAD OR MISSING HEADER '//
88 .
'WITHIN ",A," TABLE ",A)') cftyp, tab
90 901
WRITE(bort_str,
'("BUFRLIB: GETTBH - MASTER TABLE NUMBER '//
91 .
'MISMATCH BETWEEN STD AND LOC TABLE ",A)') tab
subroutine parstr(STR, TAGS, MTAG, NTAG, SEP, LIMIT80)
THIS SUBROUTINE PARSES A STRING CONTAINING ONE OR MORE SUBSTRINGS INTO AN ARRAY OF SUBSTRINGS...
function valx(STR)
This function decodes a real number from a character string.
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 bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...