24 use modv_vars,
only: bmiss, maxjl, nfiles, iprt
37 integer lunit, lundx, lun, lum, n, itba, inc, newn, noda, node, inod, icmpdx, ishrdx
39 character*128 bort_str, errstr
66 if(
iolun(lun)==0)
then
69 else if(
mtab(1,lun)==0)
then
75 else if(
lus(lun)>0)
then
79 if(icmpdx(
lus(lun),lun)==1)
then
85 else if(icmpdx(abs(
lus(lun)),lun)==1)
then
94 else if(
lus(lun)>0)
then
99 else if(
xtab(
lus(lun)) .and. (icmpdx(
lus(lun),lun)==0) )
then
108 do while ((lum<lun).and.(
lus(lun)==0))
109 if(ishrdx(lum,lun)==1)
then
123 if(
iomsg(lun)/=0)
then
130 inv(n,lun) =
inv(n,lun)+inc
139 nemo =
taba(itba,lun)(4:11)
141 mtab(itba,lun) = inod
144 else if(
xtab(
lus(lun)) .and. (icmpdx(
lus(lun),lun)==0) )
then
149 lunit = abs(
iolun(lun))
161 if(
typ(node)==
'SUB')
then
165 elseif(
typ(node)==
'SEQ')
then
169 elseif(
typ(node)==
'RPC')
then
173 elseif(
typ(node)==
'RPS')
then
177 elseif(
typ(node)==
'REP')
then
181 elseif(
typ(node)==
'DRS')
then
185 elseif(
typ(node)==
'DRP')
then
189 elseif(
typ(node)==
'DRB')
then
193 elseif(
typ(node)==
'NUM')
then
211 expand =
typ(n)==
'SUB' .or.
typ(n)==
'DRP' .or.
typ(n)==
'DRS' .or.
typ(n)==
'REP' .or.
typ(n)==
'DRB'
216 if(
typ(noda)==
'REP')
then
221 outer:
do while (.true.)
224 write(bort_str,
'("BUFRLIB: MAKESTAB - NUMBER OF JSEQ ENTRIES IN JUMP/LINK TABLE EXCEEDS THE LIMIT (",I6,")")') maxjl
229 inner:
do while (.true.)
230 if(
jump(node)*
knt(node)>0)
then
233 else if(
link(node)>0)
then
238 if(node==noda)
exit outer
240 write(bort_str,
'("BUFRLIB: MAKESTAB - NODE IS ZERO, FAILED TO CIRCULATE (TAG IS ",A,")")')
tag(n)
243 knt(node) = max(
knt(node)-1,0)
254 call errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
256 write ( unit=errstr, fmt=
'(A,I5,2X,A10,A5,6I8)' ) &
260 call errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
280 integer,
intent(in) :: lun
281 integer itab, idn, iret, iscl, iref, ibit, nseq
283 character*128 bort_str
290 if(
ntba(lun)==0)
call bort (
'BUFRLIB: CHEKSTAB - EMPTY TABLE A IN INTERNAL BUFR TABLES')
291 if(
ntbb(lun)==0)
call bort (
'BUFRLIB: CHEKSTAB - EMPTY TABLE B IN INTERNAL BUFR TABLES')
292 if(
ntbd(lun)==0)
call bort (
'BUFRLIB: CHEKSTAB - EMPTY TABLE D IN INTERNAL BUFR TABLES')
297 nemo =
taba(itab,lun)(4:11)
298 call nemtab(lun,nemo,idn,tab,iret)
300 write(bort_str,
'("BUFRLIB: CHEKSTAB - TABLE A ENTRY: ",A," NOT DEFINED AS A SEQUENCE")') nemo
308 call nemtbb(lun,itab,unit,iscl,iref,ibit)
329 use modv_vars,
only: mxtamc, mxtco
339 integer,
intent(in) :: lun
340 integer jmp0(10), nodl(10), ntag(10,2), maxlim, node, idn, itab, nseq, limb, n, jj, iyyy, irep, iknt, jum0, iokoper
342 character*128 bort_str
343 character*8,
intent(in) :: nemo
347 logical drop(10), ltamc
356 call nemtab(lun,nemo,idn,tab,itab)
358 write(bort_str,
'("BUFRLIB: TABSUB - SUBSET NODE NOT IN TABLE D (TAB=",A,") FOR INPUT MNEMONIC ",A)') tab,nemo
364 call inctab(nemo,
'SUB',node)
387 if(
ntamc+1>mxtamc)
call bort(
'BUFRLIB: TABSUB - MXTAMC OVERFLOW')
394 11
do n=ntag(limb,1),ntag(limb,2)
397 drop(limb) = n==ntag(limb,2)
399 call nemtab(lun,
nem(n,limb),idn,tab,itab)
404 read(nems,
'(3X,I3)') iyyy
408 write(bort_str,
'("BUFRLIB: TABSUB - THERE ARE TWO SIMULTANEOUS '// &
409 'CHANGE DATA WIDTH OPERATIONS IN THE TREE BUILT FROM INPUT MNEMONIC ",A)') nemo
419 write(bort_str,
'("BUFRLIB: TABSUB - THERE ARE TWO SIMULTANEOUS '// &
420 'CHANGE DATA SCALE OPERATIONS IN THE TREE BUILT FROM INPUT MNEMONIC ",A)') nemo
431 write(bort_str,
'("BUFRLIB: TABSUB - A 2-03-000 OPERATOR WAS '// &
432 'ENCOUNTERED WITHOUT ANY PRIOR 2-03-YYY OPERATOR FOR INPUT MNEMONIC ",A)') nemo
439 elseif(iyyy==255)
then
445 write(bort_str,
'("BUFRLIB: TABSUB - THERE ARE TWO SIMULTANEOUS '// &
446 'CHANGE REF VALUE OPERATIONS IN THE TREE BUILT FROM INPUT MNEMONIC ",A)') nemo
454 write(bort_str,
'("BUFRLIB: TABSUB - THERE ARE TWO SIMULTANEOUS '// &
455 'CHANGE DATA WIDTH OPERATIONS IN THE TREE BUILT FROM INPUT MNEMONIC ",A)') nemo
459 write(bort_str,
'("BUFRLIB: TABSUB - THERE ARE TWO SIMULTANEOUS '// &
460 'CHANGE DATA SCALE OPERATIONS IN THE TREE BUILT FROM INPUT MNEMONIC ",A)') nemo
463 icdw = ((10*iyyy)+2)/3
473 elseif((itab>=21).and.(iokoper(nems)==1))
then
479 if(
ntco(
ntamc)+1>mxtco)
call bort(
'BUFRLIB: TABSUB - MXTCO OVERFLOW')
489 call tabent(lun,nems,tab,itab,irep,iknt,jum0)
497 write(bort_str,
'("BUFRLIB: TABSUB - THERE ARE TOO MANY NESTED '// &
498 'TABLE D SEQUENCES (TREES) WITHIN INPUT MNEMONIC ",A," - THE LIMIT IS",I4)') nemo,maxlim
506 elseif(drop(limb))
then
512 write(bort_str,
'("BUFRLIB: TABSUB - A 2-07-YYY OPERATOR WAS '// &
513 'NOT CANCELLED IN THE TREE BUILT FROM INPUT MNEMONIC ",A)') nemo
517 write(bort_str,
'("BUFRLIB: TABSUB - A 2-01-YYY OPERATOR WAS '// &
518 'NOT CANCELLED IN THE TREE BUILT FROM INPUT MNEMONIC ",A)') nemo
522 write(bort_str,
'("BUFRLIB: TABSUB - A 2-02-YYY OPERATOR WAS '// &
523 'NOT CANCELLED IN THE TREE BUILT FROM INPUT MNEMONIC ",A)') nemo
527 write(bort_str,
'("BUFRLIB: TABSUB - A 2-08-YYY OPERATOR WAS '// &
528 'NOT CANCELLED IN THE TREE BUILT FROM INPUT MNEMONIC ",A)') nemo
532 write(bort_str,
'("BUFRLIB: TABSUB - A 2-03-YYY OPERATOR WAS '// &
533 'APPLIED WITHOUT ANY SUBSEQUENT 2-03-255 OPERATOR FOR INPUT MNEMONIC ",A)') nemo
547 if(.not.drop(limb))
exit
551 elseif(tab/=
'C')
then
557 write(bort_str,
'("BUFRLIB: TABSUB - ENTITIES WERE NOT SUCCESSFULLY RESOLVED (BY EMULATING RESURSION) FOR SUBSET '// &
558 'DEFINED BY TBL A MNEM. ",A)') nemo
577 subroutine tabent(lun,nemo,tab,itab,irep,iknt,jum0)
579 use modv_vars,
only: mxnrv, typs, reps, lens
587 integer,
intent(in) :: lun, itab, irep, iknt, jum0
588 integer i, jm0, node, iscl, iref, ibit
592 character*8,
intent(in) :: nemo
593 character,
intent(in) :: tab
601 rtag = reps(irep)//nemo
603 if(rtag(i:i)==
' ')
then
604 rtag(i:i) = reps(irep+5)
605 call inctab(rtag,typs(irep),node)
609 ibt(node) = lens(irep)
612 if(irep==1)
irf(node) = iknt
622 call nemtbb(lun,itab,unit,iscl,iref,ibit)
623 if(unit(1:5)==
'CCITT')
then
628 call inctab(nemo,typt,node)
635 if(unit(1:4)==
'CODE')
then
637 elseif(unit(1:4)==
'FLAG')
then
640 if( (typt==
'NUM') .and. (
ibtnrv/=0) )
then
642 if(
nnrv+1>mxnrv)
call bort(
'BUFRLIB: TABENT - MXNRV OVERFLOW')
649 elseif( (typt==
'NUM') .and. (nemo(1:3)/=
'204') )
then
653 elseif( (typt==
'CHR') .and. (
incw>0) )
then
662 call inctab(nemo,typt,node)
688 use modv_vars,
only: maxjl
694 integer,
intent(out) :: node
696 character*(*),
intent(in) :: atag, atyp
697 character*128 bort_str
701 write(bort_str,
'("BUFRLIB: INCTAB - THE NUMBER OF JUMP/LINK TABLE ENTRIES EXCEEDS THE LIMIT, MAXJL (",I7,")")') maxjl
731 integer function lstjpb(node,lun,jbtyp)
result(iret)
738 integer,
intent(in) :: node, lun
741 character*(*),
intent(in) :: jbtyp
742 character*128 bort_str
744 if(node<
inode(lun))
then
745 write(bort_str,
'("BUFRLIB: LSTJPB - TABLE NODE (",I7,") IS OUT OF BOUNDS, < LOWER BOUNDS (",I7,")")') node,
inode(lun)
749 write(bort_str,
'("BUFRLIB: LSTJPB - TABLE NODE (",I7,") IS OUT OF BOUNDS, > UPPER BOUNDS (",I7,")")') node,
isc(
inode(lun))
758 if(
typ(nod)==jbtyp)
exit
777 integer function ishrdx(lud,lun)
result(iret)
783 integer,
intent(in) :: lud, lun
790 if ( (
ntba(lud) >= 1 ) .and. (
ntba(lud) ==
ntba(lun) ) )
then
793 do while ( ( ii <=
ntba(lud) ) .and. ( iret == 1 ) )
794 if ( (
mtab(ii,lud) /= 0 ) .and. (
mtab(ii,lud) ==
mtab(ii,lun) ) )
then
822 integer function icmpdx(lud,lun)
result(iret)
828 integer,
intent(in) :: lud, lun
835 if ( iret == 1 )
return
839 if ( (
ntba(lud) == 0 ) .or. (
ntba(lun) /=
ntba(lud) ) )
return
841 if (
idna(i,lun,1) /=
idna(i,lud,1) )
return
842 if (
idna(i,lun,2) /=
idna(i,lud,2) )
return
843 if (
taba(i,lun) /=
taba(i,lud) )
return
846 if ( (
ntbb(lud) == 0 ) .or. (
ntbb(lun) /=
ntbb(lud) ) )
return
848 if (
idnb(i,lun) /=
idnb(i,lud) )
return
849 if (
tabb(i,lun) /=
tabb(i,lud) )
return
852 if ( (
ntbd(lud) == 0 ) .or. (
ntbd(lun) /=
ntbd(lud) ) )
return
854 if (
idnd(i,lun) /=
idnd(i,lud) )
return
855 if (
tabd(i,lun) /=
tabd(i,lud) )
return
888 subroutine drstpl(inod,lun,inv1,inv2,invn)
894 integer,
intent(in) :: inod, lun, inv1
895 integer,
intent(inout) :: inv2
896 integer,
intent(out) :: invn
904 if(
typ(node)==
'DRS' .or.
typ(node)==
'DRB')
then
905 invn = invwin(node,lun,inv1,inv2)
908 call newwin(lun,inv1,inv2)
909 invn = invwin(inod,lun,invn,inv2)
952 recursive subroutine nemspecs ( lunit, nemo, nnemo, nscl, nref, nbts, iret )
956 use modv_vars,
only: im8b
965 integer,
intent(in) :: lunit, nnemo
966 integer,
intent(out) :: nscl, nref, nbts, iret
967 integer my_lunit, my_nnemo, lun, il, im, nidx, ierfst, node, ltn, jj, lcn,
bort_target_set
969 character*(*),
intent(in) :: nemo
977 call x84(lunit,my_lunit,1)
978 call x84(nnemo,my_nnemo,1)
979 call nemspecs(my_lunit,nemo,my_nnemo,nscl,nref,nbts,iret)
980 call x48(nscl,nscl,1)
981 call x48(nref,nref,1)
982 call x48(nbts,nbts,1)
983 call x48(iret,iret,1)
991 call strsuc(nemo,cnemo,lcn)
1001 call status( lunit, lun, il, im )
1002 if ( il == 0 )
return
1003 if (
inode(lun) /=
inv(1,lun) )
return
1007 call fstag( lun, nemo, nnemo, 1, nidx, ierfst )
1008 if ( ierfst /= 0 )
return
1012 node =
inv(nidx,lun)
1013 if ( (
typ(node) /=
'NUM' ) .and. (
typ(node) /=
'CHR' ) )
return
1024 if (
nnrv > 0 )
then
1030 call strsuc( nemo, tagn, ltn )
1031 if ( ( ltn <= 0 ) .or. ( ltn > 8 ) )
return
1034 if ( ( node /=
inodnrv(jj) ) .and. ( tagn(1:8) ==
tagnrv(jj) ) .and. &
1035 ( node >=
isnrv(jj) ) .and. ( node <=
ienrv(jj) ) )
then
1065 subroutine fstag ( lun, utag, nutag, nin, nout, iret )
1072 integer,
intent(in) :: lun, nutag, nin
1073 integer,
intent(out) :: nout, iret
1074 integer,
parameter :: maxtg = 15
1075 integer ntg, istep, itagct
1077 character*(*),
intent(in) :: utag
1078 character*10 tgs(maxtg)
1084 call parstr( utag, tgs, maxtg, ntg,
' ', .true. )
1085 if ( ntg /= 1 )
return
1089 if ( nutag == 0 )
return
1090 istep = isign( 1, nutag )
1093 do while ( ( nout >= 1 ) .and. ( nout <=
nval(lun) ) )
1094 if ( tgs(1) ==
tag(
inv(nout,lun)) )
then
1096 if ( itagct == iabs(nutag) )
then
1105 end subroutine fstag
1126 recursive subroutine gettagpr ( lunit, tagch, ntagch, tagpr, iret )
1130 use modv_vars,
only: im8b
1138 integer,
intent(in) :: lunit, ntagch
1139 integer,
intent(out) :: iret
1140 integer my_lunit, my_ntagch, lun, il, im, nch, lch, ntpchr, ltp,
bort_target_set
1142 character*(*),
intent(in) :: tagch
1143 character*(*),
intent(out) :: tagpr
1144 character*9 ctagch, ctagpr
1150 call x84 ( lunit, my_lunit, 1 )
1151 call x84 ( ntagch, my_ntagch, 1 )
1152 call gettagpr ( my_lunit, tagch, my_ntagch, tagpr, iret )
1153 call x48 ( iret, iret, 1 )
1163 call strsuc( tagch, ctagch, lch )
1165 ltp = min( len(tagpr), ntpchr )
1166 tagpr(1:ltp) = ctagpr(1:ltp)
1175 call status( lunit, lun, il, im )
1176 if ( il == 0 )
return
1177 if (
inode(lun) /=
inv(1,lun) )
return
1181 call fstag( lun, tagch, ntagch, 1, nch, iret )
1182 if ( iret /= 0 )
return
1205 integer function invtag(node,lun,inv1,inv2)
result(iret)
1207 use modv_vars,
only: iprt
1214 integer,
intent(in) :: node, lun, inv1, inv2
1222 if(
tag(
inv(iret,lun))==tagn)
return
1229 call errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
1230 call errwrt(
'BUFRLIB: INVTAG - RETURNING WITH A VALUE OF 0')
1231 call errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
1252 integer function invwin(node,lun,inv1,inv2)
result(iret)
1254 use modv_vars,
only: iprt
1260 integer,
intent(in) :: node, lun, inv1, inv2
1269 if(
inv(idx,lun)==node)
then
1277 write(errstr,
'(a,3i8)')
'invwin i1,i2,in ', inv1, inv2, iret
1333 integer,
intent(in) :: node, lun
1334 integer,
intent(out) :: iwin, jwin
1335 integer irpc, lstjpb, invwin
1337 character*128 bort_str
1339 irpc = lstjpb(node,lun,
'RPC')
1342 iwin = invwin(node,lun,jwin,
nval(lun))
1343 if(iwin==0 .and. jwin>1)
return
1348 iwin = invwin(irpc,lun,jwin,
nval(lun))
1350 if(
val(iwin,lun)==0.)
then
1356 jwin = invwin(irpc,lun,iwin+1,
nval(lun))
1358 write(bort_str,
'("BUFRLIB: GETWIN - SEARCHED BETWEEN",I5," AND",I5,", MISSING BRACKET")') iwin+1,
nval(lun)
1402 integer,
intent(in) :: lun
1403 integer,
intent(out) :: inc1, inc2
1404 integer nnod, ncon, nods, nodc, ivls, kons, nc, invcon
1406 common /usrstr/ nnod, ncon, nods(20), nodc(10), ivls(10), kons(10)
1415 outer:
do while (.true.)
1416 call getwin(nodc(1),lun,inc1,inc2)
1419 if(invcon(nc,lun,inc1,inc2)==0) cycle outer
1454 integer function invcon(nc,lun,inv1,inv2)
result(iret)
1456 use modv_vars,
only: iprt
1462 integer,
intent(in) :: nc, lun, inv1, inv2
1463 integer nnod, ncon, nods, nodc, ivls, kons
1465 common /usrstr/ nnod, ncon, nods(20), nodc(10), ivls(10), kons(10)
1467 if(inv1>0 .and. inv1<=
nval(lun) .and. inv2>0 .and. inv2<=
nval(lun))
then
1469 if(
inv(iret,lun)==nodc(nc))
then
1470 if(kons(nc)==1 .and.
val(iret,lun)==ivls(nc))
return
1471 if(kons(nc)==2 .and.
val(iret,lun)/=ivls(nc))
return
1472 if(kons(nc)==3 .and.
val(iret,lun)<ivls(nc))
return
1473 if(kons(nc)==4 .and.
val(iret,lun)>ivls(nc))
return
1480 call errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
1481 call errwrt(
'BUFRLIB: INVCON - RETURNING WITH A VALUE OF 0')
1482 call errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
1511 integer,
intent(in) :: lun, iwin
1512 integer,
intent(out) :: jwin
1513 integer node, lstjpb
1515 character*128 bort_str
1524 node =
inv(iwin,lun)
1525 if(lstjpb(node,lun,
'RPC')/=node)
then
1526 write(bort_str,
'("BUFRLIB: NEWWIN - LSTJPB FOR NODE",I6,'// &
1527 '" (LSTJPB=",I5,") DOES NOT EQUAL VALUE OF NODE, NOT RPC (IWIN =",I8,")")') node, lstjpb(node,lun,
'RPC'), iwin
1530 jwin = iwin+nint(
val(iwin,lun))
1559 integer,
intent(in) :: lun
1560 integer,
intent(inout) :: iwin, jwin
1561 integer node, lstjpb
1563 character*128 bort_str
1565 if(jwin==
nval(lun))
then
1570 node =
inv(iwin,lun)
1571 if(lstjpb(node,lun,
'RPC')/=node)
then
1572 write(bort_str,
'("BUFRLIB: NXTWIN - LSTJPB FOR NODE",I6," '// &
1573 '(LSTJPB=",I5,") DOES NOT EQUAL VALUE OF NODE, NOT RPC (IWIN =",I8,")")') node, lstjpb(node,lun,
'RPC'), iwin
1576 if(
val(jwin,lun)==0)
then
1580 jwin = iwin+nint(
val(iwin,lun))
1603 integer function nvnwin(node,lun,inv1,inv2,invn,nmax)
result(iret)
1605 use modv_vars,
only: iprt
1611 integer,
intent(in) :: node, lun, inv1, inv2, nmax
1612 integer,
intent(out) :: invn(*)
1615 character*128 bort_str
1621 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
1622 call errwrt(
'BUFRLIB: NVNWIN - NODE=0, IMMEDIATE RETURN')
1623 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
1636 if(
inv(n,lun)==node)
then
1637 if(iret+1>nmax)
then
1638 write(bort_str,
'("BUFRLIB: NVNWIN - THE NUMBER OF EVENTS EXCEEDS THE LIMIT NMAX (",I5,")")') nmax
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 cpbfdx(lud, lun)
Copy all of the DX BUFR table information from one unit to another within internal memory.
subroutine nemtbb(lun, itab, unit, iscl, iref, ibit)
Get information about a Table B descriptor from the internal DX BUFR tables.
recursive subroutine wrdxtb(lundx, lunot)
Generate one or more BUFR messages from the DX BUFR tables information associated with a given BUFR f...
subroutine nemtbd(lun, itab, nseq, nems, irps, knts)
Get information about a Table D descriptor from the internal DX BUFR tables.
subroutine errwrt(str)
Specify a custom location for the logging of error and diagnostic messages generated by the NCEPLIBS-...
subroutine nemtab(lun, nemo, idn, tab, iret)
Get information about a descriptor, based on a mnemonic.
subroutine fstag(lun, utag, nutag, nin, nout, iret)
Search for a specified occurrence of a specified mnemonic within a data subset definition,...
subroutine drstpl(inod, lun, inv1, inv2, invn)
Search for a specified mnemonic within unexpanded sequences of the internal jump/link table.
integer function nvnwin(node, lun, inv1, inv2, invn, nmax)
Search for all occurrences of a specified node within a specified portion of the current data subset.
integer function invcon(nc, lun, inv1, inv2)
Search a specified window for a conditional node.
integer function lstjpb(node, lun, jbtyp)
Search backwards, beginning from a given node within the jump/link table, until finding the most rece...
subroutine inctab(atag, atyp, node)
Get the next available positional index for writing into the internal jump/link table in module moda_...
subroutine tabent(lun, nemo, tab, itab, irep, iknt, jum0)
Build and store an entry for a Table B or Table D mnemonic within the internal jump/link table.
recursive subroutine nemspecs(lunit, nemo, nnemo, nscl, nref, nbts, iret)
Get the scale factor, reference value and bit width associated with a specified occurrence of a Table...
integer function invtag(node, lun, inv1, inv2)
Search for a specified mnemonic within a specified portion of the current data subset.
subroutine nxtwin(lun, iwin, jwin)
Compute the start and end indices of the next window.
integer function icmpdx(lud, lun)
Check whether the full set of associated DX BUFR Table information is identical between two Fortran l...
subroutine newwin(lun, iwin, jwin)
Compute the ending index of the window.
integer function invwin(node, lun, inv1, inv2)
Search for a specified node within a specified portion of the current data subset.
subroutine conwin(lun, inc1, inc2)
Search consecutive subset buffer segments for a conditional node.
subroutine chekstab(lun)
Check that an internal BUFR table representation is self-consistent and fully defined.
subroutine makestab
Build the entire internal jump/link table within module moda_tables, using all of the internal BUFR t...
subroutine getwin(node, lun, iwin, jwin)
Look for a window containing a specified node within the internal jump/link table.
integer function ishrdx(lud, lun)
Check whether the same DX BUFR Table is being shared between two Fortran logical units.
subroutine tabsub(lun, nemo)
Build and store the entire jump/link tree (including recursively resolving all "child" mnemonics) for...
recursive subroutine gettagpr(lunit, tagch, ntagch, tagpr, iret)
Get the parent for a specified occurrence of a Table B or Table D mnemonic within a data subset defin...
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 bitmaps internally within a data subset definition.
integer, dimension(:,:), allocatable inodtco
Entries within jump/link table which contain Table C operators.
integer ntamc
Number of Table A mnemonics in jump/link table (up to a maximum of mxtamc) which contain at least one...
integer, dimension(:), allocatable inodtamc
Entries within jump/link table which contain Table A mnemonics.
character *6, dimension(:,:), allocatable ctco
Table C operators corresponding to inodtco.
integer, dimension(:), allocatable ntco
Number of Table C operators (with an XX value of 21 or greater) within the data subset definition of ...
Declare an array used by subroutine makestab() to keep track of which logical units share DX BUFR tab...
integer, dimension(:), allocatable lus
Tracking index for each file ID.
Declare arrays used to store information about the current BUFR message that is in the process of bei...
integer, dimension(:), allocatable inode
Table A mnemonic for type of BUFR message.
Declare arrays used by various subroutines to hold information about Table D sequences.
integer, dimension(:,:), allocatable krp
Replication counts corresponding to nem:
integer, dimension(:,:), allocatable irp
Replication indicators corresponding to nem:
character *8, dimension(:,:), allocatable nem
Child mnemonics within Table D sequences.
Declare arrays and variables for use with any 2-03-YYY (change reference value) operators present wit...
integer, dimension(:), allocatable ienrv
End of entry range in jump/link table, within which the corresponding new reference value in nrv will...
character *8, dimension(:), allocatable tagnrv
Table B mnemonic to which the corresponding new reference value in nrv applies.
integer, dimension(:), allocatable isnrv
Start of entry range in jump/link table, within which the corresponding new reference value in nrv wi...
integer nnrv
Number of entries in the jump/link table which contain new reference values (up to a maximum of mxnrv...
integer *8, dimension(:), allocatable nrv
New reference values corresponding to inodnrv.
integer ipfnrv
A number between 1 and nnrv, denoting the first entry within the module arrays which applies to the c...
integer, dimension(:), allocatable inodnrv
Entries within jump/link table which contain new reference values.
integer ibtnrv
Number of bits in Section 4 occupied by each new reference value for the current 2-03-YYY operator in...
Declare arrays used to store file and message status indicators for all logical units that have been ...
integer, dimension(:), allocatable iolun
File status indicators.
integer, dimension(:), allocatable iomsg
Message status indicator corresponding to iolun, denoting whether a BUFR message is currently open wi...
Declare arrays and variables used to store DX BUFR tables internally for multiple file IDs.
integer, dimension(:), allocatable ntba
Number of Table A entries for each file ID (up to a maximum of maxtba, whose value is stored in array...
character *600, dimension(:,:), allocatable tabd
Table D entries for each file ID.
character *128, dimension(:,:), allocatable taba
Table A entries for each file ID.
integer, dimension(:,:), allocatable mtab
Entries within jump/link table corresponding to taba.
integer, dimension(:,:,:), allocatable idna
Message types (in array element 1) and subtypes (in array element 2) corresponding to taba.
integer, dimension(:), allocatable ntbd
Number of Table D entries for each file ID (up to a maximum of maxtbd, whose value is stored in array...
integer, dimension(:), allocatable ntbb
Number of Table B entries for each file ID (up to a maximum of maxtbb, whose value is stored in array...
integer, dimension(:,:), allocatable idnd
WMO bit-wise representations of the FXY values corresponding to tabd.
integer, dimension(:,:), allocatable idnb
WMO bit-wise representations of the FXY values corresponding to tabb.
character *128, dimension(:,:), allocatable tabb
Table B entries for each file ID.
Declare variables for use with certain Table C operators in the internal jump/link table.
integer icsc
Number by which to modify the scale of subsequent jump/link table mnemonics whose type indicator is "...
integer icdw
Number of bits by which to modify the data width of subsequent jump/link table mnemonics whose type i...
integer icrv
Factor by which to multiply the reference value of subsequent jump/link table mnemonics whose type in...
integer incw
New data width (in bytes) for subsequent jump/link table mnemonics whose type indicator is "CHR"; set...
Declare arrays and variables used to store the internal jump/link table.
integer, dimension(:), allocatable jseq
Temporary storage used in expanding sequences.
integer, dimension(:), allocatable irf
Reference values corresponding to tag and typ:
integer, dimension(:,:), allocatable iseq
Temporary storage used in expanding sequences.
integer, dimension(:), allocatable isc
Scale factors corresponding to tag and typ:
integer, dimension(:), allocatable ibt
Bit widths corresponding to tag and typ:
integer, dimension(:), allocatable knt
Temporary storage used in calculating delayed replication counts.
real *8, dimension(:), allocatable vali
Initialized data values corresponding to typ:
character *3, dimension(:), allocatable typ
Type indicators corresponding to tag:
integer, dimension(:), allocatable jmpb
Jump backward indices corresponding to tag and typ:
character *10, dimension(:), allocatable tag
Mnemonics in the jump/link table.
integer ntab
Number of entries in the jump/link table.
integer, dimension(:), allocatable jump
Jump forward indices corresponding to tag and typ:
integer, dimension(:), allocatable itp
Integer type values corresponding to typ:
integer, dimension(:), allocatable link
Link indices corresponding to tag, typ and jmpb:
integer, dimension(:), allocatable knti
Initialized replication counts corresponding to typ and jump:
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.
real *8, dimension(:,:), allocatable, target val
Data values.
integer, dimension(:,:), allocatable, target inv
Inventory pointer which links each data value to its corresponding node in the internal jump/link tab...
Declare an array used to track, for each file ID, whether the DX BUFR table associated with the corre...
logical, dimension(:), allocatable xtab
Tracking index for each file ID.
recursive subroutine status(lunit, lun, il, im)
Check whether a specified Fortran logical unit number is currently connected to the NCEPLIBS-bufr sof...
recursive subroutine closmg(lunin)
Close the BUFR message that is currently open for writing within internal arrays associated with logi...
subroutine usrtpl(lun, invn, nbmp)
Expand a subset template within internal arrays.
subroutine strcln
Reset the internal mnemonic string cache.
subroutine parstr(str, tags, mtag, ntag, sep, limit80)
Parse a string containing one or more substrings into an array of substrings.
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.