64 COMMON /tnkrcp/ itryr,itrmo,itrdy,itrhr,itrmi,ctrt
90 CALL
pkb(mbyt,24,iec0,ibit)
92 DO ii = 1,
nmwrd(iec0)
103 IF(cmnem(i).EQ.
'BEN')
THEN
104 IF(ivmnem(i).EQ.4)
THEN
109 CALL
pkb(mbyt,24,mgwa,ibit)
111 CALL
cnved4(mgwa,mxmsgld4,mgwb)
119 DO ii = 1,
nmwrd(mgwb)
127 CALL
pkbs1(ivmnem(i),mgwa,cmnem(i))
136 IF ( ( csmf.EQ.
'Y' ) .AND. (
idxmsg(mgwa).NE.1 ) )
THEN
143 CALL
pkb(mbyt,24,mgwa,ibit)
145 CALL
pkc(sevn,4,mgwa,ibit)
147 CALL
stndrd(lunit,mgwa,mxmsgld4,mgwb)
155 DO ii = 1,
nmwrd(mgwb)
164 IF ( ( ctrt.EQ.
'Y' ) .AND. (
idxmsg(mgwa).NE.1 ) )
THEN
169 CALL
pkb(mbyt,24,mgwa,ibit)
171 CALL
atrcpt(mgwa,mxmsgld4,mgwb)
179 DO ii = 1,
nmwrd(mgwb)
186 CALL
getlens(mgwa,4,len0,len1,len2,len3,len4,l5)
191 IF(
iupbs01(mgwa,
'BEN').LT.4)
THEN
192 IF(mod(len1,2).NE.0) goto 901
193 IF(mod(len2,2).NE.0) goto 902
194 IF(mod(len3,2).NE.0) goto 903
195 IF(mod(len4,2).NE.0)
THEN
200 iad4 = len0+len1+len2+len3
204 CALL
pkb(len4,24,mgwa,ibit)
206 CALL
pkb(0,8,mgwa,ibit)
215 CALL
pkc(bufr, 4,mgwa,ibit)
216 CALL
pkb(mbyt,24,mgwa,ibit)
219 CALL
pkc(sevn, 4,mgwa,kbit)
229 CALL
padmsg(mgwa,mxmsgld4,npbyt)
235 CALL
status(lunit,lun,il,im)
236 IF(null(lun).EQ.0)
THEN
242 CALL
errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
243 WRITE ( unit=errstr, fmt=
'(A,I4,A,I7)')
244 .
'BUFRLIB: MSGWRT: LUNIT =', lunit,
', BYTES =', mbyt+npbyt
246 CALL
errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
253 IF(
idxmsg(mgwa).NE.1)
THEN
261 msgtxt(i,lun) = mgwa(i)
270 . (
'BUFRLIB: MSGWRT - LENGTH OF SECTION 1 IS NOT A MULTIPLE OF 2')
272 . (
'BUFRLIB: MSGWRT - LENGTH OF SECTION 2 IS NOT A MULTIPLE OF 2')
274 . (
'BUFRLIB: MSGWRT - LENGTH OF SECTION 3 IS NOT A MULTIPLE OF 2')
subroutine msgwrt(LUNIT, MESG, MGBYT)
This subroutine performs final checks and updates on a BUFR message before writing it to a specified ...
function nmwrd(MBAY)
GIVEN AN INTEGER ARRAY CONTAINING SECTION ZERO FROM A BUFR MESSAGE, THIS FUNCTION DETERMINES A COUNT ...
subroutine pkc(CHR, NCHR, IBAY, IBIT)
This subroutine encodes a character string within a specified number of bits of an integer array...
subroutine stndrd(LUNIT, MSGIN, LMSGOT, MSGOT)
This subroutine performs the same function as subroutine stdmsg(), except that it operates on a BUFR ...
subroutine cnved4(MSGIN, LMSGOT, MSGOT)
This subroutine reads an input BUFR message encoded using BUFR edition 3 and outputs an equivalent BU...
subroutine getlens(MBAY, LL, LEN0, LEN1, LEN2, LEN3, LEN4, LEN5)
This subroutine reads the lengths of all of the individual sections of a given BUFR message...
void cwrbufr(f77int *nfile, f77int *bufr, f77int *nwrd)
This subroutine writes a BUFR message into a file that was previously opened for writing.
function idxmsg(MESG)
This function determines whether a given BUFR message contains DX BUFR tables information that was ge...
subroutine pkbs1(IVAL, MBAY, S1MNEM)
This subroutines writes a specified value into a specified location within Section 1 of a BUFR messag...
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
subroutine padmsg(MESG, LMESG, NPBYT)
THIS SUBROUTINE PADS A BUFR MESSAGE WITH ZEROED-OUT BYTES FROM THE END OF THE MESSAGE UP TO THE NEXT ...
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
subroutine pkb(NVAL, NBITS, IBAY, IBIT)
This subroutine encodes an integer value within a specified number of bits of an integer array...
subroutine atrcpt(MSGIN, LMSGOT, MSGOT)
This subroutine reads an input message and outputs an equivalent BUFR message with a tank receipt tim...
subroutine blocks(MBAY, MWRD)
This subroutine encapsulates a BUFR message with IEEE Fortran control words as specified via the most...
function iupbs01(MBAY, S01MNEM)
This function returns a specified value from within Section 0 or Section 1 of a BUFR message...