151 CHARACTER*255 filename,fileacc
152 CHARACTER*128 bort_str,errstr
153 CHARACTER*28 cprint(0:3)
158 .
' (limited - default) ',
159 .
' (all warnings) ',
160 .
' (all warning+informational)'/
169 IF(ifopbf.EQ.0) iprt = 0
171 IF(io.EQ.
'QUIET')
THEN
173 IF(lundx.LT.-1) lundx = -1
174 IF(lundx.GT. 2) lundx = 2
176 CALL
errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
177 WRITE ( unit=errstr, fmt=
'(A,I3,A,A,I3,A)' )
178 .
'BUFRLIB: OPENBF - DEGREE OF MESSAGE PRINT INDICATOR '//
179 .
'CHNGED FROM',iprt,cprint(iprt+1),
' TO',lundx,cprint(lundx+1)
181 CALL
errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
206 IF(io.EQ.
'FIRST') goto 100
207 IF(io.EQ.
'QUIET') goto 100
212 CALL
status(lunit,lun,il,im)
213 IF(lun.EQ.0) goto 900
214 IF(il .NE.0) goto 901
223 IF (io.NE.
'NUL' .AND. io.NE.
'INUL')
THEN
224 INQUIRE(lunit,access=fileacc)
225 IF(fileacc==
'UNDEFINED')
OPEN(lunit)
226 INQUIRE(lunit,name=filename)
227 filename=trim(filename)//char(0)
244 CALL
wtstat(lunit,lun,-1,0)
245 CALL
readdx(lunit,lun,lundx)
246 ELSE IF(io.EQ.
'INUL')
THEN
247 CALL
wtstat(lunit,lun,-1,0)
248 IF(lunit.NE.lundx) CALL
readdx(lunit,lun,lundx)
250 ELSE IF(io.EQ.
'NUL')
THEN
251 CALL
wtstat(lunit,lun, 1,0)
252 IF(lunit.NE.lundx) CALL
readdx(lunit,lun,lundx)
254 ELSE IF(io.EQ.
'INX')
THEN
256 CALL
wtstat(lunit,lun,-1,0)
258 ELSE IF(io.EQ.
'OUX')
THEN
260 CALL
wtstat(lunit,lun, 1,0)
261 ELSE IF(io.EQ.
'SEC3')
THEN
263 CALL
wtstat(lunit,lun,-1,0)
265 ELSE IF(io.EQ.
'OUT')
THEN
267 CALL
wtstat(lunit,lun, 1,0)
268 CALL
writdx(lunit,lun,lundx)
269 ELSE IF(io.EQ.
'NODX')
THEN
271 CALL
wtstat(lunit,lun, 1,0)
272 CALL
readdx(lunit,lun,lundx)
273 ELSE IF(io.EQ.
'APN' .OR. io.EQ.
'APX')
THEN
275 CALL
wtstat(lunit,lun, 1,0)
276 IF(lunit.NE.lundx) CALL
readdx(lunit,lun,lundx)
289 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
290 WRITE ( unit=errstr, fmt=
'(A,I3,A)' )
291 .
'BUFRLIB: OPENBF - INPUT BUFR FILE IN UNIT ', lunit,
294 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
297 CALL
wtstat(lunit,lun,-1,0)
308 900
WRITE(bort_str,
'("BUFRLIB: OPENBF - THERE ARE ALREADY",I3,'//
309 .
'" BUFR FILES OPENED, CANNOT OPEN FILE CONNECTED TO UNIT",I4)')
312 901
WRITE(bort_str,
'("BUFRLIB: OPENBF - THE FILE CONNECTED TO UNIT"'//
313 .
',I5," IS ALREADY OPEN")') lunit
315 904 CALL
bort(
'BUFRLIB: OPENBF - SECOND (INPUT) ARGUMENT MUST BE'//
316 .
' "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 dxinit(LUN, IOI)
THIS SUBROUTINE INITIALIZES THE INTERNAL ARRAYS (IN MODULE TABABD) HOLDING THE DICTIONARY TABLE...
subroutine writdx(LUNIT, LUN, LUNDX)
THIS SUBROUTINE WRITES BUFR TABLE (DICTIONARY) MESSAGES TO THE BEGINNING OF AN OUTPUT BUFR FILE IN LU...
void openab(f77int *nfile, char *ufile)
This subroutine opens a new system file for appending BUFR messages.
subroutine wtstat(LUNIT, LUN, IL, IM)
This subroutine can be used to connect or disconnect a specified Fortran logical unit number to/from ...
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
subroutine openbf(LUNIT, IO, LUNDX)
This subroutine connects a new file to the BUFRLIB software for input or output operations.
This module declares and initializes the IFOPBF variable.
subroutine readdx(LUNIT, LUN, LUNDX)
THIS SUBROUTINE GENERATES INTERNAL ARRAYS CONTAINING BUFR DICTIONARY TABLES WHICH ARE NEEDED TO READ...
subroutine wrdlen
This subroutine figures out some important information about the local machine on which the BUFRLIB s...
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
void openwb(f77int *nfile, char *ufile)
This subroutine opens a new system file for writing BUFR messages.
subroutine bfrini
This subroutine initializes numerous global variables and arrays within internal modules and COMMON b...
subroutine posapx(LUNXX)
THIS SUBROUTINE READS TO THE END OF THE FILE POINTED TO BY ABS(LUNXX) AND POSITIONS IT FOR APPENDING...
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.