NCEPLIBS-bufr 11.7.1
wrcmps.f
Go to the documentation of this file.
1C> @file
2C> @author WOOLLEN @date 2002-05-14
3
4C> THIS SUBROUTINE PACKS UP THE CURRENT SUBSET WITHIN MEMORY
5C> (ARRAY IBAY IN MODULE BITBUF), STORING IT FOR COMPRESSION.
6C> IT THEN TRIES TO ADD IT TO THE COMPRESSED BUFR MESSAGE THAT IS
7C> CURRENTLY OPEN WITHIN MEMORY FOR ABS(LUNIX) (ARRAY MGWA). IF THE
8C> SUBSET WILL NOT FIT INTO THE CURRENTLY OPEN MESSAGE, THEN THAT
9C> COMPRESSED MESSAGE IS FLUSHED TO LUNIX AND A NEW ONE IS CREATED IN
10C> ORDER TO HOLD THE CURRENT SUBSET (STILL STORED FOR COMPRESSION).
11C> THIS SUBROUTINE PERFORMS FUNCTIONS SIMILAR TO BUFR ARCHIVE LIBRARY
12C> SUBROUTINE MSGUPD EXCEPT THAT IT ACTS ON COMPRESSED BUFR MESSAGES.
13C>
14C> PROGRAM HISTORY LOG:
15C> 2002-05-14 J. WOOLLEN -- ORIGINAL AUTHOR
16C> 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
17C> INTERDEPENDENCIES
18C> 2003-11-04 D. KEYSER -- MAXJL (MAXIMUM NUMBER OF JUMP/LINK ENTRIES)
19C> INCREASED FROM 15000 TO 16000 (WAS IN
20C> VERIFICATION VERSION); LOGICAL VARIABLES
21C> "WRIT1" AND "FLUSH" NOW SAVED IN GLOBAL
22C> MEMORY (IN COMMON BLOCK /COMPRS/), THIS
23C> FIXED A BUG IN THIS ROUTINE WHICH CAN LEAD
24C> TO MESSAGES BEING WRITTEN OUT BEFORE THEY
25C> ARE FULL; UNIFIED/PORTABLE FOR WRF; ADDED
26C> DOCUMENTATION (INCLUDING HISTORY); OUTPUTS
27C> MORE COMPLETE DIAGNOSTIC INFO WHEN ROUTINE
28C> TERMINATES ABNORMALLY
29C> 2004-08-18 J. ATOR -- REMOVE CALL TO XMSGINI (CMSGINI NOW HAS
30C> SAME CAPABILITY); IMPROVE DOCUMENTATION;
31C> CORRECT LOGIC FOR WHEN A CHARACTER VALUE IS
32C> THE SAME FOR ALL SUBSETS IN A MESSAGE;
33C> MAXIMUM MESSAGE LENGTH INCREASED FROM
34C> 20,000 TO 50,000 BYTES
35C> 2004-08-18 J. WOOLLEN -- 1) ADDED SAVE FOR LOGICAL 'FIRST'
36C> 2) ADDED 'KMISS' TO FIX BUG WHICH WOULD
37C> OCCASIONALLY SKIP OVER SUBSETS
38C> 3) ADDED LOGIC TO MAKE SURE MISSING VALUES
39C> ARE REPRESENTED BY INCREMENTS WITH ALL
40C> BITS ON
41C> 4) REMOVED TWO UNECESSARY REFERENCES TO
42C> 'WRIT1'
43C> 2005-11-29 J. ATOR -- FIX INITIALIZATION BUG FOR CHARACTER
44C> COMPRESSION; INCREASE MXCSB TO 4000;
45C> USE IUPBS01; CHECK EDITION NUMBER OF BUFR
46C> MESSAGE BEFORE PADDING TO AN EVEN BYTE COUNT
47C> 2009-03-23 J. ATOR -- ADDED SAVE FOR IBYT AND JBIT; USE MSGFULL
48C> 2009-08-11 J. WOOLLEN -- MADE CATX AND CSTR BIGGER TO HANDLE LONGER
49C> STRINGS. ALSO SEPARATED MATX,CATX,NCOL FROM
50C> OTHER VARS IN COMMON COMPRS FOR USE IN
51C> SUBROUTINE WRITLC. ALSO PASSED MBAY(1,LUN)
52C> AS ARRAY TO INITIAL CALL TO CMSGINI IN ORDER
53C> FOR USE BY WRITLC.
54C> 2012-02-17 J. ATOR -- FIXED A BUG INVOLVING COMPRESSED FILES WITH
55C> EMBEDDED DICTIONARY MESSAGES
56C> 2014-12-03 J. ATOR -- USE PKX TO PACK LOCAL REFERENCE VALUE FOR
57C> CHARACTER STRINGS
58C> 2014-12-10 J. ATOR -- USE MODULES INSTEAD OF COMMON BLOCKS
59C> 2015-09-24 D. STOKES -- INCLUDE EDGE4 IN SAVE LIST
60C> 2016-03-18 J. ATOR -- FIX BUG INVOLVING ENCODING OF LONG CHARACTER
61C> STRINGS (VIA WRITLC) INTO MESSAGES WHICH
62C> ALSO CONTAIN DELAYED REPLICATION SEQUENCES
63C> 2021-02-24 J. ATOR -- USE IPKM AND PKC INSTEAD OF PKX
64C> 2022-05-06 J. WOOLLEN -- USE PKB8 FOR PACKING 8BYTE INTEGERS
65C>
66C> USAGE: CALL WRCMPS (LUNIX)
67C> INPUT ARGUMENT LIST:
68C> LUNIX - INTEGER: ABSOLUTE VALUE IS FORTRAN LOGICAL UNIT NUMBER
69C> FOR BUFR FILE (IF LUNIX IS LESS THAN ZERO, THIS IS A
70C> "FLUSH" CALL AND THE BUFFER MUST BE CLEARED OUT)
71C>
72C> REMARKS:
73C> THIS ROUTINE CALLS: BORT CMSGINI IUPBS01 MSGFULL
74C> MSGWRT PKB PKC PKX
75C> STATUS UPB UPC USRTPL
76C> THIS ROUTINE IS CALLED BY: CLOSMG WRITSA WRITSB PKB8
77C> Normally not called by any application
78C> programs.
79C>
80 SUBROUTINE wrcmps(LUNIX)
81
82 USE modv_mxcdv
83 USE modv_mxcsb
84
85 USE moda_usrint
86 USE moda_msgcwd
87 USE moda_bitbuf
88 USE moda_mgwa
89 USE moda_tables
90 USE moda_comprx
91 USE moda_comprs
92 USE moda_s01cm
93
94 COMMON /maxcmp/ maxcmb,maxrow,maxcol,ncmsgs,ncsubs,ncbyts
95
96 CHARACTER*128 BORT_STR
97 CHARACTER*8 SUBSET
98 CHARACTER*1 CZERO
99
100 LOGICAL MSGFULL
101
102C NOTE THE FOLLOWING LOGICAL FLAGS:
103C FIRST - KEEPS TRACK OF WHETHER THE CURRENT SUBSET IS THE
104C FIRST SUBSET OF A NEW MESSAGE
105C FLUSH - KEEPS TRACK OF WHETHER THIS SUBROUTINE WAS CALLED
106C WITH LUNIX < 0 IN ORDER TO FORCIBLY FLUSH ANY
107C PARTIALLY-COMPLETED MESSAGE WITHIN MEMORY (PRESUMABLY
108C IMMEDIATELY PRIOR TO EXITING THE CALLING PROGRAM!)
109C WRIT1 - KEEPS TRACK OF WHETHER THE CURRENT MESSAGE NEEDS
110C TO BE WRITTEN OUT
111
112 LOGICAL FIRST,KMISS,EDGE4
113
114 DATA first /.true./
115
116 SAVE first,ibyt,jbit,subset,edge4
117
118C-----------------------------------------------------------------------
119 rln2 = 1./log(2.)
120C-----------------------------------------------------------------------
121
122C GET THE UNIT AND SUBSET TAG
123C ---------------------------
124
125 lunit = abs(lunix)
126 CALL status(lunit,lun,il,im)
127
128C IF THIS IS A "FIRST" CALL, THEN INITIALIZE SOME VALUES IN
129C ORDER TO PREPARE FOR THE CREATION OF A NEW COMPRESSED BUFR
130C MESSAGE FOR OUTPUT.
131
132 1 IF(first) THEN
133 kbyt = 0
134 ncol = 0
135 lunc = lun
136 nrow = nval(lun)
137 subset = tag(inode(lun))
138 first = .false.
139 FLUSH = .false.
140 writ1 = .false.
141
142C THIS CALL TO CMSGINI IS DONE SOLELY IN ORDER TO DETERMINE
143C HOW MANY BYTES (KBYT) WILL BE TAKEN UP IN A MESSAGE BY
144C THE INFORMATION IN SECTIONS 0, 1, 2 AND 3. THIS WILL
145C ALLOW US TO KNOW HOW MANY COMPRESSED DATA SUBSETS WILL
146C FIT INTO SECTION 4 WITHOUT OVERFLOWING MAXCMB. LATER ON,
147C A SEPARATE CALL TO CMSGINI WILL BE DONE TO ACTUALLY
148C INITIALIZE SECTIONS 0, 1, 2 AND 3 OF THE FINAL COMPRESSED
149C BUFR MESSAGE THAT WILL BE WRITTEN OUT.
150
151 CALL cmsgini(lun,mbay(1,lun),subset,idate(lun),ncol,kbyt)
152
153C CHECK THE EDITION NUMBER OF THE BUFR MESSAGE TO BE CREATED
154
155 edge4 = .false.
156 IF(ns01v.GT.0) THEN
157 ii = 1
158 DO WHILE ( (.NOT.edge4) .AND. (ii.LE.ns01v) )
159 IF( (cmnem(ii).EQ.'BEN') .AND. (ivmnem(ii).GE.4) ) THEN
160 edge4 = .true.
161 ELSE
162 ii = ii+1
163 ENDIF
164 ENDDO
165 ENDIF
166
167 ENDIF
168
169 IF(lun.NE.lunc) GOTO 900
170
171C IF THIS IS A "FLUSH" CALL, THEN CLEAR OUT THE BUFFER (NOTE THAT
172C THERE IS NO CURRENT SUBSET TO BE STORED!) AND PREPARE TO WRITE
173C THE FINAL COMPRESSED BUFR MESSAGE.
174
175 IF(lunix.LT.0) THEN
176 IF(ncol.EQ.0) GOTO 100
177 IF(ncol.GT.0) THEN
178 FLUSH = .true.
179 writ1 = .true.
180 icol = 1
181 GOTO 20
182 ENDIF
183 ENDIF
184
185C CHECK ON SOME OTHER POSSIBLY PROBLEMATIC SITUATIONS
186C ---------------------------------------------------
187
188 IF(ncol+1.GT.mxcsb) THEN
189 GOTO 50
190 ELSEIF(nval(lun).NE.nrow) THEN
191 writ1 = .true.
192 icol = 1
193 GOTO 20
194 ELSEIF(nval(lun).GT.mxcdv) THEN
195 GOTO 901
196 ENDIF
197
198C STORE THE NEXT SUBSET FOR COMPRESSION
199C -------------------------------------
200
201C WILL THE CURRENT SUBSET FIT INTO THE CURRENT MESSAGE?
202C (UNFORTUNATELY, THE ONLY WAY TO FIND OUT IS TO ACTUALLY
203C RE-DO THE COMPRESSION BY RE-COMPUTING ALL OF THE LOCAL
204C REFERENCE VALUES, INCREMENTS, ETC.)
205
206 10 ncol = ncol+1
207 icol = ncol
208 ibit = 16
209 DO i=1,nval(lun)
210 node = inv(i,lun)
211 ityp(i) = itp(node)
212 iwid(i) = ibt(node)
213 IF(ityp(i).EQ.1.OR.ityp(i).EQ.2) THEN
214 CALL up8(matx(i,ncol),ibt(node),ibay,ibit)
215 ELSEIF(ityp(i).EQ.3) THEN
216 CALL upc(catx(i,ncol),ibt(node)/8,ibay,ibit,.true.)
217 ENDIF
218 ENDDO
219
220C COMPUTE THE MIN,MAX,WIDTH FOR EACH ROW - ACCUMULATE LENGTH
221C ----------------------------------------------------------
222
223C LDATA WILL HOLD THE LENGTH IN BITS OF THE COMPRESSED DATA
224C (I.E. THE SUM TOTAL FOR ALL DATA VALUES FOR ALL SUBSETS
225C IN THE MESSAGE)
226
227 20 ldata = 0
228 IF(ncol.LE.0) GOTO 902
229 DO i=1,nrow
230 IF(ityp(i).EQ.1 .OR. ityp(i).EQ.2) THEN
231
232C ROW I OF THE COMPRESSION MATRIX CONTAINS NUMERIC VALUES,
233C SO KMIS(I) WILL STORE:
234C .FALSE. IF ALL SUCH VALUES ARE NON-"MISSING"
235C .TRUE. OTHERWISE
236
237 imiss = 2**iwid(i)-1
238 IF(icol.EQ.1) THEN
239 kmin(i) = imiss
240 kmax(i) = 0
241 kmis(i) = .false.
242 ENDIF
243 DO j=icol,ncol
244 IF(matx(i,j).LT.imiss) THEN
245 kmin(i) = min(kmin(i),matx(i,j))
246 kmax(i) = max(kmax(i),matx(i,j))
247 ELSE
248 kmis(i) = .true.
249 ENDIF
250 ENDDO
251 kmiss = kmis(i).AND.kmin(i).LT.imiss
252 range = max(1,kmax(i)-kmin(i)+1)
253 IF(ityp(i).EQ.1.AND.range.GT.1) THEN
254
255C THE DATA VALUES IN ROW I OF THE COMPRESSION MATRIX
256C ARE DELAYED DESCRIPTOR REPLICATION FACTORS AND ARE
257C NOT ALL IDENTICAL (I.E. RANGE.GT.1), SO WE CANNOT
258C COMPRESS ALL OF THESE SUBSETS INTO THE SAME MESSAGE.
259C ASSUMING THAT NONE OF THE VALUES ARE "MISSING",
260C EXCLUDE THE LAST SUBSET (I.E. THE LAST COLUMN
261C OF THE MATRIX) AND TRY RE-COMPRESSING AGAIN.
262
263 IF(kmiss) GOTO 903
264 writ1 = .true.
265 ncol = ncol-1
266 icol = 1
267 GOTO 20
268 ELSEIF(ityp(i).EQ.2.AND.(range.GT.1..OR.kmiss)) THEN
269
270C THE DATA VALUES IN ROW I OF THE COMPRESSION MATRIX
271C ARE NUMERIC VALUES THAT ARE NOT ALL IDENTICAL.
272C COMPUTE THE NUMBER OF BITS NEEDED TO HOLD THE
273C LARGEST OF THE INCREMENTS.
274
275 kbit(i) = nint(log(range)*rln2)
276 IF(2**kbit(i)-1.LE.range) kbit(i) = kbit(i)+1
277
278C HOWEVER, UNDER NO CIRCUMSTANCES SHOULD THIS NUMBER
279C EVER EXCEED THE WIDTH OF THE ORIGINAL UNDERLYING
280C DESCRIPTOR!
281
282 IF(kbit(i).GT.iwid(i)) kbit(i) = iwid(i)
283 ELSE
284
285C THE DATA VALUES IN ROW I OF THE COMPRESSION MATRIX
286C ARE NUMERIC VALUES THAT ARE ALL IDENTICAL, SO THE
287C INCREMENTS WILL BE OMITTED FROM THE MESSAGE.
288
289 kbit(i) = 0
290 ENDIF
291 ldata = ldata + iwid(i) + 6 + ncol*kbit(i)
292 ELSEIF(ityp(i).EQ.3) THEN
293
294C ROW I OF THE COMPRESSION MATRIX CONTAINS CHARACTER VALUES,
295C SO KMIS(I) WILL STORE:
296C .FALSE. IF ALL SUCH VALUES ARE IDENTICAL
297C .TRUE. OTHERWISE
298
299 IF(icol.EQ.1) THEN
300 cstr(i) = catx(i,1)
301 kmis(i) = .false.
302 ENDIF
303 DO j=icol,ncol
304 IF ( (.NOT.kmis(i)) .AND. (cstr(i).NE.catx(i,j)) ) THEN
305 kmis(i) = .true.
306 ENDIF
307 ENDDO
308 IF (kmis(i)) THEN
309
310C THE DATA VALUES IN ROW I OF THE COMPRESSION MATRIX
311C ARE CHARACTER VALUES THAT ARE NOT ALL IDENTICAL.
312
313 kbit(i) = iwid(i)
314 ELSE
315
316C THE DATA VALUES IN ROW I OF THE COMPRESSION MATRIX
317C ARE CHARACTER VALUES THAT ARE ALL IDENTICAL, SO THE
318C INCREMENTS WILL BE OMITTED FROM THE MESSAGE.
319
320 kbit(i) = 0
321 ENDIF
322 ldata = ldata + iwid(i) + 6 + ncol*kbit(i)
323 ENDIF
324 ENDDO
325
326C ROUND DATA LENGTH UP TO A WHOLE BYTE COUNT
327C ------------------------------------------
328
329 ibyt = (ldata+8-mod(ldata,8))/8
330
331C DEPENDING ON THE EDITION NUMBER OF THE MESSAGE, WE NEED TO ENSURE
332C THAT WE ROUND TO AN EVEN BYTE COUNT
333
334 IF( (.NOT.edge4) .AND. (mod(ibyt,2).NE.0) ) ibyt = ibyt+1
335
336 jbit = ibyt*8-ldata
337
338C CHECK ON COMPRESSED MESSAGE LENGTH, EITHER WRITE/RESTORE OR RETURN
339C ------------------------------------------------------------------
340
341 IF(msgfull(ibyt,kbyt,maxcmb)) THEN
342
343C THE CURRENT SUBSET WILL NOT FIT INTO THE CURRENT MESSAGE.
344C SET THE FLAG TO INDICATE THAT A MESSAGE WRITE IS NEEDED,
345C THEN GO BACK AND RE-COMPRESS THE SECTION 4 DATA FOR THIS
346C MESSAGE WHILE *EXCLUDING* THE DATA FOR THE CURRENT SUBSET
347C (WHICH WILL BE HELD AND STORED AS THE FIRST SUBSET OF A
348C NEW MESSAGE AFTER WRITING THE CURRENT MESSAGE!).
349
350 writ1 = .true.
351 ncol = ncol-1
352 icol = 1
353 GOTO 20
354 ELSEIF(.NOT.writ1) THEN
355
356C ADD THE CURRENT SUBSET TO THE CURRENT MESSAGE AND RETURN.
357
358 CALL usrtpl(lun,1,1)
359 nsub(lun) = -ncol
360 GOTO 100
361 ENDIF
362
363C WRITE THE COMPLETE COMPRESSED MESSAGE
364C -------------------------------------
365
366C NOW IT IS TIME TO DO THE "REAL" CALL TO CMSGINI TO ACTUALLY
367C INITIALIZE SECTIONS 0, 1, 2 AND 3 OF THE FINAL COMPRESSED
368C BUFR MESSAGE THAT WILL BE WRITTEN OUT.
369
370 50 CALL cmsgini(lun,mgwa,subset,idate(lun),ncol,ibyt)
371
372C NOW ADD THE SECTION 4 DATA.
373
374 ibit = ibyt*8
375 DO i=1,nrow
376 IF(ityp(i).EQ.1.OR.ityp(i).EQ.2) THEN
377 CALL pkb8(kmin(i),iwid(i),mgwa,ibit)
378 CALL pkb(kbit(i), 6,mgwa,ibit)
379 IF(kbit(i).GT.0) THEN
380 DO j=1,ncol
381 IF(matx(i,j).LT.2_8**iwid(i)-1) THEN
382 incr = matx(i,j)-kmin(i)
383 ELSE
384 incr = 2_8**kbit(i)-1
385 ENDIF
386 CALL pkb8(incr,kbit(i),mgwa,ibit)
387 ENDDO
388 ENDIF
389 ELSEIF(ityp(i).EQ.3) THEN
390 nchr = iwid(i)/8
391 IF(kbit(i).GT.0) THEN
392 CALL ipkm(czero,1,0)
393 DO j=1,nchr
394 CALL pkc(czero,1,mgwa,ibit)
395 ENDDO
396 CALL pkb(nchr, 6,mgwa,ibit)
397 DO j=1,ncol
398 CALL pkc(catx(i,j),nchr,mgwa,ibit)
399 ENDDO
400 ELSE
401 CALL pkc(cstr(i),nchr,mgwa,ibit)
402 CALL pkb( 0, 6,mgwa,ibit)
403 ENDIF
404 ENDIF
405 ENDDO
406
407C FILL IN THE END OF THE MESSAGE
408C ------------------------------
409
410C PAD THE END OF SECTION 4 WITH ZEROES UP TO THE NECESSARY
411C BYTE COUNT.
412
413 CALL pkb( 0,jbit,mgwa,ibit)
414
415C ADD SECTION 5.
416
417 CALL pkc('7777', 4,mgwa,ibit)
418
419C SEE THAT THE MESSAGE BYTE COUNTERS AGREE THEN WRITE A MESSAGE
420C -------------------------------------------------------------
421
422 IF(mod(ibit,8).NE.0) GOTO 904
423 lbyt = iupbs01(mgwa,'LENM')
424 nbyt = ibit/8
425 IF(nbyt.NE.lbyt) GOTO 905
426
427 CALL msgwrt(lunit,mgwa,nbyt)
428
429 maxrow = max(maxrow,nrow)
430 maxcol = max(maxcol,ncol)
431 ncmsgs = ncmsgs+1
432 ncsubs = ncsubs+ncol
433 ncbyts = ncbyts+nbyt
434
435C RESET
436C -----
437
438C NOW, UNLESS THIS WAS A "FLUSH" CALL TO THIS SUBROUTINE, GO BACK
439C AND INITIALIZE A NEW MESSAGE TO HOLD THE CURRENT SUBSET THAT WE
440C WERE NOT ABLE TO FIT INTO THE MESSAGE THAT WAS JUST WRITTEN OUT.
441
442 first = .true.
443 IF(.NOT.flush) GOTO 1
444
445C EXITS
446C -----
447
448100 RETURN
449900 WRITE(bort_str,'("BUFRLIB: WRCMPS - I/O STREAM INDEX FOR THIS '//
450 . .NE.'CALL (",I3,") I/O STREAM INDEX FOR INITIAL CALL (",I3,")'//
451 . ' - UNIT NUMBER NOW IS",I4)') lun,lunc,lunix
452 CALL bort(bort_str)
453901 WRITE(bort_str,'("BUFRLIB: WRCMPS - NO. OF ELEMENTS IN THE '//
454 . .GT.'SUBSET (",I6,") THE NO. OF ROWS ALLOCATED FOR THE '//
455 . 'COMPRESSION MATRIX (",I6,")")') nval(lun),mxcdv
456 CALL bort(bort_str)
457902 WRITE(bort_str,'("BUFRLIB: WRCMPS - NO. OF COLUMNS CALCULATED '//
458 . .LE.'FOR COMPRESSION MAXRIX IS 0 (=",I6,")")') ncol
459 CALL bort(bort_str)
460903 CALL bort('BUFRLIB: WRCMPS - MISSING DELAYED REPLICATION FACTOR')
461904 CALL bort('BUFRLIB: WRCMPS - THE NUMBER OF BITS IN THE '//
462 . 'COMPRESSED BUFR MSG IS NOT A MULTIPLE OF 8 - MSG MUST END ON '//
463 . ' A BYTE BOUNDARY')
464905 WRITE(bort_str,'("BUFRLIB: WRCMPS - OUTPUT MESSAGE LENGTH FROM '//
465 . 'SECTION 0",I6," DOES NOT EQUAL FINAL PACKED MESSAGE LENGTH ("'//
466 .',I6,")")') lbyt,nbyt
467 CALL bort(bort_str)
468 END
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
Definition: bort.f:23
subroutine cmsgini(LUN, MESG, SUBSET, IDATE, NSUB, NBYT)
THIS SUBROUTINE INITIALIZES A NEW BUFR MESSAGE FOR OUTPUT IN COMPRESSED BUFR.
Definition: cmsgini.f:58
subroutine ipkm(CBAY, NBYT, N)
This subroutine encodes an integer value within a specified number of bytes of a character string,...
Definition: ipkm.f:28
function iupbs01(MBAY, S01MNEM)
This function returns a specified value from within Section 0 or Section 1 of a BUFR message.
Definition: iupbs01.f:74
subroutine msgwrt(LUNIT, MESG, MGBYT)
This subroutine performs final checks and updates on a BUFR message before writing it to a specified ...
Definition: msgwrt.f:55
This module contains array and variable declarations used to store BUFR messages internally for multi...
Definition: moda_bitbuf.F:10
integer, dimension(:,:), allocatable mbay
Current BUFR message for each internal I/O stream.
Definition: moda_bitbuf.F:26
This module contains array and variable declarations used to store the internal jump/link table.
Definition: moda_tables.F:13
integer, dimension(:), allocatable itp
Integer type values corresponding to typ:
Definition: moda_tables.F:141
integer, dimension(:), allocatable ibt
Bit widths corresponding to tag and typ:
Definition: moda_tables.F:138
character *10, dimension(:), allocatable tag
Mnemonics in the jump/link table.
Definition: moda_tables.F:132
This module declares and initializes the MXCDV variable.
Definition: modv_MXCDV.f:13
integer mxcdv
Maximum number of data values that can be written into a data subset of a compressed BUFR message by ...
Definition: modv_MXCDV.f:20
This module declares and initializes the MXCSB variable.
Definition: modv_MXCSB.f:13
integer mxcsb
Maximum number of data subsets that can be written into a compressed BUFR message by the BUFRLIB soft...
Definition: modv_MXCSB.f:19
subroutine pkb8(nval, nbits, ibay, ibit)
This subroutine encodes an 8-byte integer value within a specified number of bits of an integer array...
Definition: pkb8.f:36
subroutine pkb(NVAL, NBITS, IBAY, IBIT)
This subroutine encodes an integer value within a specified number of bits of an integer array,...
Definition: pkb.f:39
subroutine pkc(CHR, NCHR, IBAY, IBIT)
This subroutine encodes a character string within a specified number of bits of an integer array,...
Definition: pkc.f:41
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
Definition: status.f:56
subroutine up8(nval, nbits, ibay, ibit)
THIS SUBROUTINE UNPACKS AND RETURNS AN 8-BYTE INTEGER CONTAINED WITHIN NBITS BITS OF IBAY,...
Definition: up8.f:41
subroutine upc(CHR, NCHR, IBAY, IBIT, CNVNULL)
THIS SUBROUTINE UNPACKS AND RETURNS A CHARACTER STRING OF LENGTH NCHR CONTAINED WITHIN NCHR BYTES OF ...
Definition: upc.f:50
subroutine usrtpl(LUN, INVN, NBMP)
THIS SUBROUTINE STORES THE SUBSET TEMPLATE INTO INTERNAL SUBSET ARRAYS IN MODULE USRINT FOR CASES OF ...
Definition: usrtpl.f:52
subroutine wrcmps(LUNIX)
THIS SUBROUTINE PACKS UP THE CURRENT SUBSET WITHIN MEMORY (ARRAY IBAY IN MODULE BITBUF),...
Definition: wrcmps.f:81