38 recursive subroutine ufbmem(lunit,inew,iret,iunit)
42 use modv_vars,
only: im8b, maxmem, maxmsg, iprt
49 integer,
intent(in) :: lunit, inew
50 integer,
intent(out) :: iret, iunit
51 integer my_lunit, my_inew, iflg, itim, lun, il, im, itemp, ier, nmsg, lmem, i, mlast0,
idxmsg,
nmwrd,
bort_target_set
53 character*128 bort_str, errstr
59 call x84(lunit,my_lunit,1)
60 call x84(inew,my_inew,1)
61 call ufbmem(my_lunit,my_inew,iret,iunit)
63 call x48(iunit,iunit,1)
78 call openbf(lunit,
'IN',lunit)
100 call status(lunit,lun,il,im)
114 write(bort_str,
'("BUFRLIB: UFBMEM - ERROR READING MESSAGE NUMBER",I5," INTO MEMORY FROM UNIT",I3)') nmsg+1,lunit
127 if(nmsg>maxmsg) iflg = 1
129 if(lmem+
mlast>maxmem) iflg = 2
150 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
151 write ( unit=errstr, fmt=
'(A,A,I8,A)' )
'BUFRLIB: UFBMEM - THE NO. OF MESSAGES REQUIRED TO STORE ', &
152 'ALL MESSAGES INTERNALLY EXCEEDS MAXIMUM (', maxmsg,
') - INCOMPLETE READ'
154 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEM STORED ',
msgp(0),
' MESSAGES OUT OF ', nmsg,
'<<<'
156 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEM STORED ', mlast0,
' BYTES OUT OF ',
mlast,
'<<<'
158 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
167 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
168 write ( unit=errstr, fmt=
'(A,A,I8,A)' )
'BUFRLIB: UFBMEM - THE NO. OF BYTES REQUIRED TO STORE ', &
169 'ALL MESSAGES INTERNALLY EXCEEDS MAXIMUM (', maxmem,
') - INCOMPLETE READ'
171 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEM STORED ', mlast0,
' BYTES OUT OF ',
mlast,
'<<<'
173 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEM STORED ',
msgp(0),
' MESSAGES OUT OF ', nmsg,
'<<<'
175 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
220 recursive subroutine ufbmex(lunit,lundx,inew,iret,mesg)
224 use modv_vars,
only: im8b, maxmem, maxmsg, iprt
231 character*128 bort_str, errstr
233 integer,
intent(in) :: lunit, lundx, inew
234 integer,
intent(out) :: mesg(*), iret
235 integer my_lunit, my_lundx, my_inew, nmesg, iflg, itim, ier, nmsg, lmem, i, mlast0,
iupbs01,
nmwrd,
bort_target_set
241 call x84(lunit,my_lunit,1)
242 call x84(lundx,my_lundx,1)
243 call x84(inew,my_inew,1)
248 call x84(mesg(1),mesg(1),nmesg)
250 call ufbmex(my_lunit,my_lundx,my_inew,iret,mesg(1))
251 call x48(mesg(1),mesg(1),nmesg+iret)
252 call x48(iret,iret,1)
267 call openbf(lunit,
'IN',lundx)
296 write(bort_str,
'("BUFRLIB: UFBMEX - ERROR READING MESSAGE NUMBER",I5," INTO MEMORY FROM UNIT",I3)') nmsg+1,lunit
302 if(nmsg>maxmsg) iflg = 1
304 if(lmem+
mlast>maxmem) iflg = 2
325 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
326 write ( unit=errstr, fmt=
'(A,A,I8,A)' )
'BUFRLIB: UFBMEX - THE NO. OF MESSAGES REQUIRED TO STORE ', &
327 'ALL MESSAGES INTERNALLY EXCEEDS MAXIMUM (', maxmsg,
') - INCOMPLETE READ'
329 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEX STORED ',
msgp(0),
' MESSAGES OUT OF ', nmsg,
'<<<'
331 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEX STORED ', mlast0,
' BYTES OUT OF ',
mlast,
'<<<'
333 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
342 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
343 write ( unit=errstr, fmt=
'(A,A,I8,A)' )
'BUFRLIB: UFBMEX - THE NO. OF BYTES REQUIRED TO STORE ', &
344 'ALL MESSAGES INTERNALLY EXCEEDS MAXIMUM (', maxmem,
') - INCOMPLETE READ'
346 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEX STORED ', mlast0,
' BYTES OUT OF ',
mlast,
'<<<'
348 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEX STORED ',
msgp(0),
' MESSAGES OUT OF ', nmsg,
'<<<'
350 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
391 recursive subroutine readmm(imsg,subset,jdate,iret)
393 use modv_vars,
only: im8b
397 integer,
intent(inout) :: imsg
398 integer,
intent(out) :: jdate, iret
400 character*8,
intent(out) :: subset
406 call x84(imsg,imsg,1)
407 call readmm(imsg,subset,jdate,iret)
408 call x48(imsg,imsg,1)
409 call x48(jdate,jdate,1)
410 call x48(iret,iret,1)
415 call rdmemm(imsg,subset,jdate,iret)
441 recursive integer function ireadmm(imsg,subset,idate)
result(iret)
443 use modv_vars,
only: im8b
447 integer,
intent(inout) :: imsg
448 integer,
intent(out) :: idate
450 character*8,
intent(out) :: subset
456 call x84(imsg,imsg,1)
457 iret=
ireadmm(imsg,subset,idate)
458 call x48(imsg,imsg,1)
459 call x48(idate,idate,1)
464 call readmm(imsg,subset,idate,iret)
492 recursive subroutine rdmemm(imsg,subset,jdate,iret)
496 use modv_vars,
only: im8b, iprt
505 integer,
intent(in) :: imsg
506 integer,
intent(out) :: jdate, iret
507 integer my_imsg, lun, il, im, ii, jj, kk, nwrd, iptr, lptr, ier,
bort_target_set
509 character*128 bort_str, errstr
510 character*8,
intent(out) :: subset
519 call x84(imsg,my_imsg,1)
520 call rdmemm(my_imsg,subset,jdate,iret)
521 call x48(jdate,jdate,1)
522 call x48(iret,iret,1)
531 subset(1:8) = csubset(1:8)
542 if(imsg==0 .or.imsg>
msgp(0))
then
545 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
547 errstr =
'BUFRLIB: RDMEMM - REQUESTED MEMORY MESSAGE NUMBER {FIRST (INPUT) ARGUMENT} IS 0, RETURN WITH IRET = -1'
549 write ( unit=errstr, fmt=
'(A,I6,A,I6,A)' )
'BUFRLIB: RDMEMM - REQ. MEMORY MESSAGE #', imsg, &
550 ' {= 1ST (INPUT) ARG.} > # OF MESSAGES IN MEMORY (',
msgp(0),
'), RETURN WITH IRET = -1'
553 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
564 do while ((.not.known).and.(jj>=1))
565 if (
ipmsgs(jj)<=imsg)
then
572 write(bort_str,
'("BUFRLIB: RDMEMM - UNKNOWN DX TABLE FOR REQUESTED MESSAGE #",I5)') imsg
583 call errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++')
584 write ( unit=errstr, fmt=
'(A,I3,A,I3,A,I6)' )
'BUFRLIB: RDMEMM - RESETTING TO USE DX TABLE #', jj, &
585 ' INSTEAD OF DX TABLE #',
ldxts,
' FOR REQUESTED MESSAGE #', imsg
587 call errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++')
615 if(imsg<
msgp(0)) lptr =
msgp(imsg+1)-iptr
625 call cktaba(lun,subset,jdate,ier)
652 use modv_vars,
only: im8b, iprt
661 integer,
intent(in) :: isub
662 integer,
intent(out) :: iret
665 character*128 bort_str, errstr
671 call x84(isub,my_isub,1)
673 call x48(iret,iret,1)
689 if(im==0)
call bort(
'BUFRLIB: RDMEMS - A MEMORY MESSAGE MUST BE OPEN IN INPUT BUFR FILE, NONE ARE')
690 if(
nsub(lun)/=0)
then
691 write(bort_str,
'("BUFRLIB: RDMEMS - UPON ENTRY, SUBSET POINTER IN MEMORY MESSAGE IS NOT AT BEGINNING (",I3," '// &
692 'SUBSETS HAVE BEEN READ, SHOULD BE 0)")')
nsub(lun)
696 if(isub>
msub(lun))
then
698 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
699 write ( unit=errstr, fmt=
'(A,I5,A,A,I5,A)' )
'BUFRLIB: RDMEMS - REQ. SUBSET #', isub,
' (= 1st INPUT ', &
700 'ARG.) > # OF SUBSETS IN MEMORY MESSAGE (',
msub(lun),
')'
702 call errwrt(
'RETURN WITH IRET = -1')
703 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
720 elseif(
msgunp(lun)==1)
then
733 if(iret/=0)
call bort(
'BUFRLIB: RDMEMS - CALL TO ROUTINE READSB RETURNED WITH IRET = -1 (EITHER MEMORY MESSAGE '// &
734 'NOT OPEN OR ALL SUBSETS IN MESSAGE READ')
753 use modv_vars,
only: mxdxts, iprt
760 integer,
intent(in) :: lunit
761 integer ict, lun, il, im, ier, j, lmem, idxmsg, iupbs3, nmwrd
767 if (
ndxts >= mxdxts )
call bort(
'BUFRLIB: CPDXMM - MXDXTS OVERFLOW')
771 call status(lunit,lun,il,im)
775 do while ( .not. done )
777 if ( ier == -2 )
call bort(
'BUFRLIB: CPDXMM - UNEXPECTED READ ERROR')
778 if ( ier == -1 )
then
786 else if ( idxmsg(
mgwa) /= 1 )
then
793 else if ( iupbs3(
mgwa,
'nsub') == 0 )
then
804 if ( (
ndxm + ict ) >
mxdxm )
call bort(
'BUFRLIB: CPDXMM - MXDXM OVERFLOW')
807 if ( (
ldxm + lmem ) >
mxdxw )
call bort(
'BUFRLIB: CPDXMM - MXDXW OVERFLOW')
823 if ( iprt >= 2 )
then
824 call errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++')
825 write ( unit=errstr, fmt=
'(A,I3,A,I3,A)')
'BUFRLIB: CPDXMM - STORED NEW DX TABLE #',
ndxts, &
826 ' CONSISTING OF ', ict,
' MESSAGES'
828 call errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++')
857 recursive subroutine ufbmms(imsg,isub,subset,jdate)
861 use modv_vars,
only: im8b
868 integer,
intent(in) :: imsg, isub
869 integer,
intent(out) :: jdate
872 character*8,
intent(out) :: subset
873 character*128 bort_str
880 call x84(imsg,my_imsg,1)
881 call x84(isub,my_isub,1)
882 call ufbmms(my_imsg,my_isub,subset,jdate)
883 call x48(jdate,jdate,1)
892 subset(1:8) = csubset(1:8)
899 call rdmemm(imsg,subset,jdate,iret)
902 write(bort_str,
'("BUFRLIB: UFBMMS - REQUESTED MEMORY MESSAGE NUMBER TO READ IN (",I5,") EXCEEDS THE NUMBER OF '// &
903 'MESSAGES IN MEMORY (",I5,")")') imsg,
msgp(0)
905 write(bort_str,
'("BUFRLIB: UFBMMS - REQUESTED MEMORY MESSAGE NUMBER TO READ IN IS ZERO - THIS IS NOT VALID")')
912 write(bort_str,
'("BUFRLIB: UFBMMS - REQ. SUBSET NUMBER TO READ IN (",I3,") EXCEEDS THE NUMBER OF SUBSETS (",I3,") '// &
913 'IN THE REG. MEMORY MESSAGE (",I5,")")') isub,
msub(lun),imsg
937 recursive subroutine ufbmns(irep,subset,idate)
941 use modv_vars,
only: im8b
947 integer,
intent(in) :: irep
948 integer,
intent(out) :: idate
951 character*8,
intent(out) :: subset
952 character*128 bort_str
959 call x84(irep,my_irep,1)
960 call ufbmns(my_irep,subset,idate)
961 call x48(idate,idate,1)
970 subset(1:8) = csubset(1:8)
980 do while(
ireadmm(imsg,subset,idate)==0)
982 call rdmems(irep-jrep,iret)
988 write(bort_str,
'("BUFRLIB: UFBMNS - REQ. SUBSET NO. TO READ IN (",I5,") EXCEEDS TOTAL NO. OF SUBSETS IN THE COLLECTION '// &
989 'OF MEMORY MESSAGES (",I5,")")') irep,jrep
1012 recursive subroutine ufbrms(imsg,isub,usr,i1,i2,iret,str)
1016 use modv_vars,
only: im8b, iprt
1023 integer,
intent(in) :: imsg, isub, i1, i2
1024 integer,
intent(out) :: iret
1025 integer my_imsg, my_isub, my_i1, my_i2, jdate, lun, il, im, lcstr,
bort_target_set
1027 real*8,
intent(out) :: usr(i1,i2)
1029 character*(*),
intent(in) :: str
1030 character*128 bort_str, errstr
1038 call x84(imsg,my_imsg,1)
1039 call x84(isub,my_isub,1)
1040 call x84(i1,my_i1,1)
1041 call x84(i2,my_i2,1)
1042 call ufbrms(my_imsg,my_isub,usr,my_i1,my_i2,iret,str)
1043 call x48(iret,iret,1)
1050 call strsuc(str,cstr,lcstr)
1059 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
1060 errstr = .LE.
'BUFRLIB: UFBRMS - 4th ARG. (INPUT) IS 0, SO RETURN WITH 6th ARG. (IRET) = 0; 7th ARG. (STR) ='
1063 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
1069 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
1070 errstr = .LE.
'BUFRLIB: UFBRMS - 5th ARG. (INPUT) IS 0, SO RETURN WITH 6th ARG. (IRET) = 0; 7th ARG. (STR) ='
1073 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
1081 call rdmemm(imsg,subset,jdate,iret)
1084 write(bort_str,
'("BUFRLIB: UFBRMS - REQUESTED MEMORY MESSAGE NUMBER TO READ IN (",I5,") EXCEEDS THE NUMBER OF '// &
1085 'MESSAGES IN MEMORY (",I5,")")') imsg,
msgp(0)
1087 write(bort_str,
'("BUFRLIB: UFBRMS - REQUESTED MEMORY MESSAGE NUMBER TO READ IN IS ZERO - THIS IS NOT VALID")')
1094 write(bort_str,
'("BUFRLIB: UFBRMS - REQ. SUBSET NUMBER TO READ IN (",I3,") EXCEEDS THE NUMBER OF SUBSETS (",I3,") '// &
1095 'IN THE REG. MEMORY MESSAGE (",I5,")")') isub,
msub(lun),imsg
1145 recursive subroutine ufbtam(tab,i1,i2,iret,str)
1149 use modv_vars,
only: im8b, bmiss, iprt
1159 character*(*),
intent(in) :: str
1160 character*128 bort_str, errstr
1162 character*10 tgs(100)
1163 character*8 subset, cval
1166 integer,
intent(in) :: i1, i2
1167 integer,
intent(out) :: iret
1168 integer maxtg, nnod, ncon, nods, nodc, ivls, kons, my_i1, my_i2, i, irec, isub, itbl, lun, il, im, jdate, mret, &
1169 kbit, mbit, nbit, n, node, imsg, kmsg, nrep, ntg, nbyt, nbmp,
nmsub, lcstr,
bort_target_set
1171 real*8,
intent(out) :: tab(i1,i2)
1174 common /usrstr/ nnod,ncon,nods(20),nodc(10),ivls(10),kons(10)
1176 equivalence(cval,rval)
1181 mps(node) = 2_8**(
ibt(node))-1
1187 call x84(i1,my_i1,1)
1188 call x84(i2,my_i2,1)
1189 call ufbtam(tab,my_i1,my_i2,iret,str)
1190 call x48(iret,iret,1)
1197 call strsuc(str,cstr,lcstr)
1205 if(
msgp(0)==0)
return
1207 tab(1:i1,1:i2) = bmiss
1211 call parstr(str,tgs,maxtg,ntg,
' ',.true.)
1216 if(tgs(i)==
'IREC') irec = i
1217 if(tgs(i)==
'ISUB') isub = i
1218 if(tgs(i)==
'ITBL') itbl = i
1225 outer:
do imsg=1,
msgp(0)
1226 call rdmemm(imsg,subset,jdate,mret)
1228 write(bort_str,
'("BUFRLIB: UFBTAM - HIT END-OF-FILE READING MESSAGE NUMBER",I5," IN INTERNAL MEMORY")') imsg
1232 call string(str,lun,i1,0)
1233 if(irec>0) nods(irec) = 0
1234 if(isub>0) nods(isub) = 0
1235 if(itbl>0) nods(itbl) = 0
1242 call rdmemm(0,subset,jdate,mret)
1245 call rdmemm(kmsg,subset,jdate,mret)
1247 write(bort_str,
'("BUFRLIB: UFBTAM - HIT END-OF-FILE READING MESSAGE NUMBER",I5," IN INTERNAL MEMORY")') kmsg
1253 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
1254 write ( unit=errstr, fmt=
'(A,A,I8,A,A)' )
'BUFRLIB: UFBTAM - THE NO. OF DATA SUBSETS IN MEMORY ', &
1255 .GT.
'IS LIMIT OF ', i2,
' IN THE 3RD ARG. (INPUT) - INCOMPLETE READ'
1257 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBTAM STORED ', iret,
' REPORTS OUT OF ', nrep,
'<<<'
1259 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
1268 nods(i) = abs(nods(i))
1272 mbit =
mbyt(lun)*8+16
1276 inner:
do while(n+1<=
nval(lun))
1281 if(
itp(node)==1)
then
1282 call upb8(ival,nbit,mbit,
mbay(1,lun))
1287 if(nods(i)==node)
then
1288 if(
itp(node)==1)
then
1289 call upb8(ival,nbit,mbit,
mbay(1,lun))
1291 elseif(
itp(node)==2)
then
1292 call upb8(ival,nbit,mbit,
mbay(1,lun))
1293 if(ival<mps(node)) tab(i,iret) =
ups(ival,node)
1294 elseif(
itp(node)==3)
then
1297 call upc(cval,nbit/8,
mbay(1,lun),kbit,.true.)
1305 if(nods(i)>0) cycle inner
1315 if(irec>0) tab(irec,iret) =
nmsg(lun)
1316 if(isub>0) tab(isub,iret) =
nsub(lun)
1317 if(itbl>0) tab(itbl,iret) =
ldxts
1323 call rdmemm(0,subset,jdate,mret)
recursive subroutine bort(str)
Log an error message, then either return to or abort the application program.
subroutine bort_target_unset
Clear any existing bort target.
integer function bort_target_set()
Sets a new bort target, if bort catching is enabled and such a target doesn't already exist.
subroutine upb(nval, nbits, ibay, ibit)
Decode an integer value from within a specified number of bits of an integer array,...
subroutine upb8(nval, nbits, ibit, ibay)
Decode an 8-byte integer value from within a specified number of bits of an integer array,...
real *8 function ups(ival, node)
Unpack a real*8 value from an integer by applying the proper scale and reference values.
recursive integer function iupb(mbay, nbyt, nbit)
Decode 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 within a specified number of bytes of an integer array,...
subroutine stbfdx(lun, mesg)
Copy a DX BUFR tables message into the internal memory arrays in module moda_tababd.
subroutine dxinit(lun, ioi)
Clear out the internal arrays (in module moda_tababd) holding the DX BUFR table, then optionally init...
integer function idxmsg(mesg)
Check whether a BUFR message contains DX BUFR tables information that was generated by the NCEPLIBS-b...
subroutine errwrt(str)
Specify a custom location for the logging of error and diagnostic messages generated by the NCEPLIBS-...
subroutine makestab
Build the entire internal jump/link table within module moda_tables, using all of the internal BUFR t...
recursive subroutine rdmems(isub, iret)
Read a specified data subset from the BUFR message that was most recently read via a call to subrouti...
subroutine cpdxmm(lunit)
Read an entire DX BUFR table from a specified file into internal memory arrays.
recursive subroutine rdmemm(imsg, subset, jdate, iret)
Read a specified BUFR message from internal arrays in memory, so that it is now in scope for processi...
recursive subroutine ufbmem(lunit, inew, iret, iunit)
Connect a new file to the NCEPLIBS-bufr software for input operations, then read the entire file cont...
recursive subroutine readmm(imsg, subset, jdate, iret)
Read a specified BUFR message from internal arrays in memory, so that it is now in scope for processi...
recursive subroutine ufbmex(lunit, lundx, inew, iret, mesg)
Connect a new file to the NCEPLIBS-bufr software for input operations, then read the entire file cont...
recursive subroutine ufbmns(irep, subset, idate)
Read a specified data subset from internal arrays in memory, so that it is now in scope for processin...
recursive subroutine ufbrms(imsg, isub, usr, i1, i2, iret, str)
Read one or more data values from a data subset in internal arrays.
recursive subroutine ufbtam(tab, i1, i2, iret, str)
Read through every data subset in internal arrays and return one or more specified data values from e...
recursive subroutine ufbmms(imsg, isub, subset, jdate)
Read a specified data subset from internal arrays.
recursive integer function ireadmm(imsg, subset, idate)
Call subroutine readmm() and pass back its return code as the function value.
subroutine strsuc(str1, str2, lens)
Remove leading and trailing blanks from a character string.
Wrap C NCEPLIBS-bufr functions so they can be called from within the Fortran part of the library.
Declare arrays and variables used to store BUFR messages internally for multiple file IDs.
integer ibit
Bit pointer within ibay.
integer, dimension(:,:), allocatable mbay
Current BUFR message for each file ID.
integer, dimension(:), allocatable mbyt
Length (in bytes) of current BUFR message for each file ID.
Declare an array used by various subroutines and functions to hold a temporary working copy of a BUFR...
integer, dimension(:), allocatable mgwa
Temporary working copy of BUFR message.
Declare arrays used to store information about the current BUFR message that is in the process of bei...
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.
Declare arrays and variables used to store the contents of one or more BUFR files within internal mem...
integer, dimension(:), allocatable msgp
Pointers to the beginning of each message within msgs (up to a maximum of maxmsg, and where array ele...
integer, dimension(:), allocatable ipmsgs
Pointers to first message within msgs for which each DX BUFR table applies.
integer, dimension(:), allocatable msgs
BUFR messages read from one or more BUFR files.
integer, dimension(:), allocatable icdxts
Number of consecutive messages within mdx which constitute each DX BUFR table, beginning with the cor...
integer mxdxm
Maximum number of DX BUFR table messages that can be stored within mdx.
integer, dimension(:), allocatable ifdxts
Pointers to the beginning of each DX BUFR table within mdx.
integer munit
Fortran logical unit number for use in accessing contents of BUFR files within internal memory.
integer ndxm
Number of DX BUFR table messages stored within mdx (up to a maximum of mxdxm).
integer ldxm
Number of array elements filled within mdx (up to a maximum of mxdxw).
integer mlast
Number of array elements filled within msgs (up to a maximum of maxmem).
integer ldxts
Number of DX BUFR table that is currently in scope, depending on which BUFR message within msgs is cu...
integer ndxts
Number of DX BUFR tables represented by the messages within mdx (up to a maximum of mxdxts).
integer, dimension(:), allocatable mdx
DX BUFR table messages read from one or more BUFR files, for use in decoding the messages in msgs.
integer mxdxw
Maximum number of entries that can be stored within mdx.
integer, dimension(:), allocatable ipdxm
Pointers to the beginning of each message within mdx.
Declare arrays and variables 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:
Declare an array used to store, for each file ID from which a BUFR message is currently being read as...
integer, dimension(:), allocatable msgunp
Flag indicating how to unpack data subsets from BUFR message:
Declare arrays used to store data values and associated metadata for the current BUFR data subset in ...
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...
recursive subroutine closbf(lunit)
Close the connection between logical unit lunit and the NCEPLIBS-bufr software.
recursive subroutine openbf(lunit, io, lundx)
Connect a new file to the NCEPLIBS-bufr software for input or output operations, or initialize the li...
recursive subroutine status(lunit, lun, il, im)
Check whether a specified Fortran logical unit number is currently connected to the NCEPLIBS-bufr sof...
subroutine wtstat(lunit, lun, il, im)
Update file status in library internals.
recursive integer function nmsub(lunit)
Get the total number of data subsets available within the BUFR message that was most recently opened ...
integer function nmwrd(mbay)
Given an integer array containing Section 0 from a BUFR message, determine the array size (in integer...
subroutine rdmsgw(lunit, mesg, iret)
Read the next BUFR message from logical unit lunit as an array of integer words.
subroutine usrtpl(lun, invn, nbmp)
Expand a subset template within internal arrays.
recursive subroutine readsb(lunit, iret)
Read the next data subset from a BUFR message.
recursive subroutine ufbint(lunin, usr, i1, i2, iret, str)
Read or write one or more data values from or to a data subset.
subroutine cktaba(lun, subset, jdate, iret)
Get the Table A mnemonic from Sections 1 and 3 of a BUFR message.
recursive integer function iupbs01(mbay, s01mnem)
Read a specified value from within Section 0 or Section 1 of a BUFR message.
subroutine parstr(str, tags, mtag, ntag, sep, limit80)
Parse a string containing one or more substrings into an array of substrings.
subroutine string(str, lun, i1, io)
Check whether a string is in the internal mnemonic string cache.
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.