34 SUBROUTINE gettbh ( LUNS, LUNL, TAB, IMT, IMTV, IOGCE, ILTV )
38 character*128 bort_str
40 character*30 tags(5), label
50 badlabel( label ) = ( ( index( label, cttyp ) .EQ. 0 ) .OR.
51 . ( index( label, cftyp ) .EQ. 0 ) )
59 IF (
igetntbl( luns, header ) .NE. 0 ) goto 900
60 CALL
parstr( header, tags, 5, ntag,
'|', .false. )
61 IF ( ntag .LT. 3 ) goto 900
62 IF ( badlabel( tags(1) ) ) goto 900
64 imtv =
valx( tags(3) )
69 IF (
igetntbl( lunl, header ) .NE. 0 ) goto 900
70 CALL
parstr( header, tags, 5, ntag,
'|', .false. )
71 IF ( ntag .LT. 4 ) goto 900
72 IF ( badlabel( tags(1) ) ) goto 900
73 imt2 =
valx( tags(2) )
74 iogce =
valx( tags(3) )
75 iltv =
valx( tags(4) )
79 IF ( imt .NE. imt2 ) goto 901
83 900
WRITE(bort_str,
'("BUFRLIB: GETTBH - BAD OR MISSING HEADER '//
84 .
'WITHIN ",A," TABLE ",A)') cftyp, tab
86 901
WRITE(bort_str,
'("BUFRLIB: GETTBH - MASTER TABLE NUMBER '//
87 .
'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 AND PARSES THE HEADER LINES FROM TWO SEPARATE (I.E.
function igetntbl(LUNT, LINE)
THIS FUNCTION GETS THE NEXT LINE FROM THE ASCII MASTER TABLE FILE SPECIFIED BY LUNT, IGNORING ANY BLANK LINES OR COMMENT LINES IN THE PROCESS.
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...