53 SUBROUTINE ufbmex(LUNIT,LUNDX,INEW,IRET,MESG)
60 CHARACTER*128 bort_str,errstr
70 CALL
openbf(lunit,
'IN',lundx)
97 1 CALL
rdmsgw(lunit,mgwa,ier)
98 IF(ier.EQ.-1) goto 100
99 IF(ier.EQ.-2) goto 900
102 mesg(nmsg) =
iupbs01(mgwa,
'MTYP')
103 IF(nmsg .GT.maxmsg) iflg = 1
105 IF(lmem+mlast.GT.maxmem) iflg = 2
110 msgs(mlast+i) = mgwa(i)
126 100
IF(iflg.EQ.1)
THEN
132 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
133 WRITE ( unit=errstr, fmt=
'(A,A,I8,A)' )
134 .
'BUFRLIB: UFBMEX - THE NO. OF MESSAGES REQUIRED TO STORE ',
135 .
'ALL MESSAGES INTERNALLY EXCEEDS MAXIMUM (', maxmsg,
136 .
') - INCOMPLETE READ'
138 WRITE ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
139 .
'>>>UFBMEX STORED ', msgp(0),
' MESSAGES OUT OF ', nmsg,
'<<<'
141 WRITE ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
142 .
'>>>UFBMEX STORED ', mlast0,
' BYTES OUT OF ', mlast,
'<<<'
144 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
156 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
157 WRITE ( unit=errstr, fmt=
'(A,A,I8,A)' )
158 .
'BUFRLIB: UFBMEX - THE NO. OF BYTES REQUIRED TO STORE ',
159 .
'ALL MESSAGES INTERNALLY EXCEEDS MAXIMUM (', maxmem,
160 .
') - INCOMPLETE READ'
162 WRITE ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
163 .
'>>>UFBMEX STORED ', mlast0,
' BYTES OUT OF ', mlast,
'<<<'
165 WRITE ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
166 .
'>>>UFBMEX STORED ', msgp(0),
' MESSAGES OUT OF ', nmsg,
'<<<'
168 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
177 IF(munit.NE.0) CALL
closbf(lunit)
178 IF(munit.EQ.0) munit = lunit
186 900
WRITE(bort_str,
'("BUFRLIB: UFBMEX - ERROR READING MESSAGE '//
187 .
'NUMBER",I5," INTO MEMORY FROM UNIT",I3)') nmsg+1,lunit
subroutine ufbmex(LUNIT, LUNDX, INEW, IRET, MESG)
This subroutine connects a new system file to the BUFRLIB software for input operations, then reads the entire file contents into internal arrays so that any of the individual BUFR messages can later be accessed from memory, instead of having to read them one at a time sequentially from the system file.
function nmwrd(MBAY)
GIVEN AN INTEGER ARRAY CONTAINING SECTION ZERO FROM A BUFR MESSAGE, THIS FUNCTION DETERMINES A COUNT ...
subroutine rdmsgw(LUNIT, MESG, IRET)
THIS SUBROUTINE READS THE NEXT BUFR MESSAGE FROM LOGICAL UNIT LUNIT AS AN ARRAY OF INTEGER WORDS...
subroutine closbf(LUNIT)
This subroutine closes the connection between logical unit LUNIT and the BUFRLIB software.
This module contains array and variable declarations used to store the contents of one or more BUFR f...
subroutine openbf(LUNIT, IO, LUNDX)
This subroutine connects a new file to the BUFRLIB software for input or output operations.
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
function iupbs01(MBAY, S01MNEM)
This function returns a specified value from within Section 0 or Section 1 of a BUFR message...