170 CHARACTER*255 filename,fileacc
171 CHARACTER*128 bort_str,errstr
172 CHARACTER*28 cprint(0:3)
177 .
' (limited - default) ',
178 .
' (all warnings) ',
179 .
' (all warning+informational)'/
188 IF(ifopbf.EQ.0) iprt = 0
190 IF(io.EQ.
'QUIET')
THEN
192 IF(lundx.LT.-1) lundx = -1
193 IF(lundx.GT. 2) lundx = 2
195 CALL
errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
196 WRITE ( unit=errstr, fmt=
'(A,I3,A,A,I3,A)' )
197 .
'BUFRLIB: OPENBF - DEGREE OF MESSAGE PRINT INDICATOR '//
198 .
'CHNGED FROM',iprt,cprint(iprt+1),
' TO',lundx,cprint(lundx+1)
200 CALL
errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
212 #ifdef DYNAMIC_ALLOCATION
227 IF(io.EQ.
'FIRST') goto 100
228 IF(io.EQ.
'QUIET') goto 100
233 CALL
status(lunit,lun,il,im)
234 IF(lun.EQ.0) goto 900
235 IF(il .NE.0) goto 901
244 IF (io.NE.
'NUL' .AND. io.NE.
'INUL')
THEN
245 INQUIRE(lunit,access=fileacc)
246 IF(fileacc==
'UNDEFINED')
OPEN(lunit)
247 INQUIRE(lunit,name=filename)
248 filename=trim(filename)//char(0)
265 CALL
wtstat(lunit,lun,-1,0)
266 CALL
readdx(lunit,lun,lundx)
267 ELSE IF(io.EQ.
'INUL')
THEN
268 CALL
wtstat(lunit,lun,-1,0)
269 IF(lunit.NE.lundx) CALL
readdx(lunit,lun,lundx)
271 ELSE IF(io.EQ.
'NUL')
THEN
272 CALL
wtstat(lunit,lun, 1,0)
273 IF(lunit.NE.lundx) CALL
readdx(lunit,lun,lundx)
275 ELSE IF(io.EQ.
'INX')
THEN
277 CALL
wtstat(lunit,lun,-1,0)
279 ELSE IF(io.EQ.
'OUX')
THEN
281 CALL
wtstat(lunit,lun, 1,0)
282 ELSE IF(io.EQ.
'SEC3')
THEN
284 CALL
wtstat(lunit,lun,-1,0)
286 ELSE IF(io.EQ.
'OUT')
THEN
288 CALL
wtstat(lunit,lun, 1,0)
289 CALL
writdx(lunit,lun,lundx)
290 ELSE IF(io.EQ.
'NODX')
THEN
292 CALL
wtstat(lunit,lun, 1,0)
293 CALL
readdx(lunit,lun,lundx)
294 ELSE IF(io.EQ.
'APN' .OR. io.EQ.
'APX')
THEN
296 CALL
wtstat(lunit,lun, 1,0)
297 IF(lunit.NE.lundx) CALL
readdx(lunit,lun,lundx)
310 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
311 WRITE ( unit=errstr, fmt=
'(A,I3,A)' )
312 .
'BUFRLIB: OPENBF - INPUT BUFR FILE IN UNIT ', lunit,
315 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
318 CALL
wtstat(lunit,lun,-1,0)
329 900
WRITE(bort_str,
'("BUFRLIB: OPENBF - THERE ARE ALREADY",I3,'//
330 .
'" BUFR FILES OPENED, CANNOT OPEN FILE CONNECTED TO UNIT",I4)')
333 901
WRITE(bort_str,
'("BUFRLIB: OPENBF - THE FILE CONNECTED TO UNIT"'//
334 .
',I5," IS ALREADY OPEN")') lunit
336 904 CALL
bort(
'BUFRLIB: OPENBF - SECOND (INPUT) ARGUMENT MUST BE'//
337 .
' "IN", "OUT", "NODX", "NUL", "APN", "APX", "SEC3"'//
subroutine arallocf
For dynamic allocation builds of the library, this subroutine is called internally during the first c...
void arallocc(void)
For dynamic allocation builds of the library, this subroutine is called internally during the first c...
subroutine openbf(LUNIT, IO, LUNDX)
This subroutine connects a new file to the BUFRLIB software for input or output operations.
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 ...
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.