65 COMMON /msgptr/ nby0,nby1,nby2,nby3,nby4,nby5
78 CALL
pad(ibay,ibit,ibyt,8)
84 IF(
msgfull(mbyt(lun),ibyt,maxbyt)
86 . ((ibyt.GT.65530).AND.(nsub(lun).GT.0)))
THEN
96 CALL
msgwrt(lunit,mbay(1,lun),mbyt(lun))
100 IF(
msgfull(mbyt(lun),ibyt,maxbyt))
THEN
105 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
106 WRITE ( unit=errstr, fmt=
'(A,A,I7,A)')
107 .
'BUFRLIB: MSGUPD - SUBSET LONGER THAN ANY POSSIBLE MESSAGE ',
108 .
'{MAXIMUM MESSAGE LENGTH = ', maxbyt,
'}'
110 CALL
errwrt(
'>>>>>>>OVERLARGE SUBSET DISCARDED FROM FILE<<<<<<<<')
111 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
121 CALL
pkb(ibyt,16,ibay,lbit)
129 CALL
mvb(ibay,1,mbay(1,lun),mbyt(lun)-3,ibyt)
134 mbyt(lun) = mbyt(lun) + ibyt
135 nsub(lun) = nsub(lun) + 1
137 lbit = (nby0+nby1+nby2+4)*8
138 CALL
pkb(nsub(lun),16,mbay(1,lun),lbit)
140 lbyt = nby0+nby1+nby2+nby3
141 nbyt =
iupb(mbay(1,lun),lbyt+1,24)
143 CALL
pkb(nbyt+ibyt,24,mbay(1,lun),lbit)
151 CALL
writlc(luh4wlc(ii),chh4wlc(ii),sth4wlc(ii))
162 IF(ibyt.GT.65530)
THEN
164 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
165 WRITE ( unit=errstr, fmt=
'(A,I7,A,A)')
166 .
'BUFRLIB: MSGUPD - SUBSET HAS BYTE COUNT = ',ibyt,
' > UPPER ',
169 CALL
errwrt(
'>>>>>>>WILL BE WRITTEN INTO ITS OWN MESSAGE<<<<<<<<')
170 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
173 CALL
msgwrt(lunit,mbay(1,lun),mbyt(lun))
subroutine msgwrt(LUNIT, MESG, MGBYT)
This subroutine performs final checks and updates on a BUFR message before writing it to a specified ...
subroutine mvb(IB1, NB1, IB2, NB2, NBM)
THIS SUBROUTINE COPIES A SPECIFIED NUMBER OF BYTES FROM ONE PACKED BINARY ARRAY TO ANOTHER...
subroutine msgupd(LUNIT, LUN)
THIS SUBROUTINE PACKS UP THE CURRENT SUBSET WITHIN MEMORY (ARRAY IBAY IN MODULE BITBUF) AND THEN TRIE...
function iupb(MBAY, NBYT, NBIT)
THIS FUNCTION UNPACKS AND RETURNS A BINARY INTEGER WORD CONTAINED WITHIN NBIT BITS OF A BUFR MESSAGE ...
subroutine usrtpl(LUN, INVN, NBMP)
THIS SUBROUTINE STORES THE SUBSET TEMPLATE INTO INTERNAL SUBSET ARRAYS IN MODULE USRINT FOR CASES OF ...
subroutine pad(IBAY, IBIT, IBYT, IPADB)
THIS SUBROUTINE FIRST PACKS THE VALUE FOR THE NUMBER OF BITS BEING "PADDED" (WE'LL GET TO THAT LATE...
LOGICAL function msgfull(MSIZ, ITOADD, MXSIZ)
This function determines whether the current data subset in the internal arrays will fit within the c...
subroutine msgini(LUN)
THIS SUBROUTINE INITIALIZES, WITHIN THE INTERNAL ARRAYS, A NEW BUFR MESSAGE FOR OUTPUT.
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
subroutine pkb(NVAL, NBITS, IBAY, IBIT)
This subroutine encodes an integer value within a specified number of bits of an integer array...
This module contains array and variable declarations used to store BUFR messages internally for multi...
subroutine writlc(LUNIT, CHR, STR)
This subroutine writes a long character string (greater than 8 bytes) to a data subset.