25 RECURSIVE SUBROUTINE rdmems(ISUB,IRET)
33 CHARACTER*128 bort_str,errstr
46 CALL x84(isub,my_isub,1)
61 IF(
nsub(lun).NE.0)
GOTO 903
63 IF(isub.GT.
msub(lun))
THEN
65 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
66 WRITE ( unit=errstr, fmt=
'(A,I5,A,A,I5,A)' )
67 .
'BUFRLIB: RDMEMS - REQ. SUBSET #', isub,
' (= 1st INPUT ',
68 .
'ARG.) > # OF SUBSETS IN MEMORY MESSAGE (',
msub(lun),
')'
70 CALL errwrt(
'RETURN WITH IRET = -1')
71 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
89 ELSEIF(
msgunp(lun).EQ.1)
THEN
94 ELSEIF(
msgunp(lun).EQ.2)
THEN
105 IF(iret.NE.0)
GOTO 904
117 900
CALL bort(
'BUFRLIB: RDMEMS - INPUT BUFR FILE IS CLOSED, IT '//
118 .
'MUST BE OPEN FOR INPUT')
119 901
CALL bort(
'BUFRLIB: RDMEMS - INPUT BUFR FILE IS OPEN FOR '//
120 .
'OUTPUT, IT MUST BE OPEN FOR INPUT')
121 902
CALL bort(
'BUFRLIB: RDMEMS - A MEMORY MESSAGE MUST BE OPEN IN '//
122 .
'INPUT BUFR FILE, NONE ARE')
123 903
WRITE(bort_str,
'("BUFRLIB: RDMEMS - UPON ENTRY, SUBSET POINTER '//
124 .
'IN MEMORY MESSAGE IS NOT AT BEGINNING (",I3," SUBSETS HAVE '//
125 .
'BEEN READ, SHOULD BE 0)")')
nsub(lun)
127 904
CALL bort(
'BUFRLIB: RDMEMS - CALL TO ROUTINE READSB RETURNED '//
128 .
'WITH IRET = -1 (EITHER MEMORY MESSAGE NOT OPEN OR ALL '//
129 .
'SUBSETS IN MESSAGE READ')
subroutine bort(STR)
Log one error message and abort application program.
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
recursive function iupb(MBAY, NBYT, NBIT)
Decode an integer value from an integer array.
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.
integer, dimension(:), allocatable mbyt
Length (in bytes) of current BUFR message for each internal I/O stream.
This module contains declarations for arrays used to store information about the current BUFR message...
integer, dimension(:), allocatable msub
Total number of data subsets in message.
integer, dimension(:), allocatable nsub
Current subset pointer within message.
This module contains array and variable declarations used to store the contents of one or more BUFR f...
integer munit
Fortran logical unit number for use in accessing contents of BUFR files within internal memory.
This module contains an array declaration used to store, for each I/O stream index from which a BUFR ...
integer, dimension(:), allocatable msgunp
Flag indicating how to unpack data subsets from BUFR message:
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 rdmems(ISUB, IRET)
This subroutine reads a specified data subset from the BUFR message that was most recently read via a...
recursive subroutine readsb(LUNIT, IRET)
Read the next data subset from a BUFR message.
recursive subroutine status(LUNIT, LUN, IL, IM)
Check whether a specified Fortran logical unit number is currently connected to the NCEPLIBS-bufr sof...
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.