17 use modv_vars,
only: maxtba, maxtbb, maxtbd, mxmsgl, nfiles, adsn, idnr
31 integer ndndx(10), nldxa(10), nldxb(10), nldxd(10), nld30(10), ibct, ipd1, ipd2, ipd3, ipd4, nrpl, nmrg, namb, ntot, &
32 maxdx, idxv, nxstr, ldxa, ldxb, ldxd, ld30, i, j, i1, ifxy
36 character*6 dndx(25,10)
38 common /padesc/ ibct, ipd1, ipd2, ipd3, ipd4
39 common /dxtab/ maxdx, idxv, nxstr(10), ldxa(10), ldxb(10), ldxd(10), ld30(10), dxstr(10)
40 common /mrgcom/ nrpl,nmrg,namb,ntot
42 data (dndx(i,1),i=1,25)/ &
43 '102000',
'031001',
'000001',
'000002', &
44 '110000',
'031001',
'000010',
'000011',
'000012',
'000013',
'000015',
'000016',
'000017',
'000018',
'000019',
'000020', &
45 '107000',
'031001',
'000010',
'000011',
'000012',
'000013',
'101000',
'031001',
'000030'/
47 data (dndx(i,2),i=1,15)/ &
48 '103000',
'031001',
'000001',
'000002',
'000003', &
49 '101000',
'031001',
'300004', &
50 '105000',
'031001',
'300003',
'205064',
'101000',
'031001',
'000030'/
52 data ndndx / 25 , 15 , 8*0 /
53 data nldxa / 35 , 67 , 8*0 /
54 data nldxb / 80 , 112 , 8*0 /
55 data nldxd / 38 , 70 , 8*0 /
56 data nld30 / 5 , 6 , 8*0 /
98 idnr(i) = ifxy(adsn(i))
122 nxstr(j) = ndndx(j)*2
125 call ipkm(dxstr(j)(i1:i1),2,ifxy(dndx(i,j)))
155 '/home/runner/work/NCEPLIBS-bufr/NCEPLIBS-bufr/bufr/build-doc' // &
176 recursive subroutine strnum( str, num, iret )
177 use modv_vars,
only: im8b
181 character*(*),
intent(in) :: str
183 integer,
intent(out) :: num, iret
192 call strnum ( str, num, iret )
193 call x48 ( num, num, 1 )
194 call x48 ( iret, iret, 1 )
202 call strsuc ( str, str2, lens )
203 if ( lens == 0 )
return
204 read ( str2(1:lens),
'(I40)', iostat = ios ) num
205 if ( ios /= 0 ) iret = -1
222 character*(*),
intent(in) :: str1
223 character*(*),
intent(out) :: str2
225 integer,
intent(out) :: lens
228 lens = len_trim(str2)
256 integer function irev(n)
result(iret)
258 use modv_vars,
only: nbytw, iordle
262 integer,
intent(in) :: n
266 character*8 cint,dint
268 equivalence(cint,int)
269 equivalence(dint,jnt)
276 dint(i:i) = cint(iordle(i):iordle(i))
306 integer,
intent(out) :: iret
307 integer iprt, lstr, num, ier
309 character*(*),
intent(inout) :: str
310 character,
intent(out) :: sign
317 if(str==
' ')
call bort(
'BUFRLIB: JSTNUM - INPUT BLANK CHARACTER STRING NOT ALLOWED')
321 if(str(1:1)==
'+')
then
324 elseif(str(1:1)==
'-')
then
334 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
335 errstr =
'BUFRLIB: JSTNUM: ENCODED VALUE WITHIN RESULTANT CHARACTER STRING (' // str //
') IS NOT AN INTEGER - '// &
336 'RETURN WITH IRET = -1'
338 call errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
360 character*(*),
intent(inout) :: str
361 character*26 upcs, lwcs
363 data upcs /
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
364 data lwcs /
'abcdefghijklmnopqrstuvwxyz'/
368 if(str(i:i)==lwcs(j:j))
then
387 character*(*),
intent(out) :: cverstr
389 if (len(cverstr)<8)
call bort(
'BUFRLIB: BVERS - INPUT STRING MUST CONTAIN SPACE FOR AT LEAST 8 CHARACTERS')
407 integer function isize (num)
result (iret)
411 integer,
intent(in) :: num
413 character*128 bort_str
417 if ( num < 10**iret )
return
420 write(bort_str,
'("BUFRLIB: ISIZE - INPUT NUMBER (",I7,") IS OUT OF RANGE")') num
444 recursive integer function igetsc(lunit)
result(iret)
446 use modv_vars,
only: im8b
452 integer,
intent(in) :: lunit
453 integer my_lunit, lun, il, im
458 call x84(lunit,my_lunit,1)
467 call status(lunit,lun,il,im)
468 if(il==0)
call bort(
'BUFRLIB: IGETSC - BUFR FILE IS CLOSED, IT MUST BE OPEN')
489 character*(*),
intent(in) :: nemo
491 if ( len(nemo)<6 )
then
493 else if ( lge(nemo(1:3),
'201') .and. lle(nemo(1:3),
'208') )
then
495 else if ( nemo(1:3)==
'221' )
then
497 else if ( ( ( nemo(4:6)==
'000' ) .or. ( nemo(4:6)==
'255' ) ) .and. &
498 ( ( nemo(1:3)==
'237' ) .or. ( lge(nemo(1:3),
'241') .and. lle(nemo(1:3),
'243') ) ) )
then
500 else if ( ( nemo(4:6)==
'000' ) .and. ( ( lge(nemo(1:3),
'222') .and. lle(nemo(1:3),
'225') ) .or. &
501 ( nemo(1:3)==
'232' ) .or. ( nemo(1:3)==
'235' ) .or. ( nemo(1:3)==
'236' ) ) )
then
517 integer nrpl, nmrg, namb, ntot, iprt
521 common /mrgcom/ nrpl, nmrg, namb, ntot
525 call errwrt(
'+++++++++++++++++++++BUFRLIB+++++++++++++++++++++++')
526 call errwrt(
'---------------------------------------------------')
527 call errwrt(
'INVENTORY FROM MERGE PROCESS IN SUBROUTINE INVMRG:')
528 call errwrt(
'---------------------------------------------------')
529 write ( unit=errstr, fmt=
'(A,I8)' )
'NUMBER OF DRB EXPANSIONS = ', nrpl
531 write ( unit=errstr, fmt=
'(A,I8)' )
'NUMBER OF MERGES = ', nmrg
533 write ( unit=errstr, fmt=
'(A,I8)' )
'NUMBER THAT ARE AMBIGUOUS = ', namb
535 call errwrt(
'---------------------------------------------------')
536 write ( unit=errstr, fmt=
'(A,I9)' )
'TOTAL NUMBER OF VISITS = ', ntot
538 call errwrt(
'---------------------------------------------------')
539 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 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.