38 recursive subroutine ufbmem(lunit,inew,iret,iunit)
42 use modv_vars,
only: im8b, maxmem, maxmsg
49 integer,
intent(in) :: lunit, inew
50 integer,
intent(out) :: iret, iunit
51 integer iprt, my_lunit, my_inew, iflg, itim, lun, il, im, itemp, ier, nmsg, lmem, i, mlast0,
idxmsg,
nmwrd
53 character*128 bort_str, errstr
62 call x84(lunit,my_lunit,1)
63 call x84(inew,my_inew,1)
64 call ufbmem(my_lunit,my_inew,iret,iunit)
66 call x48(iunit,iunit,1)
74 call openbf(lunit,
'IN',lunit)
96 call status(lunit,lun,il,im)
110 write(bort_str,
'("BUFRLIB: UFBMEM - ERROR READING MESSAGE NUMBER",I5," INTO MEMORY FROM UNIT",I3)') nmsg+1,lunit
123 if(nmsg>maxmsg) iflg = 1
125 if(lmem+
mlast>maxmem) iflg = 2
146 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
147 write ( unit=errstr, fmt=
'(A,A,I8,A)' )
'BUFRLIB: UFBMEM - THE NO. OF MESSAGES REQUIRED TO STORE ', &
148 'ALL MESSAGES INTERNALLY EXCEEDS MAXIMUM (', maxmsg,
') - INCOMPLETE READ'
150 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEM STORED ',
msgp(0),
' MESSAGES OUT OF ', nmsg,
'<<<'
152 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEM STORED ', mlast0,
' BYTES OUT OF ',
mlast,
'<<<'
154 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
163 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
164 write ( unit=errstr, fmt=
'(A,A,I8,A)' )
'BUFRLIB: UFBMEM - THE NO. OF BYTES REQUIRED TO STORE ', &
165 'ALL MESSAGES INTERNALLY EXCEEDS MAXIMUM (', maxmem,
') - INCOMPLETE READ'
167 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEM STORED ', mlast0,
' BYTES OUT OF ',
mlast,
'<<<'
169 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEM STORED ',
msgp(0),
' MESSAGES OUT OF ', nmsg,
'<<<'
171 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
216 recursive subroutine ufbmex(lunit,lundx,inew,iret,mesg)
218 use modv_vars,
only: im8b, maxmem, maxmsg
225 character*128 bort_str, errstr
227 integer,
intent(in) :: lunit(*), lundx(*), inew(*)
228 integer,
intent(out) :: mesg(*), iret(*)
229 integer iprt, my_lunit(1), my_lundx(1), my_inew(1), nmesg, iflg, itim, ier, nmsg, lmem, i, mlast0,
iupbs01,
nmwrd
238 call x84(lunit(1),my_lunit(1),1)
239 call x84(lundx(1),my_lundx(1),1)
240 call x84(inew(1),my_inew(1),1)
241 if (my_inew(1)==0)
then
245 call x84(mesg(1),mesg(1),nmesg)
247 call ufbmex(my_lunit(1),my_lundx(1),my_inew(1),iret(1),mesg(1))
248 call x48(mesg(1),mesg(1),nmesg+iret(1))
249 call x48(iret(1),iret(1),1)
257 call openbf(lunit(1),
'IN',lundx(1))
286 write(bort_str,
'("BUFRLIB: UFBMEX - ERROR READING MESSAGE NUMBER",I5," INTO MEMORY FROM UNIT",I3)') nmsg+1,lunit(1)
292 if(nmsg>maxmsg) iflg = 1
294 if(lmem+
mlast>maxmem) iflg = 2
315 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
316 write ( unit=errstr, fmt=
'(A,A,I8,A)' )
'BUFRLIB: UFBMEX - THE NO. OF MESSAGES REQUIRED TO STORE ', &
317 'ALL MESSAGES INTERNALLY EXCEEDS MAXIMUM (', maxmsg,
') - INCOMPLETE READ'
319 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEX STORED ',
msgp(0),
' MESSAGES OUT OF ', nmsg,
'<<<'
321 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEX STORED ', mlast0,
' BYTES OUT OF ',
mlast,
'<<<'
323 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
332 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
333 write ( unit=errstr, fmt=
'(A,A,I8,A)' )
'BUFRLIB: UFBMEX - THE NO. OF BYTES REQUIRED TO STORE ', &
334 'ALL MESSAGES INTERNALLY EXCEEDS MAXIMUM (', maxmem,
') - INCOMPLETE READ'
336 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEX STORED ', mlast0,
' BYTES OUT OF ',
mlast,
'<<<'
338 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBMEX STORED ',
msgp(0),
' MESSAGES OUT OF ', nmsg,
'<<<'
340 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
381 recursive subroutine readmm(imsg,subset,jdate,iret)
383 use modv_vars,
only: im8b
387 integer,
intent(inout) :: imsg
388 integer,
intent(out) :: jdate, iret
390 character*8,
intent(out) :: subset
397 call x84(imsg,imsg,1)
398 call readmm(imsg,subset,jdate,iret)
399 call x48(imsg,imsg,1)
400 call x48(jdate,jdate,1)
401 call x48(iret,iret,1)
407 call rdmemm(imsg,subset,jdate,iret)
433 recursive integer function ireadmm(imsg,subset,idate)
result(iret)
435 use modv_vars,
only: im8b
439 integer,
intent(inout) :: imsg
440 integer,
intent(out) :: idate
442 character*8,
intent(out) :: subset
449 call x84(imsg,imsg,1)
450 iret=
ireadmm(imsg,subset,idate)
451 call x48(imsg,imsg,1)
452 call x48(idate,idate,1)
458 call readmm(imsg,subset,idate,iret)
486 recursive subroutine rdmemm(imsg,subset,jdate,iret)
488 use modv_vars,
only: im8b
497 integer,
intent(in) :: imsg
498 integer,
intent(out) :: jdate, iret
499 integer iprt, my_imsg, lun, il, im, ii, jj, kk, nwrd, iptr, lptr, ier
501 character*128 bort_str, errstr
502 character*8,
intent(out) :: subset
513 call x84(imsg,my_imsg,1)
514 call rdmemm(my_imsg,subset,jdate,iret)
515 call x48(jdate,jdate,1)
516 call x48(iret,iret,1)
528 if(imsg==0 .or.imsg>
msgp(0))
then
531 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
533 errstr =
'BUFRLIB: RDMEMM - REQUESTED MEMORY MESSAGE NUMBER {FIRST (INPUT) ARGUMENT} IS 0, RETURN WITH IRET = -1'
535 write ( unit=errstr, fmt=
'(A,I6,A,I6,A)' )
'BUFRLIB: RDMEMM - REQ. MEMORY MESSAGE #', imsg, &
536 ' {= 1ST (INPUT) ARG.} > # OF MESSAGES IN MEMORY (',
msgp(0),
'), RETURN WITH IRET = -1'
539 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
550 do while ((.not.known).and.(jj>=1))
551 if (
ipmsgs(jj)<=imsg)
then
558 write(bort_str,
'("BUFRLIB: RDMEMM - UNKNOWN DX TABLE FOR REQUESTED MESSAGE #",I5)') imsg
569 call errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++')
570 write ( unit=errstr, fmt=
'(A,I3,A,I3,A,I6)' )
'BUFRLIB: RDMEMM - RESETTING TO USE DX TABLE #', jj, &
571 ' INSTEAD OF DX TABLE #',
ldxts,
' FOR REQUESTED MESSAGE #', imsg
573 call errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++')
601 if(imsg<
msgp(0)) lptr =
msgp(imsg+1)-iptr
611 call cktaba(lun,subset,jdate,ier)
636 use modv_vars,
only: im8b
645 integer,
intent(in) :: isub
646 integer,
intent(out) :: iret
647 integer my_isub, iprt, lun, il, im, mbym, nbyt, i,
iupb
649 character*128 bort_str, errstr
658 call x84(isub,my_isub,1)
660 call x48(iret,iret,1)
669 if(im==0)
call bort(
'BUFRLIB: RDMEMS - A MEMORY MESSAGE MUST BE OPEN IN INPUT BUFR FILE, NONE ARE')
670 if(
nsub(lun)/=0)
then
671 write(bort_str,
'("BUFRLIB: RDMEMS - UPON ENTRY, SUBSET POINTER IN MEMORY MESSAGE IS NOT AT BEGINNING (",I3," '// &
672 'SUBSETS HAVE BEEN READ, SHOULD BE 0)")')
nsub(lun)
676 if(isub>
msub(lun))
then
678 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
679 write ( unit=errstr, fmt=
'(A,I5,A,A,I5,A)' )
'BUFRLIB: RDMEMS - REQ. SUBSET #', isub,
' (= 1st INPUT ', &
680 'ARG.) > # OF SUBSETS IN MEMORY MESSAGE (',
msub(lun),
')'
682 call errwrt(
'RETURN WITH IRET = -1')
683 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
700 elseif(
msgunp(lun)==1)
then
713 if(iret/=0)
call bort(
'BUFRLIB: RDMEMS - CALL TO ROUTINE READSB RETURNED WITH IRET = -1 (EITHER MEMORY MESSAGE '// &
714 'NOT OPEN OR ALL SUBSETS IN MESSAGE READ')
733 use modv_vars,
only: mxdxts
740 integer,
intent(in) :: lunit
741 integer iprt, ict, lun, il, im, ier, j, lmem, idxmsg, iupbs3, nmwrd
749 if (
ndxts >= mxdxts )
call bort(
'BUFRLIB: CPDXMM - MXDXTS OVERFLOW')
753 call status(lunit,lun,il,im)
757 do while ( .not. done )
759 if ( ier == -2 )
call bort(
'BUFRLIB: CPDXMM - UNEXPECTED READ ERROR')
760 if ( ier == -1 )
then
768 else if ( idxmsg(
mgwa) /= 1 )
then
775 else if ( iupbs3(
mgwa,
'nsub') == 0 )
then
786 if ( (
ndxm + ict ) >
mxdxm )
call bort(
'BUFRLIB: CPDXMM - MXDXM OVERFLOW')
789 if ( (
ldxm + lmem ) >
mxdxw )
call bort(
'BUFRLIB: CPDXMM - MXDXW OVERFLOW')
805 if ( iprt >= 2 )
then
806 call errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++')
807 write ( unit=errstr, fmt=
'(A,I3,A,I3,A)')
'BUFRLIB: CPDXMM - STORED NEW DX TABLE #',
ndxts, &
808 ' CONSISTING OF ', ict,
' MESSAGES'
810 call errwrt(
'+++++++++++++++++++++++++++++++++++++++++++++')
839 recursive subroutine ufbmms(imsg,isub,subset,jdate)
841 use modv_vars,
only: im8b
848 integer,
intent(in) :: imsg, isub
849 integer,
intent(out) :: jdate
850 integer my_imsg, my_isub, lun, il, im, iret
852 character*8,
intent(out) :: subset
854 character*128 bort_str
861 call x84(imsg,my_imsg,1)
862 call x84(isub,my_isub,1)
863 call ufbmms(my_imsg,my_isub,subset,jdate)
864 call x48(jdate,jdate,1)
872 call rdmemm(imsg,subset,jdate,iret)
875 write(bort_str,
'("BUFRLIB: UFBMMS - REQUESTED MEMORY MESSAGE NUMBER TO READ IN (",I5,") EXCEEDS THE NUMBER OF '// &
876 'MESSAGES IN MEMORY (",I5,")")') imsg,
msgp(0)
878 write(bort_str,
'("BUFRLIB: UFBMMS - REQUESTED MEMORY MESSAGE NUMBER TO READ IN IS ZERO - THIS IS NOT VALID")')
885 write(bort_str,
'("BUFRLIB: UFBMMS - REQ. SUBSET NUMBER TO READ IN (",I3,") EXCEEDS THE NUMBER OF SUBSETS (",I3,") '// &
886 'IN THE REG. MEMORY MESSAGE (",I5,")")') isub,
msub(lun),imsg
910 recursive subroutine ufbmns(irep,subset,idate)
912 use modv_vars,
only: im8b
918 integer,
intent(in) :: irep
919 integer,
intent(out) :: idate
922 character*8,
intent(out) :: subset
924 character*128 bort_str
931 call x84(irep,my_irep,1)
932 call ufbmns(my_irep,subset,idate)
933 call x48(idate,idate,1)
944 do while(
ireadmm(imsg,subset,idate)==0)
946 call rdmems(irep-jrep,iret)
952 write(bort_str,
'("BUFRLIB: UFBMNS - REQ. SUBSET NO. TO READ IN (",I5,") EXCEEDS TOTAL NO. OF SUBSETS IN THE COLLECTION '// &
953 'OF MEMORY MESSAGES (",I5,")")') irep,jrep
976 recursive subroutine ufbrms(imsg,isub,usr,i1,i2,iret,str)
978 use modv_vars,
only: im8b
985 integer,
intent(in) :: imsg, isub, i1, i2
986 integer,
intent(out) :: iret
987 integer iprt, my_imsg, my_isub, my_i1, my_i2, jdate, lun, il, im
989 real*8,
intent(out) :: usr(i1,i2)
991 character*(*),
intent(in) :: str
992 character*128 bort_str, errstr
1002 call x84(imsg,my_imsg,1)
1003 call x84(isub,my_isub,1)
1004 call x84(i1,my_i1,1)
1005 call x84(i2,my_i2,1)
1006 call ufbrms(my_imsg,my_isub,usr,my_i1,my_i2,iret,str)
1007 call x48(iret,iret,1)
1016 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
1017 errstr = .LE.
'BUFRLIB: UFBRMS - 4th ARG. (INPUT) IS 0, SO RETURN WITH 6th ARG. (IRET) = 0; 7th ARG. (STR) ='
1020 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
1026 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
1027 errstr = .LE.
'BUFRLIB: UFBRMS - 5th ARG. (INPUT) IS 0, SO RETURN WITH 6th ARG. (IRET) = 0; 7th ARG. (STR) ='
1030 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
1038 call rdmemm(imsg,subset,jdate,iret)
1041 write(bort_str,
'("BUFRLIB: UFBRMS - REQUESTED MEMORY MESSAGE NUMBER TO READ IN (",I5,") EXCEEDS THE NUMBER OF '// &
1042 'MESSAGES IN MEMORY (",I5,")")') imsg,
msgp(0)
1044 write(bort_str,
'("BUFRLIB: UFBRMS - REQUESTED MEMORY MESSAGE NUMBER TO READ IN IS ZERO - THIS IS NOT VALID")')
1051 write(bort_str,
'("BUFRLIB: UFBRMS - REQ. SUBSET NUMBER TO READ IN (",I3,") EXCEEDS THE NUMBER OF SUBSETS (",I3,") '// &
1052 'IN THE REG. MEMORY MESSAGE (",I5,")")') isub,
msub(lun),imsg
1102 recursive subroutine ufbtam(tab,i1,i2,iret,str)
1104 use modv_vars,
only: im8b, bmiss
1114 character*(*),
intent(in) :: str
1115 character*128 bort_str, errstr
1116 character*10 tgs(100)
1117 character*8 subset, cval
1120 integer,
intent(in) :: i1, i2
1121 integer,
intent(out) :: iret
1122 integer iprt, maxtg, nnod, ncon, nods, nodc, ivls, kons, my_i1, my_i2, i, j, irec, isub, itbl, lun, il, im, jdate, mret, &
1123 kbit, mbit, nbit, n, node, imsg, kmsg, nrep, ntg, nbyt, nbmp,
nmsub
1125 real*8,
intent(out) :: tab(i1,i2)
1128 common /usrstr/ nnod,ncon,nods(20),nodc(10),ivls(10),kons(10)
1131 equivalence(cval,rval)
1136 mps(node) = 2_8**(
ibt(node))-1
1143 call x84(i1,my_i1,1)
1144 call x84(i2,my_i2,1)
1145 call ufbtam(tab,my_i1,my_i2,iret,str)
1146 call x48(iret,iret,1)
1154 if(
msgp(0)==0)
return
1164 call parstr(str,tgs,maxtg,ntg,
' ',.true.)
1169 if(tgs(i)==
'IREC') irec = i
1170 if(tgs(i)==
'ISUB') isub = i
1171 if(tgs(i)==
'ITBL') itbl = i
1178 outer:
do imsg=1,
msgp(0)
1179 call rdmemm(imsg,subset,jdate,mret)
1181 write(bort_str,
'("BUFRLIB: UFBTAM - HIT END-OF-FILE READING MESSAGE NUMBER",I5," IN INTERNAL MEMORY")') imsg
1185 call string(str,lun,i1,0)
1186 if(irec>0) nods(irec) = 0
1187 if(isub>0) nods(isub) = 0
1188 if(itbl>0) nods(itbl) = 0
1195 call rdmemm(0,subset,jdate,mret)
1198 call rdmemm(kmsg,subset,jdate,mret)
1200 write(bort_str,
'("BUFRLIB: UFBTAM - HIT END-OF-FILE READING MESSAGE NUMBER",I5," IN INTERNAL MEMORY")') kmsg
1206 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
1207 write ( unit=errstr, fmt=
'(A,A,I8,A,A)' )
'BUFRLIB: UFBTAM - THE NO. OF DATA SUBSETS IN MEMORY ', &
1208 .GT.
'IS LIMIT OF ', i2,
' IN THE 3RD ARG. (INPUT) - INCOMPLETE READ'
1210 write ( unit=errstr, fmt=
'(A,I8,A,I8,A)' )
'>>>UFBTAM STORED ', iret,
' REPORTS OUT OF ', nrep,
'<<<'
1212 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
1221 nods(i) = abs(nods(i))
1225 mbit =
mbyt(lun)*8+16
1229 inner:
do while(n+1<=
nval(lun))
1234 if(
itp(node)==1)
then
1235 call upb8(ival,nbit,mbit,
mbay(1,lun))
1240 if(nods(i)==node)
then
1241 if(
itp(node)==1)
then
1242 call upb8(ival,nbit,mbit,
mbay(1,lun))
1244 elseif(
itp(node)==2)
then
1245 call upb8(ival,nbit,mbit,
mbay(1,lun))
1246 if(ival<mps(node)) tab(i,iret) =
ups(ival,node)
1247 elseif(
itp(node)==3)
then
1250 call upc(cval,nbit/8,
mbay(1,lun),kbit,.true.)
1258 if(nods(i)>0) cycle inner
1268 if(irec>0) tab(irec,iret) =
nmsg(lun)
1269 if(isub>0) tab(isub,iret) =
nsub(lun)
1270 if(itbl>0) tab(itbl,iret) =
ldxts
1276 call rdmemm(0,subset,jdate,mret)
subroutine bort(str)
Log an error message, then abort the application program.
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.
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.