74 SUBROUTINE readerme(MESG,LUNIT,SUBSET,JDATE,IRET)
82 COMMON /hrdwrd/ nbytw,nbitw,iord(8)
85 CHARACTER*128 BORT_STR,ERRSTR
86 CHARACTER*8 SUBSET,SEC0
89 dimension mesg(*),iec0(2)
93 equivalence(sec0,iec0,cec0)
103 CALL status(lunit,lun,il,im)
106 CALL wtstat(lunit,lun,il, 1)
114 IF(lnmsg*nbytw.GT.
mxmsgl)
GOTO 902
116 mbay(i,lun) = mesg(i)
122 IF(
ichkstr(
'BUFR',cec0,4).NE.0)
GOTO 903
127 IF(isc3(lun).NE.0)
CALL reads3(lun)
129 CALL cktaba(lun,subset,jdate,iret)
131 IF(isc3(lun).NE.0)
RETURN
155 IF(idrdm(lun).GT.0)
THEN
159 IF(idrdm(lun).EQ.0)
THEN
166 idrdm(lun) = idrdm(lun) + 1
169 ELSE IF(idrdm(lun).GT.0)
THEN
179 IF ( iprt .GE. 2 )
THEN
180 CALL errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++++++')
181 WRITE ( unit=errstr, fmt=
'(A,I3,A)' )
182 .
'BUFRLIB: READERME - STORED NEW DX TABLE CONSISTING OF (',
183 . idrdm(lun),
') MESSAGES;'
185 errstr =
'WILL APPLY THIS TABLE TO ALL SUBSEQUENT DATA '//
186 .
'MESSAGES UNTIL NEXT DX TABLE IS PASSED IN'
188 CALL errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++++++')
199900
CALL bort(
'BUFRLIB: READERME - INPUT BUFR FILE IS CLOSED, IT '//
200 .
'MUST BE OPEN FOR INPUT')
201901
CALL bort(
'BUFRLIB: READERME - INPUT BUFR FILE IS OPEN FOR '//
202 .
'OUTPUT, IT MUST BE OPEN FOR INPUT')
203902
WRITE(bort_str,
'("BUFRLIB: READERME - INPUT BUFR MESSAGE LENGTH",
204 . 1X,I6," BYTES) IS LARGER THAN LIMIT OF ",I6," BYTES")')
207903
CALL bort(
'BUFRLIB: READERME - FIRST 4 BYTES READ FROM RECORD'//
208 .
' NOT "BUFR", DOES NOT CONTAIN BUFR DATA')
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
subroutine cktaba(LUN, SUBSET, JDATE, IRET)
THIS SUBROUTINE PARSES THE TABLE A MNEMONIC AND THE DATE OUT OF SECTION 1 OF A BUFR MESSAGE PREVIOUSL...
subroutine dxinit(LUN, IOI)
THIS SUBROUTINE INITIALIZES THE INTERNAL ARRAYS (IN MODULE TABABD) HOLDING THE DICTIONARY TABLE.
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
function ichkstr(STR, CHR, N)
THIS FUNCTION COMPARES A SPECIFIED NUMBER OF CHARACTERS FROM AN INPUT CHARACTER ARRAY AGAINST THE SAM...
function idxmsg(MESG)
This function determines whether a given BUFR message contains DX BUFR tables information that was ge...
function iupbs3(MBAY, S3MNEM)
This function returns a specified value from within Section 3 of a BUFR message.
function lmsg(SEC0)
GIVEN A CHARACTER STRING CONTAINING SECTION ZERO FROM A BUFR MESSAGE, THIS FUNCTION DETERMINES A COUN...
subroutine makestab
THIS SUBROUTINE CONSTRUCTS AN INTERNAL JUMP/LINK TABLE WITHIN MODULE TABLES, USING THE INFORMATION WI...
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 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.
subroutine readerme(MESG, LUNIT, SUBSET, JDATE, IRET)
This subroutine is similar to subroutine readmg(), except that it reads a BUFR message from an array ...
subroutine reads3(LUN)
THIS SUBROUTINE READS THE SECTION 3 DESCRIPTORS FROM THE BUFR MESSAGE IN MBAY(1,LUN).
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
subroutine stbfdx(LUN, MESG)
THIS SUBROUTINE COPIES A BUFR TABLE (DICTIONARY) MESSAGE FROM THE INPUT ARRAY MESG INTO THE INTERNAL ...
subroutine wtstat(LUNIT, LUN, IL, IM)
This subroutine can be used to connect or disconnect a specified Fortran logical unit number to/from ...