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