17 use modv_vars,
only: maxtba, maxtbb, maxtbd, mxmsgl, nfiles, adsn, idnr, lun1, lun2
31 integer ndndx(10), nldxa(10), nldxb(10), nldxd(10), nld30(10), nxstr, ldxa, ldxb, ldxd, ld30, &
36 character*6 dndx(25,10)
38 common /dxtab/ nxstr(10), ldxa(10), ldxb(10), ldxd(10), ld30(10), dxstr(10)
40 data (dndx(i,1),i=1,25)/ &
41 '102000',
'031001',
'000001',
'000002', &
42 '110000',
'031001',
'000010',
'000011',
'000012',
'000013',
'000015',
'000016',
'000017',
'000018',
'000019',
'000020', &
43 '107000',
'031001',
'000010',
'000011',
'000012',
'000013',
'101000',
'031001',
'000030'/
45 data (dndx(i,2),i=1,15)/ &
46 '103000',
'031001',
'000001',
'000002',
'000003', &
47 '101000',
'031001',
'300004', &
48 '105000',
'031001',
'300003',
'205064',
'101000',
'031001',
'000030'/
50 data ndndx / 25 , 15 , 8*0 /
51 data nldxa / 35 , 67 , 8*0 /
52 data nldxb / 80 , 112 , 8*0 /
53 data nldxd / 38 , 70 , 8*0 /
54 data nld30 / 5 , 6 , 8*0 /
88 idnr(i) = ifxy(adsn(i))
108 nxstr(j) = ndndx(j)*2
111 call ipkm(dxstr(j)(i1:i1),2,ifxy(dndx(i,j)))
134 '/home/runner/work/NCEPLIBS-bufr/NCEPLIBS-bufr/bufr/build-doc' // &
136 call mtinfo(cmtdir,lun1,lun2)
155 recursive subroutine strnum( str, num, iret )
156 use modv_vars,
only: im8b
160 character*(*),
intent(in) :: str
162 integer,
intent(out) :: num, iret
171 call strnum ( str, num, iret )
172 call x48 ( num, num, 1 )
173 call x48 ( iret, iret, 1 )
181 call strsuc ( str, str2, lens )
182 if ( lens == 0 )
return
183 read ( str2(1:lens),
'(I40)', iostat = ios ) num
184 if ( ios /= 0 ) iret = -1
201 character*(*),
intent(in) :: str1
202 character*(*),
intent(out) :: str2
204 integer,
intent(out) :: lens
207 lens = len_trim(str2)
235 integer function irev(n)
result(iret)
237 use modv_vars,
only: nbytw, iordle
241 integer,
intent(in) :: n
245 character*8 cint,dint
247 equivalence(cint,int)
248 equivalence(dint,jnt)
255 dint(i:i) = cint(iordle(i):iordle(i))
283 use modv_vars,
only: iprt
287 integer,
intent(out) :: iret
288 integer lstr, num, ier
290 character*(*),
intent(inout) :: str
291 character,
intent(out) :: sign
296 if(str==
' ')
call bort(
'BUFRLIB: JSTNUM - INPUT BLANK CHARACTER STRING NOT ALLOWED')
300 if(str(1:1)==
'+')
then
303 elseif(str(1:1)==
'-')
then
313 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
314 errstr =
'BUFRLIB: JSTNUM: ENCODED VALUE WITHIN RESULTANT CHARACTER STRING (' // str //
') IS NOT AN INTEGER - '// &
315 'RETURN WITH IRET = -1'
317 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
339 character*(*),
intent(inout) :: str
340 character*26,
parameter :: upcs =
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
341 character*26,
parameter :: lwcs =
'abcdefghijklmnopqrstuvwxyz'
345 if(str(i:i)==lwcs(j:j))
then
364 character*(*),
intent(out) :: cverstr
366 if (len(cverstr)<8)
call bort(
'BUFRLIB: BVERS - INPUT STRING MUST CONTAIN SPACE FOR AT LEAST 8 CHARACTERS')
384 integer function isize (num)
result (iret)
388 integer,
intent(in) :: num
390 character*128 bort_str
394 if ( num < 10**iret )
return
397 write(bort_str,
'("BUFRLIB: ISIZE - INPUT NUMBER (",I7,") IS OUT OF RANGE")') num
421 recursive integer function igetsc(lunit)
result(iret)
423 use modv_vars,
only: im8b
429 integer,
intent(in) :: lunit
430 integer my_lunit, lun, il, im
435 call x84(lunit,my_lunit,1)
444 call status(lunit,lun,il,im)
445 if(il==0)
call bort(
'BUFRLIB: IGETSC - BUFR FILE IS CLOSED, IT MUST BE OPEN')
466 character*(*),
intent(in) :: nemo
468 if ( len(nemo)<6 )
then
470 else if ( lge(nemo(1:3),
'201') .and. lle(nemo(1:3),
'208') )
then
472 else if ( nemo(1:3)==
'221' )
then
474 else if ( ( ( nemo(4:6)==
'000' ) .or. ( nemo(4:6)==
'255' ) ) .and. &
475 ( ( nemo(1:3)==
'237' ) .or. ( lge(nemo(1:3),
'241') .and. lle(nemo(1:3),
'243') ) ) )
then
477 else if ( ( nemo(4:6)==
'000' ) .and. ( ( lge(nemo(1:3),
'222') .and. lle(nemo(1:3),
'225') ) .or. &
478 ( nemo(1:3)==
'232' ) .or. ( nemo(1:3)==
'235' ) .or. ( nemo(1:3)==
'236' ) ) )
then
492 use modv_vars,
only: iprt
501 call errwrt(
'+++++++++++++++++++++BUFRLIB+++++++++++++++++++++++')
502 call errwrt(
'---------------------------------------------------')
503 call errwrt(
'INVENTORY FROM MERGE PROCESS IN SUBROUTINE INVMRG:')
504 call errwrt(
'---------------------------------------------------')
505 write ( unit=errstr, fmt=
'(A,I8)' )
'NUMBER OF DRB EXPANSIONS = ',
nrpl
507 write ( unit=errstr, fmt=
'(A,I8)' )
'NUMBER OF MERGES = ',
nmrg
509 write ( unit=errstr, fmt=
'(A,I8)' )
'NUMBER THAT ARE AMBIGUOUS = ',
namb
511 call errwrt(
'---------------------------------------------------')
512 write ( unit=errstr, fmt=
'(A,I9)' )
'TOTAL NUMBER OF VISITS = ',
ntot
514 call errwrt(
'---------------------------------------------------')
515 call errwrt(
'+++++++++++++++++++++BUFRLIB+++++++++++++++++++++++')
integer function imrkopr(nemo)
Check whether a specified mnemonic is a Table C marker operator.
subroutine bort(str)
Log an error message, then abort the application program.
recursive subroutine ipkm(cbay, nbyt, n)
Encode an integer value within a specified number of bytes of a character string, up to a maximum of ...
subroutine errwrt(str)
Specify a custom location for the logging of error and diagnostic messages generated by the NCEPLIBS-...
recursive subroutine mtinfo(cmtdir, lunmt1, lunmt2)
Specify the directory location and Fortran logical unit numbers to be used when reading master BUFR t...
subroutine jstnum(str, sign, iret)
Left-justify a character string containing an encoded integer, by removing all leading blanks and any...
integer function iokoper(nemo)
Check whether a specified mnemonic is a Table C operator supported by the NCEPLIBS-bufr software.
integer function irev(n)
Return a copy of an integer value with the bytes possibly reversed.
recursive integer function igetsc(lunit)
Check for an abnormal status code associated with the processing of a file.
subroutine bvers(cverstr)
Get the version number of the NCEPLIBS-bufr software.
recursive subroutine strnum(str, num, iret)
Decode an integer from a character string.
subroutine strsuc(str1, str2, lens)
Remove leading and trailing blanks from a character string.
subroutine bfrini
Initialize numerous global variables and arrays within internal modules and common blocks throughout ...
subroutine capit(str)
Capitalize all of the alphabetic characters in a string.
integer function isize(num)
Compute the number of characters needed to encode an integer as a string.
subroutine mrginv
Print a summary of merge activity.
Declare arrays and variables used to store BUFR messages internally for multiple file IDs.
integer maxbyt
Maximum length of an output BUFR message.
Declare arrays used to store, for each output file ID, a copy of the BUFR message that was most recen...
integer, dimension(:), allocatable msglen
Length (in integers) of BUFR message most recently written to each output file ID.
Declare arrays and variables needed to store the current position within a BUFR file.
integer, dimension(:), allocatable jsr
Indicator of stack status when entering subroutine rewnbf().
Declare arrays and variables for the internal Table A mnemonic cache that is used for Section 3 decod...
integer ncnem
Number of entries in the internal Table A mnemonic cache (up to a maximum of mxcnem).
Declare an array used by subroutine readerme() to read in a new DX dictionary table as a consecutive ...
integer, dimension(:), allocatable idrdm
DX BUFR tables message count for each file ID.
Declare variables for use when merging parts of different data subsets.
integer nmrg
Number of merges.
integer ntot
Total number of calls to subroutine invmrg().
integer namb
Number of potential merges that weren't made because of ambiguities.
integer nrpl
Number of expansions of Table D mnemonics using short (1-bit) delayed replication.
Declare an array used to keep track of which logical units should not have any empty (zero data subse...
integer, dimension(:), allocatable msglim
Tracking index for each file ID.
Declare arrays used to store file and message status indicators for all logical units that have been ...
integer, dimension(:), allocatable iolun
File status indicators.
integer, dimension(:), allocatable iomsg
Message status indicator corresponding to iolun, denoting whether a BUFR message is currently open wi...
Declare an array used to store a status code for each file ID if an error or other abnormal result oc...
integer, dimension(:), allocatable iscodes
Abnormal status codes.
Declare arrays and variables used to store DX BUFR tables internally for multiple file IDs.
integer, dimension(:), allocatable ntba
Number of Table A entries for each file ID (up to a maximum of maxtba, whose value is stored in array...
integer, dimension(:), allocatable ntbd
Number of Table D entries for each file ID (up to a maximum of maxtbd, whose value is stored in array...
integer, dimension(:), allocatable ntbb
Number of Table B entries for each file ID (up to a maximum of maxtbb, whose value is stored in array...
Declare arrays used to store data values and associated metadata for the current BUFR data subset in ...
integer, dimension(:), allocatable nval
Number of data values in BUFR data subset.
recursive subroutine status(lunit, lun, il, im)
Check whether a specified Fortran logical unit number is currently connected to the NCEPLIBS-bufr sof...
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.