39 RECURSIVE SUBROUTINE rdmemm(IMSG,SUBSET,JDATE,IRET)
49 CHARACTER*128 bort_str,errstr
63 CALL x84(imsg,my_imsg,1)
64 CALL rdmemm(my_imsg,subset,jdate,iret)
65 CALL x48(jdate,jdate,1)
81 IF(imsg.EQ.0 .OR.imsg.GT.
msgp(0))
THEN
84 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
86 errstr =
'BUFRLIB: RDMEMM - REQUESTED MEMORY MESSAGE '//
87 .
'NUMBER {FIRST (INPUT) ARGUMENT} IS 0, RETURN WITH '//
90 WRITE ( unit=errstr, fmt=
'(A,I6,A,I6,A)' )
91 .
'BUFRLIB: RDMEMM - REQ. MEMORY MESSAGE #', imsg,
92 .
' {= 1ST (INPUT) ARG.} > # OF MESSAGES IN MEMORY (',
93 .
msgp(0),
'), RETURN WITH IRET = -1'
96 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
110 DO WHILE ((.NOT.known).AND.(jj.GE.1))
111 IF (
ipmsgs(jj).LE.imsg)
THEN
117 IF (.NOT.known)
GOTO 902
121 IF (jj.NE.
ldxts)
THEN
126 CALL errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++')
127 WRITE ( unit=errstr, fmt=
'(A,I3,A,I3,A,I6)' )
128 .
'BUFRLIB: RDMEMM - RESETTING TO USE DX TABLE #', jj,
129 .
' INSTEAD OF DX TABLE #',
ldxts,
130 .
' FOR REQUESTED MESSAGE #', imsg
132 CALL errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++')
162 IF(imsg.LT.
msgp(0)) lptr =
msgp(imsg+1)-iptr
173 CALL cktaba(lun,subset,jdate,jret)
180 900
CALL bort(
'BUFRLIB: RDMEMM - INPUT BUFR FILE IS CLOSED, IT '//
181 .
'MUST BE OPEN FOR INPUT')
182 901
CALL bort(
'BUFRLIB: RDMEMM - INPUT BUFR FILE IS OPEN FOR '//
183 .
'OUTPUT, IT MUST BE OPEN FOR INPUT')
184 902
WRITE(bort_str,
'("BUFRLIB: RDMEMM - UNKNOWN DX TABLE FOR '//
185 .
'REQUESTED MESSAGE #",I5)') imsg
subroutine bort(STR)
Log one error message and abort application program.
subroutine cktaba(LUN, SUBSET, JDATE, IRET)
This subroutine parses the Table A mnemonic and date out of Section 1 of a BUFR message that was prev...
subroutine dxinit(LUN, IOI)
This subroutine initializes the internal arrays (in module moda_tababd) holding the DX BUFR table.
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
subroutine makestab
This subroutine constructs the internal jump/link table within module tables, using all of the intern...
This module contains array and variable declarations used to store BUFR messages internally for multi...
integer, dimension(:,:), allocatable mbay
Current BUFR message for each internal I/O stream.
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 declarations for arrays used to store information about the current BUFR message...
integer, dimension(:), allocatable nmsg
Current message pointer within logical unit.
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, dimension(:), allocatable icdxts
Number of consecutive messages within mdx which constitute each DX BUFR table, beginning with the cor...
integer, dimension(:), allocatable ifdxts
Pointers to the beginning of each DX BUFR table within mdx.
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).
integer, dimension(:), allocatable mdx
DX BUFR table messages read from one or more BUFR files, for use in decoding the messages in msgs.
integer, dimension(:), allocatable ipdxm
Pointers to the beginning of each message within mdx.
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 ...
recursive subroutine rdmemm(IMSG, SUBSET, JDATE, IRET)
This subroutine reads a specified BUFR message from internal arrays in memory, so that it is now in s...
recursive subroutine status(LUNIT, LUN, IL, IM)
Check whether a specified Fortran logical unit number is currently connected to the NCEPLIBS-bufr sof...
subroutine stbfdx(LUN, MESG)
This subroutine copies a DX BUFR tables message from the input array mesg into the internal memory ar...
subroutine wtstat(LUNIT, LUN, IL, IM)
Update file status in library internals.
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.