153 CHARACTER*255 FILENAME,FILEACC
154 CHARACTER*128 BORT_STR,ERRSTR
155 CHARACTER*28 CPRINT(0:3)
160 .
' (limited - default) ',
161 .
' (all warnings) ',
162 .
' (all warning+informational)'/
173 IF(io.EQ.
'QUIET')
THEN
175 IF(lundx.LT.-1) lundx = -1
176 IF(lundx.GT. 2) lundx = 2
178 CALL errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
179 WRITE ( unit=errstr, fmt=
'(A,I3,A,A,I3,A)' )
180 .
'BUFRLIB: OPENBF - DEGREE OF MESSAGE PRINT INDICATOR '//
181 .
'CHNGED FROM',iprt,cprint(iprt+1),
' TO',lundx,cprint(lundx+1)
183 CALL errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
208 IF(io.EQ.
'FIRST')
GOTO 100
209 IF(io.EQ.
'QUIET')
GOTO 100
214 CALL status(lunit,lun,il,im)
215 IF(lun.EQ.0)
GOTO 900
216 IF(il .NE.0)
GOTO 901
225 IF (io.NE.
'NUL' .AND. io.NE.
'INUL')
THEN
226 INQUIRE(lunit,access=fileacc)
227 IF(fileacc==
'UNDEFINED')
OPEN(lunit)
228 INQUIRE(lunit,name=filename)
229 filename=trim(filename)//char(0)
246 CALL wtstat(lunit,lun,-1,0)
247 CALL readdx(lunit,lun,lundx)
248 ELSE IF(io.EQ.
'INUL')
THEN
249 CALL wtstat(lunit,lun,-1,0)
250 IF(lunit.NE.lundx)
CALL readdx(lunit,lun,lundx)
252 ELSE IF(io.EQ.
'NUL')
THEN
253 CALL wtstat(lunit,lun, 1,0)
254 IF(lunit.NE.lundx)
CALL readdx(lunit,lun,lundx)
256 ELSE IF(io.EQ.
'INX')
THEN
258 CALL wtstat(lunit,lun,-1,0)
260 ELSE IF(io.EQ.
'OUX')
THEN
262 CALL wtstat(lunit,lun, 1,0)
263 ELSE IF(io.EQ.
'SEC3')
THEN
265 CALL wtstat(lunit,lun,-1,0)
267 ELSE IF(io.EQ.
'OUT')
THEN
269 CALL wtstat(lunit,lun, 1,0)
270 CALL writdx(lunit,lun,lundx)
271 ELSE IF(io.EQ.
'NODX')
THEN
273 CALL wtstat(lunit,lun, 1,0)
274 CALL readdx(lunit,lun,lundx)
275 ELSE IF(io.EQ.
'APN' .OR. io.EQ.
'APX')
THEN
277 CALL wtstat(lunit,lun, 1,0)
278 IF(lunit.NE.lundx)
CALL readdx(lunit,lun,lundx)
291 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
292 WRITE ( unit=errstr, fmt=
'(A,I3,A)' )
293 .
'BUFRLIB: OPENBF - INPUT BUFR FILE IN UNIT ', lunit,
296 CALL errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
299 CALL wtstat(lunit,lun,-1,0)
310900
WRITE(bort_str,
'("BUFRLIB: OPENBF - THERE ARE ALREADY",I3,'//
311 .
'" BUFR FILES OPENED, CANNOT OPEN FILE CONNECTED TO UNIT",I4)')
314901
WRITE(bort_str,
'("BUFRLIB: OPENBF - THE FILE CONNECTED TO UNIT"'//
315 .
',I5," IS ALREADY OPEN")') lunit
317904
CALL bort(
'BUFRLIB: OPENBF - SECOND (INPUT) ARGUMENT MUST BE'//
318 .
' "IN", "OUT", "NODX", "NUL", "APN", "APX", "SEC3"'//
void arallocc(void)
This subroutine is called internally during the first call to subroutine openbf() from an application...
subroutine arallocf
This subroutine is called internally during the first call to subroutine openbf() from an application...
subroutine bfrini
This subroutine initializes numerous global variables and arrays within internal modules and COMMON b...
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
void openrb(f77int *nfile, char *ufile)
This subroutine opens a new system file for reading BUFR messages.
void openwb(f77int *nfile, char *ufile)
This subroutine opens a new system file for writing BUFR messages.
void openab(f77int *nfile, char *ufile)
This subroutine opens a new system file for appending BUFR messages.
subroutine dxinit(LUN, IOI)
THIS SUBROUTINE INITIALIZES THE INTERNAL ARRAYS (IN MODULE TABABD) HOLDING THE DICTIONARY TABLE.
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
This module declares and initializes the IFOPBF variable.
integer, public ifopbf
Status indicator to keep track of whether subroutine openbf() has already been called:
This module declares and initializes the NFILES variable.
integer, public nfiles
Maximum number of BUFR files that can be connected to the BUFRLIB software (for reading or writing) a...
subroutine openbf(LUNIT, IO, LUNDX)
This subroutine connects a new file to the BUFRLIB software for input or output operations.
subroutine posapx(LUNXX)
THIS SUBROUTINE READS TO THE END OF THE FILE POINTED TO BY ABS(LUNXX) AND POSITIONS IT FOR APPENDING.
subroutine readdx(LUNIT, LUN, LUNDX)
THIS SUBROUTINE GENERATES INTERNAL ARRAYS CONTAINING BUFR DICTIONARY TABLES WHICH ARE NEEDED TO READ,...
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
subroutine wrdlen
This subroutine figures out some important information about the local machine on which the BUFRLIB s...
subroutine writdx(LUNIT, LUN, LUNDX)
THIS SUBROUTINE WRITES BUFR TABLE (DICTIONARY) MESSAGES TO THE BEGINNING OF AN OUTPUT BUFR FILE IN LU...
subroutine wtstat(LUNIT, LUN, IL, IM)
This subroutine can be used to connect or disconnect a specified Fortran logical unit number to/from ...