60 SUBROUTINE cpyupd(LUNIT,LIN,LUN,IBYT)
65 COMMON /msgptr/ nby0,nby1,nby2,nby3,nby4,nby5
69 CHARACTER*128 bort_str, errstr
80 IF(
msgfull(mbyt(lun),ibyt,maxbyt)
82 . ((ibyt.GT.65530).AND.(nsub(lun).GT.0)))
THEN
92 CALL
msgwrt(lunit,mbay(1,lun),mbyt(lun))
96 IF(
msgfull(mbyt(lun),ibyt,maxbyt)) goto 900
107 CALL
mvb(mbay(1,lin),mbyt(lin)+1,mbay(1,lun),mbyt(lun)-3,ibyt)
112 mbyt(lun) = mbyt(lun) + ibyt
113 nsub(lun) = nsub(lun) + 1
115 lbit = (nby0+nby1+nby2+4)*8
116 CALL
pkb(nsub(lun),16,mbay(1,lun),lbit)
118 lbyt = nby0+nby1+nby2+nby3
119 nbyt =
iupb(mbay(1,lun),lbyt+1,24)
121 CALL
pkb(nbyt+ibyt,24,mbay(1,lun),lbit)
129 IF(ibyt.GT.65530)
THEN
131 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
132 WRITE ( unit=errstr, fmt=
'(A,I7,A,A)')
133 .
'BUFRLIB: CPYUPD - SUBSET HAS BYTE COUNT = ',ibyt,
' > UPPER ',
136 CALL
errwrt(
'>>>>>>>WILL BE COPIED INTO ITS OWN MESSAGE<<<<<<<<')
137 CALL
errwrt(
'+++++++++++++++++++++WARNING+++++++++++++++++++++++')
140 CALL
msgwrt(lunit,mbay(1,lun),mbyt(lun))
148 900
WRITE(bort_str,
'("BUFRLIB: CPYUPD - THE LENGTH OF THIS SUBSET '//
149 .
'EXCEEDS THE MAXIMUM MESSAGE LENGTH (",I6,")")') maxbyt
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...
function iupb(MBAY, NBYT, NBIT)
THIS FUNCTION UNPACKS AND RETURNS A BINARY INTEGER WORD CONTAINED WITHIN NBIT BITS OF A BUFR MESSAGE ...
subroutine cpyupd(LUNIT, LIN, LUN, IBYT)
THIS SUBROUTINE COPIES A SUBSET FROM ONE MESSAGE BUFFER (ARRAY MBAY IN MODULE BITBUF) TO ANOTHER AND/...
LOGICAL function msgfull(MSIZ, ITOADD, MXSIZ)
THIS LOGICAL FUNCTION DETERMINES WHETHER THE CURRENT SUBSET (OF LENGTH ITOADD BYTES) WILL FIT WITHIN ...
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 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...
This module contains array and variable declarations used to store BUFR messages internally for multi...