NCEPLIBS-bufr  12.0.0
arallocf.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Dynamically allocate Fortran language arrays.
3 C>
4 C> @author J. Ator @date 2014-12-04
5 
6 C> This subroutine is called internally during the first call to
7 C> subroutine openbf() from an application program, in order to
8 C> dynamically allocate internal Fortran language arrays based on
9 C> parameter values set during one or more previous calls to function
10 C> isetprm().
11 C>
12 C> All memory allocated within this subroutine can be freed via a
13 C> subsequent call to subroutine exitbufr().
14 C>
15 C> @author J. Ator @date 2014-12-04
16  SUBROUTINE arallocf
17 
18  USE modv_maxcd
19  USE modv_maxjl
20  USE modv_maxmem
21  USE modv_maxmsg
22  USE modv_maxss
23  USE modv_maxtba
24  USE modv_maxtbb
25  USE modv_maxtbd
26  USE modv_mxbtm
27  USE modv_mxbtmse
28  USE modv_mxcdv
29  USE modv_mxcsb
30  USE modv_mxdxts
31  USE modv_mxlcc
32  USE modv_mxmsgl
33  USE modv_mxmtbb
34  USE modv_mxmtbd
35  USE modv_mxnrv
36  USE modv_mxrst
37  USE modv_mxs01v
38  USE modv_mxtamc
39  USE modv_mxtco
40  USE modv_mxh4wlc
41  USE modv_nfiles
42 
43  USE moda_usrint
44  USE moda_usrbit
45  USE moda_ival
46  USE moda_msgcwd
47  USE moda_stbfr
48  USE moda_ufbcpl
49  USE moda_sc3bfr
50  USE moda_unptyp
51  USE moda_lushr
52  USE moda_nulbfr
53  USE moda_stcode
54  USE moda_idrdm
55  USE moda_xtab
56  USE moda_msglim
57  USE moda_bitbuf
58  USE moda_mgwa
59  USE moda_mgwb
60  USE moda_bufrmg
61  USE moda_bufrsr
62  USE moda_msgmem
63  USE moda_tababd
64  USE moda_tables
65  USE moda_usrtmp
66  USE moda_ivttmp
67  USE moda_comprx
68  USE moda_comprs
69  USE moda_mstabs
70  USE moda_rdmtb
71  USE moda_nmikrp
72  USE moda_s01cm
73  USE moda_bitmaps
74  USE moda_nrv203
75  USE moda_rlccmn
76  USE moda_h4wlc
77 
78  CHARACTER*80 ERRSTR
79  CHARACTER*36 BRTSTR
80 
81  COMMON /quiet/ iprt
82 
83 C-----------------------------------------------------------------------
84 C-----------------------------------------------------------------------
85 
86  IF ( iprt .GE. 1 ) THEN
87  CALL errwrt
88  . ('++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
89  errstr = 'BUFRLIB: ARRAYS WILL BE DYNAMICALLY ALLOCATED' //
90  . ' USING THE FOLLOWING VALUES:'
91  CALL errwrt(errstr)
92  WRITE ( errstr, '(A,I7)' ) ' MAXSS = ', maxss
93  CALL errwrt(errstr)
94  WRITE ( errstr, '(A,I4)' ) ' NFILES = ', nfiles
95  CALL errwrt(errstr)
96  WRITE ( errstr, '(A,I7)' ) ' MXMSGL = ', mxmsgl
97  CALL errwrt(errstr)
98  WRITE ( errstr, '(A,I5)' ) ' MXDXTS = ', mxdxts
99  CALL errwrt(errstr)
100  WRITE ( errstr, '(A,I7)' ) ' MAXMSG = ', maxmsg
101  CALL errwrt(errstr)
102  WRITE ( errstr, '(A,I9)' ) ' MAXMEM = ', maxmem
103  CALL errwrt(errstr)
104  WRITE ( errstr, '(A,I5)' ) ' MAXTBA = ', maxtba
105  CALL errwrt(errstr)
106  WRITE ( errstr, '(A,I5)' ) ' MAXTBB = ', maxtbb
107  CALL errwrt(errstr)
108  WRITE ( errstr, '(A,I5)' ) ' MAXTBD = ', maxtbd
109  CALL errwrt(errstr)
110  WRITE ( errstr, '(A,I7)' ) ' MAXJL = ', maxjl
111  CALL errwrt(errstr)
112  WRITE ( errstr, '(A,I6)' ) ' MXCDV = ', mxcdv
113  CALL errwrt(errstr)
114  WRITE ( errstr, '(A,I4)' ) ' MXLCC = ', mxlcc
115  CALL errwrt(errstr)
116  WRITE ( errstr, '(A,I6)' ) ' MXCSB = ', mxcsb
117  CALL errwrt(errstr)
118  WRITE ( errstr, '(A,I5)' ) ' MXMTBB = ', mxmtbb
119  CALL errwrt(errstr)
120  WRITE ( errstr, '(A,I5)' ) ' MXMTBD = ', mxmtbd
121  CALL errwrt(errstr)
122  WRITE ( errstr, '(A,I4)' ) ' MAXCD = ', maxcd
123  CALL errwrt(errstr)
124  WRITE ( errstr, '(A,I4)' ) ' MXNRV = ', mxnrv
125  CALL errwrt(errstr)
126  WRITE ( errstr, '(A,I4)' ) ' MXS01V = ', mxs01v
127  CALL errwrt(errstr)
128  WRITE ( errstr, '(A,I4)' ) ' MXTAMC = ', mxtamc
129  CALL errwrt(errstr)
130  WRITE ( errstr, '(A,I4)' ) ' MXTCO = ', mxtco
131  CALL errwrt(errstr)
132  WRITE ( errstr, '(A,I4)' ) ' MXBTM = ', mxbtm
133  CALL errwrt(errstr)
134  WRITE ( errstr, '(A,I4)' ) ' MXBTMSE = ', mxbtmse
135  CALL errwrt(errstr)
136  WRITE ( errstr, '(A,I4)' ) ' MXH4WLC = ', mxh4wlc
137  CALL errwrt(errstr)
138  WRITE ( errstr, '(A,I4)' ) ' MXRST = ', mxrst
139  CALL errwrt(errstr)
140  CALL errwrt
141  . ('++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
142  END IF
143 
144  brtstr = 'BUFRLIB: ARALLOCF FAILED ALLOCATING '
145 
146 C MODA_USRINT arrays.
147 
148  ALLOCATE( nval(nfiles), stat=iost )
149  IF ( iost .ne. 0 ) CALL bort( brtstr // 'NVAL' )
150 
151  ALLOCATE( inv(maxss,nfiles), stat=iost )
152  IF ( iost .ne. 0 ) CALL bort( brtstr // 'INV' )
153 
154  ALLOCATE( nrfelm(maxss,nfiles), stat=iost )
155  IF ( iost .ne. 0 ) CALL bort( brtstr // 'NRFELM' )
156 
157  ALLOCATE( val(maxss,nfiles), stat=iost )
158  IF ( iost .ne. 0 ) CALL bort( brtstr // 'VAL' )
159 
160 C MODA_USRBIT arrays.
161 
162  ALLOCATE( nbit(maxss), stat=iost )
163  IF ( iost .ne. 0 ) CALL bort( brtstr // 'NBIT' )
164 
165  ALLOCATE( mbit(maxss), stat=iost )
166  IF ( iost .ne. 0 ) CALL bort( brtstr // 'MBIT' )
167 
168 C MODA_IVAL arrays.
169 
170  ALLOCATE( ival(maxss), stat=iost )
171  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IVAL' )
172 
173 C MODA_MSGCWD arrays.
174 
175  ALLOCATE( nmsg(nfiles), stat=iost )
176  IF ( iost .ne. 0 ) CALL bort( brtstr // 'NMSG' )
177 
178  ALLOCATE( nsub(nfiles), stat=iost )
179  IF ( iost .ne. 0 ) CALL bort( brtstr // 'NSUB' )
180 
181  ALLOCATE( msub(nfiles), stat=iost )
182  IF ( iost .ne. 0 ) CALL bort( brtstr // 'MSUB' )
183 
184  ALLOCATE( inode(nfiles), stat=iost )
185  IF ( iost .ne. 0 ) CALL bort( brtstr // 'INODE' )
186 
187  ALLOCATE( idate(nfiles), stat=iost )
188  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IDATE' )
189 
190 C MODA_STBFR arrays.
191 
192  ALLOCATE( iolun(nfiles), stat=iost )
193  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IOLUN' )
194 
195  ALLOCATE( iomsg(nfiles), stat=iost )
196  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IOMSG' )
197 
198 C MODA_UFBCPL arrays.
199 
200  ALLOCATE( luncpy(nfiles), stat=iost )
201  IF ( iost .ne. 0 ) CALL bort( brtstr // 'LUNCPY' )
202 
203 C MODA_SC3BFR arrays.
204 
205  ALLOCATE( isc3(nfiles), stat=iost )
206  IF ( iost .ne. 0 ) CALL bort( brtstr // 'ISC3' )
207 
208  ALLOCATE( tamnem(nfiles), stat=iost )
209  IF ( iost .ne. 0 ) CALL bort( brtstr // 'TAMNEM' )
210 
211 C MODA_UNPTYP arrays.
212 
213  ALLOCATE( msgunp(nfiles), stat=iost )
214  IF ( iost .ne. 0 ) CALL bort( brtstr // 'MSGUNP' )
215 
216 C MODA_LUSHR arrays.
217 
218  ALLOCATE( lus(nfiles), stat=iost )
219  IF ( iost .ne. 0 ) CALL bort( brtstr // 'LUS' )
220 
221 C MODA_NULBFR arrays.
222 
223  ALLOCATE( null(nfiles), stat=iost )
224  IF ( iost .ne. 0 ) CALL bort( brtstr // 'NULL' )
225 
226 C MODA_STCODE arrays.
227 
228  ALLOCATE( iscodes(nfiles), stat=iost )
229  IF ( iost .ne. 0 ) CALL bort( brtstr // 'ISCODES' )
230 
231 C MODA_IDRDM arrays.
232 
233  ALLOCATE( idrdm(nfiles), stat=iost )
234  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IDRDM' )
235 
236 C MODA_XTAB arrays.
237 
238  ALLOCATE( xtab(nfiles), stat=iost )
239  IF ( iost .ne. 0 ) CALL bort( brtstr // 'XTAB' )
240 
241 C MODA_MSGLIM arrays.
242 
243  ALLOCATE( msglim(nfiles), stat=iost )
244  IF ( iost .ne. 0 ) CALL bort( brtstr // 'MSGLIM' )
245 
246 C Calculate MXMSGLD4 from MXMSGL.
247 
248  IF ( mod(mxmsgl,4) .eq. 0 ) THEN
249  mxmsgld4 = mxmsgl/4
250  ELSE
251  mxmsgld4 = mxmsgl/4 + 1
252  END IF
253 
254 C MODA_BITBUF arrays.
255 
256  ALLOCATE( ibay(mxmsgld4), stat=iost )
257  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IBAY' )
258 
259  ALLOCATE( mbyt(nfiles), stat=iost )
260  IF ( iost .ne. 0 ) CALL bort( brtstr // 'MBYT' )
261 
262  ALLOCATE( mbay(mxmsgld4,nfiles), stat=iost )
263  IF ( iost .ne. 0 ) CALL bort( brtstr // 'MBAY' )
264 
265 C MODA_MGWA arrays.
266 
267  ALLOCATE( mgwa(mxmsgld4), stat=iost )
268  IF ( iost .ne. 0 ) CALL bort( brtstr // 'MGWA' )
269 
270 C MODA_MGWB arrays.
271 
272  ALLOCATE( mgwb(mxmsgld4), stat=iost )
273  IF ( iost .ne. 0 ) CALL bort( brtstr // 'MGWB' )
274 
275 C MODA_BUFRMG arrays.
276 
277  ALLOCATE( msglen(nfiles), stat=iost )
278  IF ( iost .ne. 0 ) CALL bort( brtstr // 'MSGLEN' )
279  ALLOCATE( msgtxt(mxmsgld4,nfiles), stat=iost )
280  IF ( iost .ne. 0 ) CALL bort( brtstr // 'MSGTXT' )
281 
282 C MODA_BUFRSR arrays.
283 
284  ALLOCATE( jsr(nfiles), stat=iost )
285  IF ( iost .ne. 0 ) CALL bort( brtstr // 'JSR' )
286 
287  ALLOCATE( jbay(mxmsgld4), stat=iost )
288  IF ( iost .ne. 0 ) CALL bort( brtstr // 'JBAY' )
289 
290 C Calculate MXDXM and MXDXW from MXDXTS and MXMSGLD4.
291 
292  mxdxm = mxdxts*3
294 
295 C MODA_MSGMEM arrays.
296 
297  ALLOCATE( msgp(0:maxmsg), stat=iost )
298  IF ( iost .ne. 0 ) CALL bort( brtstr // 'MSGP' )
299 
300  ALLOCATE( msgs(maxmem), stat=iost )
301  IF ( iost .ne. 0 ) CALL bort( brtstr // 'MSGS' )
302 
303  ALLOCATE( mdx(mxdxw), stat=iost )
304  IF ( iost .ne. 0 ) CALL bort( brtstr // 'MDX' )
305 
306  ALLOCATE( ipdxm(mxdxm), stat=iost )
307  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IPDXM' )
308 
309  ALLOCATE( ifdxts(mxdxts), stat=iost )
310  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IFDXTS' )
311 
312  ALLOCATE( icdxts(mxdxts), stat=iost )
313  IF ( iost .ne. 0 ) CALL bort( brtstr // 'ICDXTS' )
314 
315  ALLOCATE( ipmsgs(mxdxts), stat=iost )
316  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IPMSGS' )
317 
318 C MODA_TABABD arrays.
319 
320  ALLOCATE( ntba(0:nfiles), stat=iost )
321  IF ( iost .ne. 0 ) CALL bort( brtstr // 'NTBA' )
322 
323  ALLOCATE( ntbb(0:nfiles), stat=iost )
324  IF ( iost .ne. 0 ) CALL bort( brtstr // 'NTBB' )
325 
326  ALLOCATE( ntbd(0:nfiles), stat=iost )
327  IF ( iost .ne. 0 ) CALL bort( brtstr // 'NTBD' )
328 
329  ALLOCATE( mtab(maxtba,nfiles), stat=iost )
330  IF ( iost .ne. 0 ) CALL bort( brtstr // 'MTAB' )
331 
332  ALLOCATE( idna(maxtba,nfiles,2), stat=iost )
333  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IDNA' )
334 
335  ALLOCATE( idnb(maxtbb,nfiles), stat=iost )
336  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IDNB' )
337 
338  ALLOCATE( idnd(maxtbd,nfiles), stat=iost )
339  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IDND' )
340 
341  ALLOCATE( taba(maxtba,nfiles), stat=iost )
342  IF ( iost .ne. 0 ) CALL bort( brtstr // 'TABA' )
343 
344  ALLOCATE( tabb(maxtbb,nfiles), stat=iost )
345  IF ( iost .ne. 0 ) CALL bort( brtstr // 'TABB' )
346 
347  ALLOCATE( tabd(maxtbd,nfiles), stat=iost )
348  IF ( iost .ne. 0 ) CALL bort( brtstr // 'TABD' )
349 
350 C MODA_TABLES arrays.
351 
352  ALLOCATE( tag(maxjl), stat=iost )
353  IF ( iost .ne. 0 ) CALL bort( brtstr // 'TAG' )
354 
355  ALLOCATE( typ(maxjl), stat=iost )
356  IF ( iost .ne. 0 ) CALL bort( brtstr // 'TYP' )
357 
358  ALLOCATE( knt(maxjl), stat=iost )
359  IF ( iost .ne. 0 ) CALL bort( brtstr // 'KNT' )
360 
361  ALLOCATE( jump(maxjl), stat=iost )
362  IF ( iost .ne. 0 ) CALL bort( brtstr // 'JUMP' )
363 
364  ALLOCATE( link(maxjl), stat=iost )
365  IF ( iost .ne. 0 ) CALL bort( brtstr // 'LINK' )
366 
367  ALLOCATE( jmpb(maxjl), stat=iost )
368  IF ( iost .ne. 0 ) CALL bort( brtstr // 'JMPB' )
369 
370  ALLOCATE( ibt(maxjl), stat=iost )
371  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IBT' )
372 
373  ALLOCATE( irf(maxjl), stat=iost )
374  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IRF' )
375 
376  ALLOCATE( isc(maxjl), stat=iost )
377  IF ( iost .ne. 0 ) CALL bort( brtstr // 'ISC' )
378 
379  ALLOCATE( itp(maxjl), stat=iost )
380  IF ( iost .ne. 0 ) CALL bort( brtstr // 'ITP' )
381 
382  ALLOCATE( vali(maxjl), stat=iost )
383  IF ( iost .ne. 0 ) CALL bort( brtstr // 'VALI' )
384 
385  ALLOCATE( knti(maxjl), stat=iost )
386  IF ( iost .ne. 0 ) CALL bort( brtstr // 'KNTI' )
387 
388  ALLOCATE( iseq(maxjl,2), stat=iost )
389  IF ( iost .ne. 0 ) CALL bort( brtstr // 'ISEQ' )
390 
391  ALLOCATE( jseq(maxjl), stat=iost )
392  IF ( iost .ne. 0 ) CALL bort( brtstr // 'JSEQ' )
393 
394 C MODA_USRTMP arrays.
395 
396  ALLOCATE( iutmp(maxjl,maxrcr), stat=iost )
397  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IUTMP' )
398 
399  ALLOCATE( vutmp(maxjl,maxrcr), stat=iost )
400  IF ( iost .ne. 0 ) CALL bort( brtstr // 'VUTMP' )
401 
402 C MODA_IVTTMP arrays.
403 
404  ALLOCATE( ttmp(maxjl), stat=iost )
405  IF ( iost .ne. 0 ) CALL bort( brtstr // 'TTMP' )
406 
407  ALLOCATE( itmp(maxjl), stat=iost )
408  IF ( iost .ne. 0 ) CALL bort( brtstr // 'ITMP' )
409 
410  ALLOCATE( vtmp(maxjl), stat=iost )
411  IF ( iost .ne. 0 ) CALL bort( brtstr // 'VTMP' )
412 
413 C MODA_COMPRX arrays.
414 
415  ALLOCATE( kmin(mxcdv), stat=iost )
416  IF ( iost .ne. 0 ) CALL bort( brtstr // 'KMIN' )
417 
418  ALLOCATE( kmax(mxcdv), stat=iost )
419  IF ( iost .ne. 0 ) CALL bort( brtstr // 'KMAX' )
420 
421  ALLOCATE( kmis(mxcdv), stat=iost )
422  IF ( iost .ne. 0 ) CALL bort( brtstr // 'KMIS' )
423 
424  ALLOCATE( kbit(mxcdv), stat=iost )
425  IF ( iost .ne. 0 ) CALL bort( brtstr // 'KBIT' )
426 
427  ALLOCATE( ityp(mxcdv), stat=iost )
428  IF ( iost .ne. 0 ) CALL bort( brtstr // 'ITYP' )
429 
430  ALLOCATE( iwid(mxcdv), stat=iost )
431  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IWID' )
432 
433  ALLOCATE( CHARACTER*(MXLCC) :: CSTR(MXCDV), STAT=iost )
434  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CSTR' )
435 
436 C MODA_COMPRS arrays.
437 
438  ALLOCATE( matx(mxcdv,mxcsb), stat=iost )
439  IF ( iost .ne. 0 ) CALL bort( brtstr // 'MATX' )
440 
441  ALLOCATE( CHARACTER*(MXLCC) :: CATX(MXCDV,MXCSB), STAT=iost )
442  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CATX' )
443 
444 C MODA_MSTABS arrays.
445 
446  ALLOCATE( ibfxyn(mxmtbb), stat=iost )
447  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IBFXYN' )
448 
449  ALLOCATE( cbscl(4,mxmtbb), stat=iost )
450  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CBSCL' )
451 
452  ALLOCATE( cbsref(12,mxmtbb), stat=iost )
453  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CBSREF' )
454 
455  ALLOCATE( cbbw(4,mxmtbb), stat=iost )
456  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CBBW' )
457 
458  ALLOCATE( cbunit(24,mxmtbb), stat=iost )
459  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CBUNIT' )
460 
461  ALLOCATE( cbmnem(8,mxmtbb), stat=iost )
462  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CBMNEM' )
463 
464  ALLOCATE( cbelem(120,mxmtbb), stat=iost )
465  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CBELEM' )
466 
467  ALLOCATE( idfxyn(mxmtbd), stat=iost )
468  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IDFXYN' )
469 
470  ALLOCATE( cdseq(120,mxmtbd), stat=iost )
471  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CDSEQ' )
472 
473  ALLOCATE( cdmnem(8,mxmtbd), stat=iost )
474  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CDMNEM' )
475 
476  ALLOCATE( ndelem(mxmtbd), stat=iost )
477  IF ( iost .ne. 0 ) CALL bort( brtstr // 'NDELEM' )
478 
479  ALLOCATE( idefxy(mxmtbd*maxcd), stat=iost )
480  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IDEFXY' )
481 
482 C MODA_RDMTB arrays.
483 
484  ALLOCATE( iefxyn(mxmtbd,maxcd), stat=iost )
485  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IEFXYN' )
486 
487  ALLOCATE( cmdscb(mxmtbb), stat=iost )
488  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CMDSCB' )
489 
490  ALLOCATE( cmdscd(mxmtbd), stat=iost )
491  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CMDSCD' )
492 
493  ALLOCATE( ceelem(mxmtbd,maxcd), stat=iost )
494  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CEELEM' )
495 
496 C MODA_NMIKRP arrays.
497 
498  ALLOCATE( nem(maxcd,10), stat=iost )
499  IF ( iost .ne. 0 ) CALL bort( brtstr // 'NEM' )
500 
501  ALLOCATE( irp(maxcd,10), stat=iost )
502  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IRP' )
503 
504  ALLOCATE( krp(maxcd,10), stat=iost )
505  IF ( iost .ne. 0 ) CALL bort( brtstr // 'KRP' )
506 
507 C MODA_S01CM arrays.
508 
509  ALLOCATE( ivmnem(mxs01v), stat=iost )
510  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IVMNEM' )
511 
512  ALLOCATE( cmnem(mxs01v), stat=iost )
513  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CMNEM' )
514 
515 C MODA_BITMAPS arrays.
516 
517  ALLOCATE( inodtamc(mxtamc), stat=iost )
518  IF ( iost .ne. 0 ) CALL bort( brtstr // 'INODTAMC' )
519 
520  ALLOCATE( ntco(mxtamc), stat=iost )
521  IF ( iost .ne. 0 ) CALL bort( brtstr // 'NTCO' )
522 
523  ALLOCATE( ctco(mxtamc,mxtco), stat=iost )
524  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CTCO' )
525 
526  ALLOCATE( inodtco(mxtamc,mxtco), stat=iost )
527  IF ( iost .ne. 0 ) CALL bort( brtstr // 'INODTCO' )
528 
529  ALLOCATE( nbtmse(mxbtm), stat=iost )
530  IF ( iost .ne. 0 ) CALL bort( brtstr // 'NBTMSE' )
531 
532  ALLOCATE( istbtm(mxbtm), stat=iost )
533  IF ( iost .ne. 0 ) CALL bort( brtstr // 'ISTBTM' )
534 
535  ALLOCATE( iszbtm(mxbtm), stat=iost )
536  IF ( iost .ne. 0 ) CALL bort( brtstr // 'ISZBTM' )
537 
538  ALLOCATE( ibtmse(mxbtm,mxbtmse), stat=iost )
539  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IBTMSE' )
540 
541 C MODA_NRV203 arrays.
542 
543  ALLOCATE( tagnrv(mxnrv), stat=iost )
544  IF ( iost .ne. 0 ) CALL bort( brtstr // 'TAGNRV' )
545 
546  ALLOCATE( inodnrv(mxnrv), stat=iost )
547  IF ( iost .ne. 0 ) CALL bort( brtstr // 'INODNRV' )
548 
549  ALLOCATE( nrv(mxnrv), stat=iost )
550  IF ( iost .ne. 0 ) CALL bort( brtstr // 'NRV' )
551 
552  ALLOCATE( isnrv(mxnrv), stat=iost )
553  IF ( iost .ne. 0 ) CALL bort( brtstr // 'ISNRV' )
554 
555  ALLOCATE( ienrv(mxnrv), stat=iost )
556  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IENRV' )
557 
558 C MODA_RLCCMN arrays.
559 
560  ALLOCATE( irnch(mxrst), stat=iost )
561  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IRNCH' )
562 
563  ALLOCATE( irbit(mxrst), stat=iost )
564  IF ( iost .ne. 0 ) CALL bort( brtstr // 'IRBIT' )
565 
566  ALLOCATE( crtag(mxrst), stat=iost )
567  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CRTAG' )
568 
569 C MODA_H4WLC arrays.
570 
571  ALLOCATE( luh4wlc(mxh4wlc), stat=iost )
572  IF ( iost .ne. 0 ) CALL bort( brtstr // 'LUH4WLC' )
573 
574  ALLOCATE( sth4wlc(mxh4wlc), stat=iost )
575  IF ( iost .ne. 0 ) CALL bort( brtstr // 'STH4WLC' )
576 
577  ALLOCATE( chh4wlc(mxh4wlc), stat=iost )
578  IF ( iost .ne. 0 ) CALL bort( brtstr // 'CHH4WLC' )
579 
580  RETURN
581  END
subroutine arallocf
This subroutine is called internally during the first call to subroutine openbf() from an application...
Definition: arallocf.f:17
subroutine bort(STR)
Log one error message and abort application program.
Definition: bort.f:18
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
Definition: errwrt.f:36
This module contains array and variable declarations used to store BUFR messages internally for multi...
integer, dimension(:), allocatable ibay
Current data subset.
integer, dimension(:,:), allocatable mbay
Current BUFR message for each internal I/O stream.
integer, dimension(:), allocatable mbyt
Length (in bytes) of current BUFR message for each internal I/O stream.
This module contains array and variable declarations used to store bitmaps internally within a data s...
integer, dimension(:), allocatable iszbtm
Size of bitmap (total number of entries, whether "set" (set to a value of 0) or not).
integer, dimension(:,:), allocatable inodtco
Entries within jump/link table which contain Table C operators.
integer, dimension(:), allocatable istbtm
Ordinal position in data subset definition corresponding to the first entry of the bitmap.
integer, dimension(:), allocatable inodtamc
Entries within jump/link table which contain Table A mnemonics.
integer, dimension(:,:), allocatable ibtmse
Ordinal positions in bitmap of bits that were "set" (set to a value of 0); these ordinal positions ca...
integer, dimension(:), allocatable nbtmse
Number of "set" entries (set to a value of 0) in the bitmap.
character *6, dimension(:,:), allocatable ctco
Table C operators corresponding to inodtco.
integer, dimension(:), allocatable ntco
Number of Table C operators (with an XX value of 21 or greater) within the data subset definition of ...
This module contains arrays used to store, for each output I/O stream, a copy of the BUFR message tha...
integer, dimension(:), allocatable msglen
Length (in integers) of BUFR message most recently written to each output I/O stream.
integer, dimension(:,:), allocatable msgtxt
BUFR message most recently written to each output I/O stream.
This module contains arrays and variables needed to store the current position within a BUFR file.
integer, dimension(:), allocatable jsr
Indicator of stack status when entering subroutine rewnbf().
integer, dimension(:), allocatable jbay
BUFR message.
This module contains arrays and variable declarations for the storage of data values needed when writ...
integer(8), dimension(:,:), allocatable matx
Non-character data values for all data subsets in message.
This module contains arrays and variable declarations for the storage of data values needed when writ...
integer(8), dimension(:), allocatable kmax
Maximum of each data value across all data subsets in message.
integer, dimension(:), allocatable ityp
Type of each data value:
integer, dimension(:), allocatable iwid
Bit width of underlying data descriptor as defined within Table B for each data value.
integer(8), dimension(:), allocatable kmin
Minimum of each data value across all data subsets in message.
integer, dimension(:), allocatable kbit
Number of bits needed to hold the increments for this data value within each data subset of the messa...
logical, dimension(:), allocatable kmis
"Missing" values flag.
This module contains array and variable declarations needed to store long character strings (greater ...
character *14, dimension(:), allocatable sth4wlc
Table B mnemonics associated with long character strings.
integer, dimension(:), allocatable luh4wlc
I/O stream index into internal arrays for associated output file.
character *120, dimension(:), allocatable chh4wlc
Long character strings.
This module contains a declaration for an array used by subroutine readerme() to read in a new DX dic...
integer, dimension(:), allocatable idrdm
DX BUFR tables message count for each I/O internal stream index.
This module contains a declaration for an array used to pack or unpack all of the values of a BUFR da...
integer(8), dimension(:), allocatable ival
BUFR data subset values.
This module contains arrays which provide working space in several subprograms (usrtpl() and ufbcup()...
character *10, dimension(:), allocatable ttmp
tag array elements for new sections of a growing subset buffer.
real *8, dimension(:), allocatable vtmp
val array elements for new sections of a growing subset buffer.
integer, dimension(:), allocatable itmp
inv array elements for new sections of a growing subset buffer.
This module contains a declaration for an array used by subroutine makestab() to keep track of which ...
integer, dimension(:), allocatable lus
Tracking index for each I/O internal stream index.
This module contains a declaration for an array used by various subroutines and functions to hold a t...
integer, dimension(:), allocatable mgwa
Temporary working copy of BUFR message.
This module contains a declaration for an array used by various subroutines and functions to hold a t...
integer, dimension(:), allocatable mgwb
Temporary working copy of BUFR message.
This module contains declarations for arrays used to store information about the current BUFR message...
integer, dimension(:), allocatable inode
Table A mnemonic for type of BUFR message.
integer, dimension(:), allocatable idate
Section 1 date-time of message.
integer, dimension(:), allocatable nmsg
Current message pointer within logical unit.
integer, dimension(:), allocatable msub
Total number of data subsets in message.
integer, dimension(:), allocatable nsub
Current subset pointer within message.
This module contains a declaration for an array used to keep track of which logical units should not ...
integer, dimension(:), allocatable msglim
Tracking index for each I/O stream index.
This module contains array and variable declarations used to store the contents of one or more BUFR f...
integer, dimension(:), allocatable msgp
Pointers to the beginning of each message within msgs (up to a maximum of MAXMSG, and where array ele...
integer, dimension(:), allocatable ipmsgs
Pointers to first message within msgs for which each DX BUFR table applies.
integer, dimension(:), allocatable msgs
BUFR messages read from one or more BUFR files.
integer, dimension(:), allocatable icdxts
Number of consecutive messages within mdx which constitute each DX BUFR table, beginning with the cor...
integer mxdxm
Maximum number of DX BUFR table messages that can be stored within mdx.
integer, dimension(:), allocatable ifdxts
Pointers to the beginning of each DX BUFR table within mdx.
integer, dimension(:), allocatable mdx
DX BUFR table messages read from one or more BUFR files, for use in decoding the messages in msgs.
integer mxdxw
Maximum number of entries that can be stored within mdx.
integer, dimension(:), allocatable ipdxm
Pointers to the beginning of each message within mdx.
This module contains array and variable declarations used to store master Table B and Table D entries...
integer, dimension(:), allocatable idfxyn
Bit-wise representations of FXY numbers for master Table D.
character, dimension(:,:), allocatable cbunit
Units corresponding to ibfxyn.
character, dimension(:,:), allocatable cbbw
Bit widths corresponding to ibfxyn.
character, dimension(:,:), allocatable cdseq
Sequence names corresponding to idfxyn.
character, dimension(:,:), allocatable cbmnem
Mnemonics corresponding to ibfxyn.
integer, dimension(:), allocatable ndelem
Numbers of child descriptors corresponding to idfxyn.
character, dimension(:,:), allocatable cbelem
Element names corresponding to ibfxyn.
character, dimension(:,:), allocatable cbscl
Scale factors corresponding to ibfxyn.
character, dimension(:,:), allocatable cdmnem
Mnemonics corresponding to idfxyn.
character, dimension(:,:), allocatable cbsref
Reference values corresponding to ibfxyn.
integer, dimension(:), allocatable idefxy
Bit-wise representations of child descriptors corresponding to idfxyn.
integer, dimension(:), allocatable ibfxyn
Bit-wise representations of FXY numbers for master Table B.
This module contains declarations for arrays used by various subroutines to hold information about Ta...
integer, dimension(:,:), allocatable krp
Replication counts corresponding to nem:
integer, dimension(:,:), allocatable irp
Replication indicators corresponding to nem:
character *8, dimension(:,:), allocatable nem
Child mnemonics within Table D sequences.
This module contains array and variable declarations for use with any 2-03-YYY (change reference valu...
integer, dimension(:), allocatable ienrv
End of entry range in jump/link table, within which the corresponding new reference value in nrv will...
character *8, dimension(:), allocatable tagnrv
Table B mnemonic to which the corresponding new reference value in nrv applies.
integer, dimension(:), allocatable isnrv
Start of entry range in jump/link table, within which the corresponding new reference value in nrv wi...
integer *8, dimension(:), allocatable nrv
New reference values corresponding to inodnrv.
integer, dimension(:), allocatable inodnrv
Entries within jump/link table which contain new reference values.
This module contains an array declaration used to store a switch for each internal I/O stream index,...
integer, dimension(:), allocatable null
Output switch for each internal I/O stream index:
This module contains array and variable declarations used to store master Table B and Table D entries...
character *120, dimension(:,:), allocatable ceelem
Element names corresponding to iefxyn.
character *4, dimension(:), allocatable cmdscb
Descriptor codes for Table B elements.
integer, dimension(:,:), allocatable iefxyn
Bit-wise representations of child descriptors of Table D sequences.
character *4, dimension(:), allocatable cmdscd
Descriptor codes for Table D sequences.
This module contains array and variable declarations needed to store information about long character...
integer, dimension(:), allocatable irnch
Lengths (in bytes) of long character strings.
integer, dimension(:), allocatable irbit
Pointers in data subset to first bits of long character strings.
character *10, dimension(:), allocatable crtag
Table B mnemonics associated with long character strings.
This module contains array and variable declarations used to store custom values for certain mnemonic...
integer, dimension(:), allocatable ivmnem
Custom values for use within Sections 0 and 1 of all future output BUFR messages written to all Fortr...
character *8, dimension(:), allocatable cmnem
Section 0 and 1 mnemonics corresponding to ivmnem.
This module contains an array declaration used to store a switch for each internal I/O stream index,...
character *8, dimension(:), allocatable tamnem
Table A mnemonic most recently read from each internal I/O stream index, if isc3 = 1 for that stream.
integer, dimension(:), allocatable isc3
Section 3 switch for each internal I/O stream index:
This module contains array declarations used to store file and message status indicators for all logi...
integer, dimension(:), allocatable iolun
File status indicators.
integer, dimension(:), allocatable iomsg
Message status indicator corresponding to iolun, denoting whether a BUFR message is currently open wi...
This module contains an array declaration used to store a status code for each internal I/O stream in...
integer, dimension(:), allocatable iscodes
Abnormal status codes.
This module contains array and variable declarations used to store DX BUFR tables internally for mult...
integer, dimension(:), allocatable ntba
Number of Table A entries for each internal I/O stream (up to a maximum of MAXTBA,...
character *600, dimension(:,:), allocatable tabd
Table D entries for each internal I/O stream.
character *128, dimension(:,:), allocatable taba
Table A entries for each internal I/O stream.
integer, dimension(:,:), allocatable mtab
Entries within jump/link table corresponding to taba.
integer, dimension(:,:,:), allocatable idna
Message types (in array element 1) and subtypes (in array element 2) corresponding to taba.
integer, dimension(:), allocatable ntbd
Number of Table D entries for each internal I/O stream (up to a maximum of MAXTBD,...
integer, dimension(:), allocatable ntbb
Number of Table B entries for each internal I/O stream (up to a maximum of MAXTBB,...
integer, dimension(:,:), allocatable idnd
Bit-wise representations of the FXY values corresponding to tabd.
integer, dimension(:,:), allocatable idnb
Bit-wise representations of the FXY values corresponding to tabb.
character *128, dimension(:,:), allocatable tabb
Table B entries for each internal I/O stream.
This module contains array and variable declarations used to store the internal jump/link table.
integer, dimension(:), allocatable jseq
Temporary storage used in expanding sequences.
integer, dimension(:), allocatable irf
Reference values corresponding to tag and typ:
integer, dimension(:,:), allocatable iseq
Temporary storage used in expanding sequences.
integer, dimension(:), allocatable isc
Scale factors corresponding to tag and typ:
integer, dimension(:), allocatable ibt
Bit widths corresponding to tag and typ:
integer, dimension(:), allocatable knt
Temporary storage used in calculating delayed replication counts.
real *8, dimension(:), allocatable vali
Initialized data values corresponding to typ:
character *3, dimension(:), allocatable typ
Type indicators corresponding to tag:
integer, dimension(:), allocatable jmpb
Jump backward indices corresponding to tag and typ:
character *10, dimension(:), allocatable tag
Mnemonics in the jump/link table.
integer, dimension(:), allocatable jump
Jump forward indices corresponding to tag and typ:
integer, dimension(:), allocatable itp
Integer type values corresponding to typ:
integer, dimension(:), allocatable link
Link indices corresponding to tag, typ and jmpb:
integer, dimension(:), allocatable knti
Initialized replication counts corresponding to typ and jump:
This module contains an array declaration used to store, for each I/O stream index,...
integer, dimension(:), allocatable luncpy
Logical unit numbers used to copy long character strings between BUFR data subsets.
This module contains an array declaration used to store, for each I/O stream index from which a BUFR ...
integer, dimension(:), allocatable msgunp
Flag indicating how to unpack data subsets from BUFR message:
This module contains array declarations for internal storage of pointers to BUFR data subset values.
integer, dimension(:), allocatable nbit
Length (in bits) of each packed data value in data subset.
integer, dimension(:), allocatable mbit
Pointer in data subset to first bit of each packed data value.
This module contains declarations for arrays used to store data values and associated metadata for th...
integer, dimension(:), allocatable nval
Number of data values in BUFR data subset.
real *8, dimension(:,:), allocatable, target val
Data values.
integer, dimension(:,:), allocatable, target inv
Inventory pointer which links each data value to its corresponding node in the internal jump/link tab...
integer, dimension(:,:), allocatable nrfelm
Referenced data value, for data values which refer to a previous data value in the BUFR data subset v...
This module contains arrays used in subroutine rcstpl() to store subset segments that are being copie...
integer, dimension(:,:), allocatable iutmp
inv array elements for new sections of a growing subset buffer.
real *8, dimension(:,:), allocatable vutmp
val array elements for new sections of a growing subset buffer.
This module contains an array declaration used to track, for each I/O stream index,...
logical, dimension(:), allocatable xtab
Tracking index for each internal I/O stream index.
This module declares and initializes the MAXCD variable.
integer, public maxcd
Maximum number of child descriptors that can be included within the sequence definition of a Table D ...
This module declares and initializes the MAXJL variable.
integer maxjl
Maximum number of entries in the internal jump/link table.
This module declares and initializes the MAXMEM variable.
integer maxmem
Maximum number of bytes that can be used to store BUFR messages within internal memory.
This module declares and initializes the MAXMSG variable.
integer maxmsg
Maximum number of BUFR messages that can be stored within internal memory.
This module declares and initializes the MAXSS variable.
integer maxss
Maximum number of data values that can be read from or written into a data subset by the BUFRLIB soft...
This module declares and initializes the MAXTBA variable.
integer maxtba
Maximum number of entries in the internal BUFR Table A for each BUFR file that is connected to the BU...
This module declares and initializes the MAXTBB variable.
integer maxtbb
Maximum number of entries in the internal BUFR Table B for each BUFR file that is connected to the BU...
This module declares and initializes the MAXTBD variable.
integer maxtbd
Maximum number of entries in the internal BUFR Table D for each BUFR file that is connected to the BU...
This module declares and initializes the MXBTM variable.
integer mxbtm
Maximum number of bitmaps that can be stored internally for a data subset.
This module declares and initializes the MXBTMSE variable.
integer mxbtmse
Maximum number of "set" entries (set to a value of 0) within a bitmap.
This module declares and initializes the MXCDV variable.
integer mxcdv
Maximum number of data values that can be written into a data subset of a compressed BUFR message by ...
This module declares and initializes the MXCSB variable.
integer mxcsb
Maximum number of data subsets that can be written into a compressed BUFR message by the BUFRLIB soft...
This module declares and initializes the MXDXTS variable.
integer mxdxts
Maximum number of dictionary tables that can be stored for use with BUFR messages in internal memory.
This module declares and initializes the MXH4WLC variable.
integer mxh4wlc
Maximum number of long character strings that can be held for writing into an uncompressed BUFR subse...
This module declares and initializes the MXLCC variable.
integer mxlcc
Maximum length (in bytes) of a character string that can be written into a data subset of a compresse...
This module declares and initializes the MXMSGL variable.
integer mxmsgld4
The value of mxmsgl divided by 4.
integer mxmsgl
Maximum length (in bytes) of a BUFR message that can be read or written by the BUFRLIB software.
This module declares and initializes the MXMTBB variable.
integer mxmtbb
Maximum number of entries in a master BUFR Table B.
This module declares and initializes the MXMTBD variable.
integer mxmtbd
Maximum number of entries in a master BUFR Table D.
This module declares and initializes the MXNRV variable.
integer mxnrv
Maximum number of entries in the internal jump/link table that can contain new reference values.
This module declares and initializes the MXRST variable.
integer mxrst
Maximum number of "long" character strings (greater than 8 bytes) that can be read from a data subset...
This module declares and initializes the MXS01V variable.
integer mxs01v
Maximum number of default Section 0 or Section 1 values that can be overwritten within an output BUFR...
This module declares and initializes the MXTAMC variable.
integer mxtamc
Maximum number of Table A mnemonics in the internal jump/link table which contain at least one Table ...
This module declares and initializes the MXTCO variable.
integer mxtco
Maximum number of Table C operators with an XX value of 21 or greater that can appear within the data...
This module declares and initializes the NFILES variable.
integer, public nfiles
Maximum number of BUFR files that can be connected to the BUFRLIB software (for reading or writing) a...