93 SUBROUTINE readerme(MESG,LUNIT,SUBSET,JDATE,IRET)
99 COMMON /hrdwrd/ nbytw,nbitw,iord(8)
102 CHARACTER*128 bort_str,errstr
103 CHARACTER*8 subset,sec0
106 dimension mesg(*),iec0(2)
110 equivalence(sec0,iec0,cec0)
120 CALL
status(lunit,lun,il,im)
123 CALL
wtstat(lunit,lun,il, 1)
131 IF(lnmsg*nbytw.GT.mxmsgl) goto 902
133 mbay(i,lun) = mesg(i)
139 IF(
ichkstr(
'BUFR',cec0,4).NE.0) goto 903
144 IF(isc3(lun).NE.0) CALL
reads3(lun)
146 CALL
cktaba(lun,subset,jdate,iret)
148 IF(isc3(lun).NE.0)
RETURN
162 IF(
idxmsg(mbay(1,lun)).EQ.1)
THEN
167 IF(
iupbs3(mbay(1,lun),
'NSUB').EQ.0)
THEN
172 IF(idrdm(lun).GT.0)
THEN
176 IF(idrdm(lun).EQ.0)
THEN
183 idrdm(lun) = idrdm(lun) + 1
184 CALL
stbfdx(lun,mbay(1,lun))
186 ELSE IF(idrdm(lun).GT.0)
THEN
196 IF ( iprt .GE. 2 )
THEN
197 CALL
errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++++++')
198 WRITE ( unit=errstr, fmt=
'(A,I3,A)' )
199 .
'BUFRLIB: READERME - STORED NEW DX TABLE CONSISTING OF (',
200 . idrdm(lun),
') MESSAGES;'
202 errstr =
'WILL APPLY THIS TABLE TO ALL SUBSEQUENT DATA '//
203 .
'MESSAGES UNTIL NEXT DX TABLE IS PASSED IN'
205 CALL
errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++++++')
216 900 CALL
bort(
'BUFRLIB: READERME - INPUT BUFR FILE IS CLOSED, IT '//
217 .
'MUST BE OPEN FOR INPUT')
218 901 CALL
bort(
'BUFRLIB: READERME - INPUT BUFR FILE IS OPEN FOR '//
219 .
'OUTPUT, IT MUST BE OPEN FOR INPUT')
220 902
WRITE(bort_str,
'("BUFRLIB: READERME - INPUT BUFR MESSAGE LENGTH",
221 . 1X,I6," BYTES) IS LARGER THAN LIMIT OF ",I6," BYTES")')
224 903 CALL
bort(
'BUFRLIB: READERME - FIRST 4 BYTES READ FROM RECORD'//
225 .
' NOT "BUFR", DOES NOT CONTAIN BUFR DATA')
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 cktaba(LUN, SUBSET, JDATE, IRET)
THIS SUBROUTINE PARSES THE TABLE A MNEMONIC AND THE DATE OUT OF SECTION 1 OF A BUFR MESSAGE PREVIOUSL...
function ichkstr(STR, CHR, N)
THIS FUNCTION COMPARES A SPECIFIED NUMBER OF CHARACTERS FROM AN INPUT CHARACTER ARRAY AGAINST THE SAM...
subroutine reads3(LUN)
THIS SUBROUTINE READS THE SECTION 3 DESCRIPTORS FROM THE BUFR MESSAGE IN MBAY(1,LUN).
subroutine dxinit(LUN, IOI)
THIS SUBROUTINE INITIALIZES THE INTERNAL ARRAYS (IN MODULE TABABD) HOLDING THE DICTIONARY TABLE...
subroutine readerme(MESG, LUNIT, SUBSET, JDATE, IRET)
This subroutine is similar to subroutine readmg(), except that it reads a BUFR message from an array ...
function idxmsg(MESG)
THIS FUNCTION DETERMINES WHETHER THE GIVEN BUFR MESSAGE IS A DX DICTIONARY MESSAGE THAT WAS CREATED B...
subroutine wtstat(LUNIT, LUN, IL, IM)
This subroutine can be used to connect or disconnect a specified Fortran logical unit number to/from ...
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
subroutine makestab
THIS SUBROUTINE CONSTRUCTS AN INTERNAL JUMP/LINK TABLE WITHIN MODULE TABLES, USING THE INFORMATION WI...
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
subroutine stbfdx(LUN, MESG)
THIS SUBROUTINE COPIES A BUFR TABLE (DICTIONARY) MESSAGE FROM THE INPUT ARRAY MESG INTO THE INTERNAL ...
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
This module contains array and variable declarations used to store BUFR messages internally for multi...