39 RECURSIVE SUBROUTINE ufbmex(LUNIT,LUNDX,INEW,IRET,MESG)
50 CHARACTER*128 bort_str,errstr
52 INTEGER mesg(*), iret(*), lunit(*), lundx(*), inew(*)
53 INTEGER my_lunit(1), my_lundx(1), my_inew(1)
64 CALL x84(lunit,my_lunit,1)
65 CALL x84(lundx,my_lundx,1)
66 CALL x84(inew,my_inew,1)
67 IF (my_inew(1).EQ.0)
THEN
71 CALL x84(mesg,mesg,nmesg)
73 CALL ufbmex(my_lunit,my_lundx,my_inew,iret,mesg)
74 CALL x48(mesg,mesg,nmesg+iret(1))
84 CALL openbf(lunit,
'IN',lundx)
112 IF(ier.EQ.-1)
GOTO 100
113 IF(ier.EQ.-2)
GOTO 900
117 IF(nmsg .GT.
maxmsg) iflg = 1
140 100
IF(iflg.EQ.1)
THEN
146 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
147 WRITE ( unit=errstr, fmt=
'(A,A,I8,A)' )
148 .
'BUFRLIB: UFBMEX - THE NO. OF MESSAGES REQUIRED TO STORE ',
149 .
'ALL MESSAGES INTERNALLY EXCEEDS MAXIMUM (',
maxmsg,
150 .
') - INCOMPLETE READ'
152 WRITE ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
153 .
'>>>UFBMEX STORED ',
msgp(0),
' MESSAGES OUT OF ', nmsg,
'<<<'
155 WRITE ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
156 .
'>>>UFBMEX STORED ', mlast0,
' BYTES OUT OF ',
mlast,
'<<<'
158 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
170 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
171 WRITE ( unit=errstr, fmt=
'(A,A,I8,A)' )
172 .
'BUFRLIB: UFBMEX - THE NO. OF BYTES REQUIRED TO STORE ',
173 .
'ALL MESSAGES INTERNALLY EXCEEDS MAXIMUM (',
maxmem,
174 .
') - INCOMPLETE READ'
176 WRITE ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
177 .
'>>>UFBMEX STORED ', mlast0,
' BYTES OUT OF ',
mlast,
'<<<'
179 WRITE ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
180 .
'>>>UFBMEX STORED ',
msgp(0),
' MESSAGES OUT OF ', nmsg,
'<<<'
182 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
188 IF(iret(1).EQ.0)
THEN
199 900
WRITE(bort_str,
'("BUFRLIB: UFBMEX - ERROR READING MESSAGE '//
200 .
'NUMBER",I5," INTO MEMORY FROM UNIT",I3)') nmsg+1,lunit(1)
subroutine bort(STR)
Log one error message and abort application program.
recursive subroutine closbf(LUNIT)
Close the connection between logical unit LUNIT and the NCEPLIBS-bufr software.
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
recursive function iupbs01(MBAY, S01MNEM)
Read a data value from Section 0 or Section 1 of a BUFR message.
This module contains a declaration for an array used by various subroutines and functions to hold a t...
integer, dimension(:), allocatable mgwa
Temporary working copy of BUFR message.
This module contains array and variable declarations used to store the contents of one or more BUFR f...
integer, dimension(:), allocatable msgp
Pointers to the beginning of each message within msgs (up to a maximum of MAXMSG, and where array ele...
integer, dimension(:), allocatable ipmsgs
Pointers to first message within msgs for which each DX BUFR table applies.
integer, dimension(:), allocatable msgs
BUFR messages read from one or more BUFR files.
integer munit
Fortran logical unit number for use in accessing contents of BUFR files within internal memory.
integer ndxm
Number of DX BUFR table messages stored within mdx (up to a maximum of MXDXM).
integer ldxm
Number of array elements filled within mdx (up to a maximum of MXDXW).
integer mlast
Number of array elements filled within msgs (up to a maximum of MAXMEM).
integer ldxts
Number of DX BUFR table that is currently in scope, depending on which BUFR message within msgs is cu...
integer ndxts
Number of DX BUFR tables represented by the messages within mdx (up to a maximum of MXDXTS).
This module declares and initializes the IM8B variable.
logical, public im8b
Status indicator to keep track of whether all future calls to BUFRLIB subroutines and functions from ...
This module declares and initializes the MAXMEM variable.
integer maxmem
Maximum number of bytes that can be used to store BUFR messages within internal memory.
This module declares and initializes the MAXMSG variable.
integer maxmsg
Maximum number of BUFR messages that can be stored within internal memory.
recursive function nmwrd(MBAY)
Given an integer array containing Section 0 from a BUFR message, this function determines the array s...
recursive subroutine openbf(LUNIT, IO, LUNDX)
Connects a new file to the NCEPLIBS-bufr software for input or output operations, or initializes the ...
subroutine rdmsgw(lunit, mesg, iret)
Read the next BUFR message from logical unit lunit as an array of integer words.
recursive subroutine ufbmex(LUNIT, LUNDX, INEW, IRET, MESG)
Connect a new file to the BUFRLIB software for input operations, then read the entire file contents i...
subroutine x48(IIN4, IOUT8, NVAL)
Encode one or more 4-byte integer values as 8-byte integer values.
subroutine x84(IIN8, IOUT4, NVAL)
Encode one or more 8-byte integer values as 4-byte integer values.