49 CHARACTER*128 bort_str,errstr
59 CALL
status(munit,lun,il,im)
63 IF(nsub(lun).NE.0) goto 903
65 IF(isub.GT.msub(lun))
THEN
67 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
68 WRITE ( unit=errstr, fmt=
'(A,I5,A,A,I5,A)' )
69 .
'BUFRLIB: RDMEMS - REQ. SUBSET #', isub,
' (= 1st INPUT ',
70 .
'ARG.) > # OF SUBSETS IN MEMORY MESSAGE (', msub(lun),
')'
72 CALL
errwrt(
'RETURN WITH IRET = -1')
73 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
86 IF(msgunp(lun).EQ.0)
THEN
89 mbyt(lun) = mbyt(lun) +
iupb(mbay(1,lun),mbyt(lun)+1,16)
91 ELSEIF(msgunp(lun).EQ.1)
THEN
96 ELSEIF(msgunp(lun).EQ.2)
THEN
107 IF(iret.NE.0) goto 904
119 900 CALL
bort(
'BUFRLIB: RDMEMS - INPUT BUFR FILE IS CLOSED, IT '//
120 .
'MUST BE OPEN FOR INPUT')
121 901 CALL
bort(
'BUFRLIB: RDMEMS - INPUT BUFR FILE IS OPEN FOR '//
122 .
'OUTPUT, IT MUST BE OPEN FOR INPUT')
123 902 CALL
bort(
'BUFRLIB: RDMEMS - A MEMORY MESSAGE MUST BE OPEN IN '//
124 .
'INPUT BUFR FILE, NONE ARE')
125 903
WRITE(bort_str,
'("BUFRLIB: RDMEMS - UPON ENTRY, SUBSET POINTER '//
126 .
'IN MEMORY MESSAGE IS NOT AT BEGINNING (",I3," SUBSETS HAVE '//
127 .
'BEEN READ, SHOULD BE 0)")') nsub(lun)
129 904 CALL
bort(
'BUFRLIB: RDMEMS - CALL TO ROUTINE READSB RETURNED '//
130 .
'WITH IRET = -1 (EITHER MEMORY MESSAGE NOT OPEN OR ALL '//
131 .
'SUBSETS IN MESSAGE READ')
function iupb(MBAY, NBYT, NBIT)
THIS FUNCTION UNPACKS AND RETURNS A BINARY INTEGER WORD CONTAINED WITHIN NBIT BITS OF A BUFR MESSAGE ...
This module contains array and variable declarations used to store the contents of one or more BUFR f...
subroutine rdmems(ISUB, IRET)
This subroutine reads a specified data subset from the BUFR message that was most recently read via a...
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
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...
subroutine readsb(LUNIT, IRET)
This subroutine reads the next data subset from a BUFR message into internal arrays.