20 COMMON /padesc/ ibct,ipd1,ipd2,ipd3,ipd4
21 COMMON /msgptr/ nby0,nby1,nby2,nby3,nby4,nby5
23 CHARACTER*128 BORT_STR
39 CALL nemtba(lun,subtag,mtyp,msbt,inod)
40 IF(
inode(lun).NE.inod)
GOTO 900
41 CALL nemtab(lun,subtag,isub,tab,iret)
42 IF(iret.EQ.0)
GOTO 901
47 mcen = mod(
idate(lun)/10**8,100)+1
48 mear = mod(
idate(lun)/10**6,100)
49 mmon = mod(
idate(lun)/10**4,100)
50 mday = mod(
idate(lun)/10**2,100)
51 mour = mod(
idate(lun) ,100)
55 IF(mcen.EQ.1)
GOTO 902
57 IF(mear.EQ.0) mcen = mcen-1
58 IF(mear.EQ.0) mear = 100
70 nbyt = nby0+nby1+nby2+nby3+nby4+nby5
75 CALL pkc(bufr , 4 ,
mbay(1,lun),mbit)
76 CALL pkb(nbyt , 24 ,
mbay(1,lun),mbit)
77 CALL pkb( 3 , 8 ,
mbay(1,lun),mbit)
82 CALL pkb(nby1 , 24 ,
mbay(1,lun),mbit)
83 CALL pkb( 0 , 8 ,
mbay(1,lun),mbit)
84 CALL pkb( 3 , 8 ,
mbay(1,lun),mbit)
85 CALL pkb( 7 , 8 ,
mbay(1,lun),mbit)
86 CALL pkb( 0 , 8 ,
mbay(1,lun),mbit)
87 CALL pkb( 0 , 8 ,
mbay(1,lun),mbit)
88 CALL pkb(mtyp , 8 ,
mbay(1,lun),mbit)
89 CALL pkb(msbt , 8 ,
mbay(1,lun),mbit)
90 CALL pkb( 36 , 8 ,
mbay(1,lun),mbit)
91 CALL pkb( 0 , 8 ,
mbay(1,lun),mbit)
92 CALL pkb(mear , 8 ,
mbay(1,lun),mbit)
93 CALL pkb(mmon , 8 ,
mbay(1,lun),mbit)
94 CALL pkb(mday , 8 ,
mbay(1,lun),mbit)
95 CALL pkb(mour , 8 ,
mbay(1,lun),mbit)
96 CALL pkb(mmin , 8 ,
mbay(1,lun),mbit)
97 CALL pkb(mcen , 8 ,
mbay(1,lun),mbit)
102 CALL pkb(nby3 , 24 ,
mbay(1,lun),mbit)
103 CALL pkb( 0 , 8 ,
mbay(1,lun),mbit)
104 CALL pkb( 0 , 16 ,
mbay(1,lun),mbit)
105 CALL pkb(2**7 , 8 ,
mbay(1,lun),mbit)
106 CALL pkb(ibct , 16 ,
mbay(1,lun),mbit)
107 CALL pkb(isub , 16 ,
mbay(1,lun),mbit)
108 CALL pkb(ipd1 , 16 ,
mbay(1,lun),mbit)
109 CALL pkb(ipd2 , 16 ,
mbay(1,lun),mbit)
110 CALL pkb(ipd3 , 16 ,
mbay(1,lun),mbit)
111 CALL pkb(ipd4 , 16 ,
mbay(1,lun),mbit)
112 CALL pkb( 0 , 8 ,
mbay(1,lun),mbit)
117 CALL pkb(nby4 , 24 ,
mbay(1,lun),mbit)
118 CALL pkb( 0 , 8 ,
mbay(1,lun),mbit)
123 CALL pkc(sevn , 4 ,
mbay(1,lun),mbit)
128 IF(mod(mbit,8).NE.0)
GOTO 903
129 IF(mbit/8.NE.nbyt )
GOTO 904
141 900
WRITE(bort_str,
'("BUFRLIB: MSGINI - MISMATCH BETWEEN INODE (=",'//
142 .
'I7,") & POSITIONAL INDEX, INOD (",I7,") OF SUBTAG (",A,") IN '//
143 .
'DICTIONARY")')
inode(lun),inod,subtag
145 901
WRITE(bort_str,
'("BUFRLIB: MSGINI - TABLE A MESSAGE TYPE '//
146 .
'MNEMONIC ",A," NOT FOUND IN INTERNAL TABLE D ARRAYS")') subtag
149 . (
'BUFRLIB: MSGINI - BUFR MESSAGE DATE (IDATE) is 0000000000')
150 903
CALL bort(
'BUFRLIB: MSGINI - INITIALIZED MESSAGE DOES NOT END '//
151 .
'ON A BYTE BOUNDARY')
152 904
WRITE(bort_str,
'("BUFRLIB: MSGINI - NUMBER OF BYTES STORED FOR '//
153 .
'INITIALIZED MESSAGE (",I6,") IS NOT THE SAME AS FIRST '//
154 .
'CALCULATED, NBYT (",I6)') mbit/8,nbyt
subroutine bort(STR)
Log one error message and abort application program.
subroutine msgini(LUN)
This subroutine initializes, within the internal arrays, a new uncompressed BUFR message for output.
This module contains array and variable declarations used to store BUFR messages internally for multi...
integer, dimension(:,:), allocatable mbay
Current BUFR message for each internal I/O stream.
integer, dimension(:), allocatable mbyt
Length (in bytes) of current BUFR message for each internal I/O stream.
This module contains declarations for arrays used to store information about the current BUFR message...
integer, dimension(:), allocatable inode
Table A mnemonic for type of BUFR message.
integer, dimension(:), allocatable idate
Section 1 date-time of message.
integer, dimension(:), allocatable nmsg
Current message pointer within logical unit.
integer, dimension(:), allocatable nsub
Current subset pointer within message.
This module contains array and variable declarations used to store the internal jump/link table.
character *10, dimension(:), allocatable tag
Mnemonics in the jump/link table.
This module contains an array declaration used to store, for each I/O stream index,...
integer, dimension(:), allocatable luncpy
Logical unit numbers used to copy long character strings between BUFR data subsets.
subroutine nemtab(LUN, NEMO, IDN, TAB, IRET)
Get information about a descriptor, based on the mnemonic.
subroutine nemtba(LUN, NEMO, MTYP, MSBT, INOD)
This subroutine searches for a descriptor within Table A of the internal DX BUFR tables.
subroutine pkb(NVAL, NBITS, IBAY, IBIT)
This subroutine encodes an integer value within a specified number of bits of an integer array,...
subroutine pkc(CHR, NCHR, IBAY, IBIT)
Encode a character string within an integer array.