120 RECURSIVE SUBROUTINE ufbint(LUNIN,USR,I1,I2,IRET,STR)
128 COMMON /usrstr/ nnod,ncon,nods(20),nodc(10),ivls(10),kons(10)
132 CHARACTER*128 bort_str1,bort_str2,errstr
135 DATA ifirst1/0/,ifirst2/0/
137 SAVE ifirst1, ifirst2
148 CALL x84(lunin,my_lunin,1)
151 CALL ufbint(my_lunin,usr,my_i1,my_i2,iret,str)
152 CALL x48(iret,iret,1)
164 CALL status(lunit,lun,il,im)
167 IF(
inode(lun).NE.
inv(1,lun))
GOTO 902
169 io = min(max(0,il),1)
170 IF(lunit.NE.lunin) io = 0
174 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
175 errstr = .LE.
'BUFRLIB: UFBINT - 3rd ARG. (INPUT) IS 0, ' //
176 .
'SO RETURN WITH 5th ARG. (IRET) = 0; 6th ARG. (STR) ='
179 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
184 IF(iprt.EQ.-1) ifirst1 = 1
185 IF(io.EQ.0 .OR. ifirst1.EQ.0 .OR. iprt.GE.1)
THEN
186 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
187 errstr = .LE.
'BUFRLIB: UFBINT - 4th ARG. (INPUT) IS 0, ' //
188 .
'SO RETURN WITH 5th ARG. (IRET) = 0; 6th ARG. (STR) ='
191 IF(iprt.EQ.0 .AND. io.EQ.1)
THEN
192 errstr =
'Note: Only the first occurrence of this WARNING ' //
193 .
'message is printed, there may be more. To output all ' //
196 errstr =
'modify your application program to add ' //
197 .
'"CALL OPENBF(0,''QUIET'',1)" prior to the first call ' //
198 .
'to a BUFRLIB routine.'
201 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
211 CALL string(str,lun,i1,io)
227 CALL ufbrw(lun,usr,i1,i2,io,iret)
232 IF(io.EQ.1 .AND. iret.NE.i2 .AND. iret.GE.0)
THEN
233 CALL trybump(lun,usr,i1,i2,io,iret)
234 IF(iret.NE.i2)
GOTO 903
235 ELSEIF(iret.EQ.-1)
THEN
242 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
243 errstr =
'BUFRLIB: UFBINT - NO SPECIFIED VALUES READ IN, ' //
244 .
'SO RETURN WITH 5th ARG. (IRET) = 0; 6th ARG. (STR) ='
247 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
251 IF(iprt.EQ.-1) ifirst2 = 1
252 IF(ifirst2.EQ.0 .OR. iprt.GE.1)
THEN
253 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
254 errstr =
'BUFRLIB: UFBINT - NO SPECIFIED VALUES WRITTEN OUT, ' //
255 .
'SO RETURN WITH 5th ARG. (IRET) = 0; 6th ARG. (STR) ='
258 CALL errwrt(
'MAY NOT BE IN THE BUFR TABLE(?)')
260 errstr =
'Note: Only the first occurrence of this WARNING ' //
261 .
'message is printed, there may be more. To output all ' //
264 errstr =
'modify your application program to add ' //
265 .
'"CALL OPENBF(0,''QUIET'',1)" prior to the first call ' //
266 .
'to a BUFRLIB routine.'
269 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
280 900
CALL bort(
'BUFRLIB: UFBINT - BUFR FILE IS CLOSED, IT MUST BE'//
282 901
CALL bort(
'BUFRLIB: UFBINT - A MESSAGE MUST BE OPEN IN BUFR '//
284 902
CALL bort(
'BUFRLIB: UFBINT - LOCATION OF INTERNAL TABLE FOR '//
285 .
'BUFR FILE DOES NOT AGREE WITH EXPECTED LOCATION IN INTERNAL '//
287 903
WRITE(bort_str1,
'("BUFRLIB: UFBINT - MNEMONIC STRING READ IN IS'//
289 WRITE(bort_str2,
'(18X,"THE NUMBER OF ''LEVELS'' ACTUALLY '//
290 .
'WRITTEN (",I3,") DOES NOT EQUAL THE NUMBER REQUESTED (",I3,")'//
291 .
' - INCOMPLETE WRITE")') iret,i2
292 CALL bort2(bort_str1,bort_str2)
subroutine bort2(STR1, STR2)
Log two error messages and abort application program.
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 declarations for arrays used to store information about the current BUFR message...
integer, dimension(:), allocatable inode
Table A mnemonic for type of BUFR message.
This module contains declarations for arrays used to store data values and associated metadata for th...
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 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 ...
subroutine trybump(LUN, USR, I1, I2, IO, IRET)
This subroutine checks the first node associated with a character string (parsed into arrays in commo...
recursive subroutine ufbint(LUNIN, USR, I1, I2, IRET, STR)
Read/write one or more data values from/to a data subset.
subroutine ufbrw(LUN, USR, I1, I2, IO, IRET)
This subroutine writes or reads specified values to or from the current BUFR data subset within inter...
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.