22 SUBROUTINE cmsgini(LUN,MESG,SUBSET,IDATE,NSUB,NBYT)
24 CHARACTER*128 BORT_STR
39 CALL nemtba(lun,subset,mtyp,msbt,inod)
40 CALL nemtab(lun,subset,isub,tab,iret)
41 IF(iret.EQ.0)
GOTO 900
47 mcen = mod(jdate/10**8,100)+1
48 mear = mod(jdate/10**6,100)
49 mmon = mod(jdate/10**4,100)
50 mday = mod(jdate/10**2,100)
51 mour = mod(jdate ,100)
56 IF(mcen.EQ.1)
GOTO 901
58 IF(mear.EQ.0) mcen = mcen-1
59 IF(mear.EQ.0) mear = 100
69 CALL pkc(bufr , 4 , mesg,mbit)
76 CALL pkb( 0 , 24 , mesg,mbit)
77 CALL pkb( 3 , 8 , mesg,mbit)
84 CALL pkb(len1 , 24 , mesg,mbit)
85 CALL pkb( 0 , 8 , mesg,mbit)
86 CALL pkb( 3 , 8 , mesg,mbit)
87 CALL pkb( 7 , 8 , mesg,mbit)
88 CALL pkb( 0 , 8 , mesg,mbit)
89 CALL pkb( 0 , 8 , mesg,mbit)
90 CALL pkb(mtyp , 8 , mesg,mbit)
91 CALL pkb(msbt , 8 , mesg,mbit)
92 CALL pkb( 36 , 8 , mesg,mbit)
93 CALL pkb( 0 , 8 , mesg,mbit)
94 CALL pkb(mear , 8 , mesg,mbit)
95 CALL pkb(mmon , 8 , mesg,mbit)
96 CALL pkb(mday , 8 , mesg,mbit)
97 CALL pkb(mour , 8 , mesg,mbit)
98 CALL pkb(mmin , 8 , mesg,mbit)
99 CALL pkb(mcen , 8 , mesg,mbit)
106 CALL pkb(len3 , 24 , mesg,mbit)
107 CALL pkb( 0 , 8 , mesg,mbit)
108 CALL pkb(nsub , 16 , mesg,mbit)
109 CALL pkb( 192 , 8 , mesg,mbit)
110 CALL pkb(isub , 16 , mesg,mbit)
111 CALL pkb( 0 , 8 , mesg,mbit)
123 CALL pkb((nbyt+4) , 24 , mesg,mbit)
124 CALL pkb( 0 , 8 , mesg,mbit)
157 CALL pkb(mbyt,24,mesg,mbit)
163 900
WRITE(bort_str,
'("BUFRLIB: CMSGINI - TABLE A MESSAGE TYPE '//
164 .
'MNEMONIC ",A," NOT FOUND IN INTERNAL TABLE D ARRAYS")') subset
167 . (
'BUFRLIB: CMSGINI - BUFR MESSAGE DATE (IDATE) is 0000000000')
subroutine bort(STR)
Log one error message and abort application program.
subroutine cmsgini(LUN, MESG, SUBSET, IDATE, NSUB, NBYT)
This subroutine initializes a new BUFR message for output in compressed format.
recursive function i4dy(IDATE)
This function converts a date-time with a 2-digit year (YYMMDDHH) to a date-time with a 4-digit year ...
subroutine nemtab(LUN, NEMO, IDN, TAB, IRET)
Get information about a descriptor, based on the mnemonic.
subroutine nemtba(LUN, NEMO, MTYP, MSBT, INOD)
This subroutine searches for a descriptor within Table A of the internal DX BUFR tables.
subroutine pkb(NVAL, NBITS, IBAY, IBIT)
This subroutine encodes an integer value within a specified number of bits of an integer array,...
subroutine pkc(CHR, NCHR, IBAY, IBIT)
Encode a character string within an integer array.