79 COMMON /tnkrcp/ itryr,itrmo,itrdy,itrhr,itrmi,ctrt
105 CALL
pkb(mbyt,24,iec0,ibit)
107 DO ii = 1,
nmwrd(iec0)
118 IF(cmnem(i).EQ.
'BEN')
THEN
119 IF(ivmnem(i).EQ.4)
THEN
124 CALL
pkb(mbyt,24,mgwa,ibit)
126 CALL
cnved4(mgwa,mxmsgld4,mgwb)
134 DO ii = 1,
nmwrd(mgwb)
142 CALL
pkbs1(ivmnem(i),mgwa,cmnem(i))
151 IF ( ( csmf.EQ.
'Y' ) .AND. (
idxmsg(mgwa).NE.1 ) )
THEN
158 CALL
pkb(mbyt,24,mgwa,ibit)
160 CALL
pkc(sevn,4,mgwa,ibit)
162 CALL
stndrd(lunit,mgwa,mxmsgld4,mgwb)
170 DO ii = 1,
nmwrd(mgwb)
179 IF ( ( ctrt.EQ.
'Y' ) .AND. (
idxmsg(mgwa).NE.1 ) )
THEN
184 CALL
pkb(mbyt,24,mgwa,ibit)
186 CALL
atrcpt(mgwa,mxmsgld4,mgwb)
194 DO ii = 1,
nmwrd(mgwb)
201 CALL
getlens(mgwa,4,len0,len1,len2,len3,len4,l5)
206 IF(
iupbs01(mgwa,
'BEN').LT.4)
THEN
207 IF(mod(len1,2).NE.0) goto 901
208 IF(mod(len2,2).NE.0) goto 902
209 IF(mod(len3,2).NE.0) goto 903
210 IF(mod(len4,2).NE.0)
THEN
215 iad4 = len0+len1+len2+len3
219 CALL
pkb(len4,24,mgwa,ibit)
221 CALL
pkb(0,8,mgwa,ibit)
230 CALL
pkc(bufr, 4,mgwa,ibit)
231 CALL
pkb(mbyt,24,mgwa,ibit)
234 CALL
pkc(sevn, 4,mgwa,kbit)
244 CALL
padmsg(mgwa,mxmsgld4,npbyt)
250 CALL
status(lunit,lun,il,im)
251 IF(null(lun).EQ.0)
THEN
257 CALL
errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
258 WRITE ( unit=errstr, fmt=
'(A,I4,A,I7)')
259 .
'BUFRLIB: MSGWRT: LUNIT =', lunit,
', BYTES =', mbyt+npbyt
261 CALL
errwrt(
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
268 IF(
idxmsg(mgwa).NE.1)
THEN
276 msgtxt(i,lun) = mgwa(i)
285 . (
'BUFRLIB: MSGWRT - LENGTH OF SECTION 1 IS NOT A MULTIPLE OF 2')
287 . (
'BUFRLIB: MSGWRT - LENGTH OF SECTION 2 IS NOT A MULTIPLE OF 2')
289 . (
'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 THE GIVEN BUFR MESSAGE IS A DX DICTIONARY MESSAGE THAT WAS CREATED B...
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...