36 SUBROUTINE cnved4(MSGIN,LMSGOT,MSGOT)
38 dimension msgin(*), msgot(*)
40 COMMON /hrdwrd/ nbytw,nbitw,iord(8)
45 IF(
iupbs01(msgin,
'BEN').EQ.4)
THEN
51 IF(nmw.GT.lmsgot)
GOTO 900
60 CALL getlens(msgin,3,len0,len1,len2,len3,l4,l5)
63 iad4 = iad2 + len2 + len3
73 IF(lenmot.GT.(lmsgot*nbytw))
GOTO 900
80 CALL mvb ( msgin, 1, msgot, 1, 4 )
82 CALL pkb ( lenmot, 24, msgot, ibit )
83 CALL pkb ( 4, 8, msgot, ibit )
87 CALL pkb ( len1ot, 24, msgot, ibit )
88 CALL pkb (
iupbs01(msgin,
'BMT'), 8, msgot, ibit )
89 CALL pkb (
iupbs01(msgin,
'OGCE'), 16, msgot, ibit )
90 CALL pkb (
iupbs01(msgin,
'GSES'), 16, msgot, ibit )
91 CALL pkb (
iupbs01(msgin,
'USN'), 8, msgot, ibit )
92 CALL pkb (
iupbs01(msgin,
'ISC2')*128, 8, msgot, ibit )
93 CALL pkb (
iupbs01(msgin,
'MTYP'), 8, msgot, ibit )
97 CALL pkb ( 255, 8, msgot, ibit )
98 CALL pkb (
iupbs01(msgin,
'MSBT'), 8, msgot, ibit )
99 CALL pkb (
iupbs01(msgin,
'MTV'), 8, msgot, ibit )
100 CALL pkb (
iupbs01(msgin,
'MTVL'), 8, msgot, ibit )
101 CALL pkb (
iupbs01(msgin,
'YEAR'), 16, msgot, ibit )
102 CALL pkb (
iupbs01(msgin,
'MNTH'), 8, msgot, ibit )
103 CALL pkb (
iupbs01(msgin,
'DAYS'), 8, msgot, ibit )
104 CALL pkb (
iupbs01(msgin,
'HOUR'), 8, msgot, ibit )
105 CALL pkb (
iupbs01(msgin,
'MINU'), 8, msgot, ibit )
109 CALL pkb ( 0, 8, msgot, ibit )
114 CALL mvb ( msgin, iad2+1, msgot, (ibit/8)+1, len2+len3-1 )
118 ibit = ( len0 + len1ot + len2 ) * 8
119 CALL pkb ( len3ot, 24, msgot, ibit )
124 ibit = ibit + ( len3ot * 8 ) - 24
125 CALL mvb ( msgin, iad4+1, msgot, (ibit/8)+1, lenm-iad4 )
128900
CALL bort(
'BUFRLIB: CNVED4 - OVERFLOW OF OUTPUT (EDITION 4) '//
129 .
'MESSAGE ARRAY; TRY A LARGER DIMENSION FOR THIS ARRAY')
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
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,...
function iupbs01(MBAY, S01MNEM)
This function returns a specified value from within Section 0 or Section 1 of a BUFR message.
subroutine mvb(IB1, NB1, IB2, NB2, NBM)
THIS SUBROUTINE COPIES A SPECIFIED NUMBER OF BYTES FROM ONE PACKED BINARY ARRAY TO ANOTHER.
function nmwrd(MBAY)
GIVEN AN INTEGER ARRAY CONTAINING SECTION ZERO FROM A BUFR MESSAGE, THIS FUNCTION DETERMINES A COUNT ...
subroutine pkb(NVAL, NBITS, IBAY, IBIT)
This subroutine encodes an integer value within a specified number of bits of an integer array,...