27 RECURSIVE SUBROUTINE upftbv(LUNIT,NEMO,VAL,MXIB,IBIT,NIB)
33 real*8 val, r8val, r82i
35 INTEGER ibit(*), nib(*)
38 CHARACTER*128 bort_str
49 CALL x84(lunit,my_lunit,1)
50 CALL x84(mxib,my_mxib,1)
51 CALL upftbv( my_lunit, nemo, val, my_mxib*2, ibit, nib )
52 CALL x48(ibit,ibit,nib(1))
61 CALL status(lunit,lun,il,im)
64 CALL nemtab(lun,nemo,idn,tab,n)
66 IF(
tabb(n,lun)(71:74).NE.
'FLAG')
GOTO 902
75 IF(abs(r8val-r82i).LT.(0.005))
THEN
77 IF(nib(1).GT.mxib)
GOTO 903
78 ibit(nib(1)) = nbits-i
80 ELSEIF(r82i.LT.r8val)
THEN
82 IF(nib(1).GT.mxib)
GOTO 903
83 ibit(nib(1)) = nbits-i
89 900
CALL bort(
'BUFRLIB: UPFTBV - INPUT BUFR FILE IS CLOSED, IT '//
90 .
'MUST BE OPEN FOR INPUT')
91 901
WRITE(bort_str,
'("BUFRLIB: UPFTBV - MNEMONIC ",A,'//
92 .
'" NOT FOUND IN TABLE B")') nemo
94 902
WRITE(bort_str,
'("BUFRLIB: UPFTBV - MNEMONIC ",A,'//
95 .
'" IS NOT A FLAG TABLE")') nemo
97 903
CALL bort(
'BUFRLIB: UPFTBV - IBIT ARRAY OVERFLOW')
subroutine bort(STR)
Log one error message and abort application program.
This module contains array and variable declarations used to store DX BUFR tables internally for mult...
character *128, dimension(:,:), allocatable tabb
Table B entries for each internal I/O stream.
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 ...
subroutine nemtab(LUN, NEMO, IDN, TAB, IRET)
Get information about a descriptor, based on the mnemonic.
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 strnum(str, num, iret)
Decode an integer from a character string.
recursive subroutine upftbv(LUNIT, NEMO, VAL, MXIB, IBIT, NIB)
Given a Table B mnemonic with flag table units and a corresponding numerical data value,...
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.