51 RECURSIVE SUBROUTINE readerme(MESG,LUNIT,SUBSET,JDATE,IRET)
60 COMMON /hrdwrd/ nbytw,nbitw,iord(8)
63 CHARACTER*128 bort_str,errstr
64 CHARACTER*8 subset,sec0
66 dimension mesg(*),iec0(2)
70 equivalence(sec0,iec0)
81 CALL x84(lunit,my_lunit,1)
82 CALL readerme(mesg,my_lunit,subset,jdate,iret)
83 CALL x48(jdate,jdate,1)
95 CALL status(lunit,lun,il,im)
98 CALL wtstat(lunit,lun,il, 1)
106 IF(lnmsg*nbytw.GT.
mxmsgl)
GOTO 902
108 mbay(i,lun) = mesg(i)
113 IF(sec0(1:4).NE.
'BUFR')
GOTO 903
120 CALL cktaba(lun,subset,jdate,iret)
122 IF(
isc3(lun).NE.0)
RETURN
146 IF(
idrdm(lun).GT.0)
THEN
150 IF(
idrdm(lun).EQ.0)
THEN
160 ELSE IF(
idrdm(lun).GT.0)
THEN
170 IF ( iprt .GE. 2 )
THEN
171 CALL errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++++++')
172 WRITE ( unit=errstr, fmt=
'(A,I3,A)' )
173 .
'BUFRLIB: READERME - STORED NEW DX TABLE CONSISTING OF (',
174 .
idrdm(lun),
') MESSAGES;'
176 errstr =
'WILL APPLY THIS TABLE TO ALL SUBSEQUENT DATA '//
177 .
'MESSAGES UNTIL NEXT DX TABLE IS PASSED IN'
179 CALL errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++++++')
190 900
CALL bort(
'BUFRLIB: READERME - INPUT BUFR FILE IS CLOSED, IT '//
191 .
'MUST BE OPEN FOR INPUT')
192 901
CALL bort(
'BUFRLIB: READERME - INPUT BUFR FILE IS OPEN FOR '//
193 .
'OUTPUT, IT MUST BE OPEN FOR INPUT')
194 902
WRITE(bort_str,
'("BUFRLIB: READERME - INPUT BUFR MESSAGE LENGTH",
195 . 1X,I6," BYTES) IS LARGER THAN LIMIT OF ",I6," BYTES")')
198 903
CALL bort(
'BUFRLIB: READERME - FIRST 4 BYTES READ FROM RECORD'//
199 .
' NOT "BUFR", DOES NOT CONTAIN BUFR DATA')
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 ...
recursive function idxmsg(MESG)
Check whether a BUFR message contains DX BUFR tables information.
recursive function iupbs3(MBAY, S3MNEM)
This function returns a specified value from within Section 3 of a BUFR message.
recursive function lmsg(SEC0)
Given a character string containing Section 0 from a BUFR message, this function determines the array...
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 subroutine readerme() to read in a new DX dic...
integer, dimension(:), allocatable idrdm
DX BUFR tables message count for each I/O internal stream index.
This module contains an array declaration used to store a switch for each internal I/O stream index,...
integer, dimension(:), allocatable isc3
Section 3 switch for each internal I/O stream index:
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 MXMSGL variable.
integer mxmsgl
Maximum length (in bytes) of a BUFR message that can be read or written by the BUFRLIB software.
recursive subroutine readerme(MESG, LUNIT, SUBSET, JDATE, IRET)
Read a BUFR message from a memory array.
subroutine reads3(LUN)
This subroutine reads the Section 3 descriptors from the BUFR message in mbay(1,lun).
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.