54 RECURSIVE SUBROUTINE ufbtam(TAB,I1,I2,IRET,STR)
65 COMMON /usrstr/ nnod,ncon,nods(20),nodc(10),vals(10),kons(10)
69 CHARACTER*128 bort_str,errstr
71 CHARACTER*8 subset,cval
72 equivalence(cval,rval)
74 real*8 tab(i1,i2),rval,
ups
79 mps(node) = 2_8**(
ibt(node))-1
90 CALL ufbtam(tab,my_i1,my_i2,iret,str)
99 IF(
msgp(0).EQ.0)
GOTO 100
110 CALL parstr(str,tgs,maxtg,ntg,
' ',.true.)
115 IF(tgs(i).EQ.
'IREC') irec = i
116 IF(tgs(i).EQ.
'ISUB') isub = i
117 IF(tgs(i).EQ.
'ITBL') itbl = i
126 CALL rdmemm(imsg,subset,jdate,mret)
127 IF(mret.LT.0)
GOTO 900
130 IF(irec.GT.0) nods(irec) = 0
131 IF(isub.GT.0) nods(isub) = 0
132 IF(itbl.GT.0) nods(itbl) = 0
138 IF(iret+1.GT.i2)
GOTO 99
142 nods(i) = abs(nods(i))
146 mbit =
mbyt(lun)*8+16
150 20
IF(n+1.LE.
nval(lun))
THEN
155 IF(
itp(node).EQ.1)
THEN
156 CALL upb8(ival,nbit,mbit,
mbay(1,lun))
161 IF(nods(i).EQ.node)
THEN
162 IF(
itp(node).EQ.1)
THEN
163 CALL upb8(ival,nbit,mbit,
mbay(1,lun))
165 ELSEIF(
itp(node).EQ.2)
THEN
166 CALL upb8(ival,nbit,mbit,
mbay(1,lun))
167 IF(ival.LT.mps(node)) tab(i,iret) =
ups(ival,node)
168 ELSEIF(
itp(node).EQ.3)
THEN
171 CALL upc(cval,nbit/8,
mbay(1,lun),kbit,.true.)
179 IF(nods(i).GT.0)
GOTO 20
190 IF(irec.GT.0) tab(irec,iret) =
nmsg(lun)
191 IF(isub.GT.0) tab(isub,iret) =
nsub(lun)
192 IF(itbl.GT.0) tab(itbl,iret) =
ldxts
202 99
CALL rdmemm(0,subset,jdate,mret)
205 CALL rdmemm(imsg,subset,jdate,mret)
206 IF(mret.LT.0)
GOTO 900
210 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
211 WRITE ( unit=errstr, fmt=
'(A,A,I8,A,A)' )
212 .
'BUFRLIB: UFBTAM - THE NO. OF DATA SUBSETS IN MEMORY ',
213 . .GT.
'IS LIMIT OF ', i2,
' IN THE 3RD ARG. (INPUT) - ',
216 WRITE ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
217 .
'>>>UFBTAM STORED ', iret,
' REPORTS OUT OF ', nrep,
'<<<'
219 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
226 200
CALL rdmemm(0,subset,jdate,mret)
232 900
WRITE(bort_str,
'("BUFRLIB: UFBTAM - HIT END-OF-FILE READING '//
233 .
'MESSAGE NUMBER",I5," IN INTERNAL MEMORY")') imsg
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 ...
This module contains array and variable declarations used to store BUFR messages internally for multi...
integer ibit
Bit pointer within IBAY.
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 nmsg
Current message pointer within logical unit.
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, dimension(:), allocatable msgp
Pointers to the beginning of each message within msgs (up to a maximum of MAXMSG, and where array ele...
integer munit
Fortran logical unit number for use in accessing contents of BUFR files within internal memory.
integer ldxts
Number of DX BUFR table that is currently in scope, depending on which BUFR message within msgs is cu...
This module contains array and variable declarations used to store the internal jump/link table.
integer, dimension(:), allocatable ibt
Bit widths corresponding to tag and typ:
integer, dimension(:), allocatable itp
Integer type values corresponding to typ:
This module contains declarations for arrays used to store data values and associated metadata for th...
integer, dimension(:), allocatable nval
Number of data values in BUFR data subset.
integer, dimension(:,:), allocatable, target inv
Inventory pointer which links each data value to its corresponding node in the internal jump/link tab...
This module declares and initializes the BMISS variable.
real *8, public bmiss
Current placeholder value to represent "missing" data when reading from or writing to BUFR files; thi...
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 function nmsub(LUNIT)
This function returns the total number of data subsets available within the BUFR message that was mos...
subroutine parstr(STR, TAGS, MTAG, NTAG, SEP, LIMIT80)
Parse a string containing one or more substrings into an array of substrings.
recursive subroutine rdmemm(IMSG, SUBSET, JDATE, IRET)
This subroutine reads a specified BUFR message from internal arrays in memory, so that it is now in s...
recursive subroutine status(LUNIT, LUN, IL, IM)
Check whether a specified Fortran logical unit number is currently connected to the NCEPLIBS-bufr sof...
subroutine string(STR, LUN, I1, IO)
This subroutine checks to see if a user-specified character string is in the string cache (arrays in ...
recursive subroutine ufbtam(TAB, I1, I2, IRET, STR)
This subroutine reads through every data subset in internal arrays and returns one or more specified ...
subroutine upb8(nval, nbits, ibit, ibay)
This subroutine decodes an 8-byte integer value from within a specified number of bits of an integer ...
subroutine upb(NVAL, NBITS, IBAY, IBIT)
This subroutine decodes an integer value from within a specified number of bits of an integer array,...
subroutine upc(CHR, NCHR, IBAY, IBIT, CNVNULL)
Decode a character string from an integer array.
real *8 function ups(IVAL, NODE)
This function unpacks a real*8 user value from a packed BUFR integer by applying the proper scale and...
subroutine usrtpl(LUN, INVN, NBMP)
Store the subset template into internal arrays.
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.