35 #ifdef DYNAMIC_ALLOCATION
79 IF ( iprt .GE. 1 )
THEN
81 . (
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
82 errstr =
'BUFRLIB: ARRAYS WILL BE DYNAMICALLY ALLOCATED' //
83 .
' USING THE FOLLOWING VALUES:'
85 WRITE ( errstr,
'(A,I7)' )
' MAXSS = ', maxss
87 WRITE ( errstr,
'(A,I4)' )
' NFILES = ', nfiles
89 WRITE ( errstr,
'(A,I7)' )
' MXMSGL = ', mxmsgl
91 WRITE ( errstr,
'(A,I5)' )
' MXDXTS = ', mxdxts
93 WRITE ( errstr,
'(A,I7)' )
' MAXMSG = ', maxmsg
95 WRITE ( errstr,
'(A,I9)' )
' MAXMEM = ', maxmem
97 WRITE ( errstr,
'(A,I5)' )
' MAXTBA = ', maxtba
99 WRITE ( errstr,
'(A,I5)' )
' MAXTBB = ', maxtbb
101 WRITE ( errstr,
'(A,I5)' )
' MAXTBD = ', maxtbd
103 WRITE ( errstr,
'(A,I7)' )
' MAXJL = ', maxjl
105 WRITE ( errstr,
'(A,I6)' )
' MXCDV = ', mxcdv
107 WRITE ( errstr,
'(A,I4)' )
' MXLCC = ', mxlcc
109 WRITE ( errstr,
'(A,I6)' )
' MXCSB = ', mxcsb
111 WRITE ( errstr,
'(A,I5)' )
' MXMTBB = ', mxmtbb
113 WRITE ( errstr,
'(A,I5)' )
' MXMTBD = ', mxmtbd
115 WRITE ( errstr,
'(A,I4)' )
' MAXCD = ', maxcd
117 WRITE ( errstr,
'(A,I4)' )
' MXNRV = ', mxnrv
119 WRITE ( errstr,
'(A,I4)' )
' MXS01V = ', mxs01v
121 WRITE ( errstr,
'(A,I4)' )
' MXTAMC = ', mxtamc
123 WRITE ( errstr,
'(A,I4)' )
' MXTCO = ', mxtco
125 WRITE ( errstr,
'(A,I4)' )
' MXBTM = ', mxbtm
127 WRITE ( errstr,
'(A,I4)' )
' MXBTMSE = ', mxbtmse
129 WRITE ( errstr,
'(A,I4)' )
' MXRST = ', mxrst
132 . (
'++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
135 brtstr =
'BUFRLIB: ARALLOCF FAILED ALLOCATING '
139 ALLOCATE( nval(nfiles), stat=iost )
140 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'NVAL' )
142 ALLOCATE( inv(maxss,nfiles), stat=iost )
143 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'INV' )
145 ALLOCATE( nrfelm(maxss,nfiles), stat=iost )
146 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'NRFELM' )
148 ALLOCATE( val(maxss,nfiles), stat=iost )
149 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'VAL' )
153 ALLOCATE( nbit(maxss), stat=iost )
154 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'NBIT' )
156 ALLOCATE( mbit(maxss), stat=iost )
157 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'MBIT' )
161 ALLOCATE( ival(maxss), stat=iost )
162 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IVAL' )
166 ALLOCATE( nmsg(nfiles), stat=iost )
167 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'NMSG' )
169 ALLOCATE( nsub(nfiles), stat=iost )
170 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'NSUB' )
172 ALLOCATE( msub(nfiles), stat=iost )
173 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'MSUB' )
175 ALLOCATE( inode(nfiles), stat=iost )
176 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'INODE' )
178 ALLOCATE( idate(nfiles), stat=iost )
179 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IDATE' )
183 ALLOCATE( iolun(nfiles), stat=iost )
184 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IOLUN' )
186 ALLOCATE( iomsg(nfiles), stat=iost )
187 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IOMSG' )
191 ALLOCATE( luncpy(nfiles), stat=iost )
192 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'LUNCPY' )
196 ALLOCATE( isc3(nfiles), stat=iost )
197 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'ISC3' )
199 ALLOCATE( tamnem(nfiles), stat=iost )
200 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'TAMNEM' )
204 ALLOCATE( msgunp(nfiles), stat=iost )
205 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'MSGUNP' )
209 ALLOCATE( lus(nfiles), stat=iost )
210 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'LUS' )
214 ALLOCATE( null(nfiles), stat=iost )
215 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'NULL' )
219 ALLOCATE( iscodes(nfiles), stat=iost )
220 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'ISCODES' )
224 ALLOCATE( idrdm(nfiles), stat=iost )
225 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IDRDM' )
229 ALLOCATE( xtab(nfiles), stat=iost )
230 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'XTAB' )
234 ALLOCATE( msglim(nfiles), stat=iost )
235 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'MSGLIM' )
239 IF ( mod(mxmsgl,4) .eq. 0 )
THEN
242 mxmsgld4 = mxmsgl/4 + 1
247 ALLOCATE( ibay(mxmsgld4), stat=iost )
248 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IBAY' )
250 ALLOCATE( mbyt(nfiles), stat=iost )
251 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'MBYT' )
253 ALLOCATE( mbay(mxmsgld4,nfiles), stat=iost )
254 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'MBAY' )
258 ALLOCATE( mgwa(mxmsgld4), stat=iost )
259 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'MGWA' )
263 ALLOCATE( mgwb(mxmsgld4), stat=iost )
264 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'MGWB' )
268 ALLOCATE( msglen(nfiles), stat=iost )
269 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'MSGLEN' )
270 ALLOCATE( msgtxt(mxmsgld4,nfiles), stat=iost )
271 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'MSGTXT' )
275 ALLOCATE( jsr(nfiles), stat=iost )
276 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'JSR' )
278 ALLOCATE( jbay(mxmsgld4), stat=iost )
279 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'JBAY' )
284 mxdxw = mxdxm*mxmsgld4
288 ALLOCATE( msgp(0:maxmsg), stat=iost )
289 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'MSGP' )
291 ALLOCATE( msgs(maxmem), stat=iost )
292 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'MSGS' )
294 ALLOCATE( mdx(mxdxw), stat=iost )
295 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'MDX' )
297 ALLOCATE( ipdxm(mxdxm), stat=iost )
298 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IPDXM' )
300 ALLOCATE( ifdxts(mxdxts), stat=iost )
301 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IFDXTS' )
303 ALLOCATE( icdxts(mxdxts), stat=iost )
304 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'ICDXTS' )
306 ALLOCATE( ipmsgs(mxdxts), stat=iost )
307 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IPMSGS' )
311 ALLOCATE( ntba(0:nfiles), stat=iost )
312 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'NTBA' )
314 ALLOCATE( ntbb(0:nfiles), stat=iost )
315 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'NTBB' )
317 ALLOCATE( ntbd(0:nfiles), stat=iost )
318 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'NTBD' )
320 ALLOCATE( mtab(maxtba,nfiles), stat=iost )
321 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'MTAB' )
323 ALLOCATE( idna(maxtba,nfiles,2), stat=iost )
324 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IDNA' )
326 ALLOCATE( idnb(maxtbb,nfiles), stat=iost )
327 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IDNB' )
329 ALLOCATE( idnd(maxtbd,nfiles), stat=iost )
330 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IDND' )
332 ALLOCATE( taba(maxtba,nfiles), stat=iost )
333 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'TABA' )
335 ALLOCATE( tabb(maxtbb,nfiles), stat=iost )
336 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'TABB' )
338 ALLOCATE( tabd(maxtbd,nfiles), stat=iost )
339 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'TABD' )
343 ALLOCATE( tag(maxjl), stat=iost )
344 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'TAG' )
346 ALLOCATE( typ(maxjl), stat=iost )
347 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'TYP' )
349 ALLOCATE( knt(maxjl), stat=iost )
350 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'KNT' )
352 ALLOCATE( jump(maxjl), stat=iost )
353 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'JUMP' )
355 ALLOCATE( link(maxjl), stat=iost )
356 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'LINK' )
358 ALLOCATE( jmpb(maxjl), stat=iost )
359 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'JMPB' )
361 ALLOCATE( ibt(maxjl), stat=iost )
362 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IBT' )
364 ALLOCATE( irf(maxjl), stat=iost )
365 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IRF' )
367 ALLOCATE( isc(maxjl), stat=iost )
368 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'ISC' )
370 ALLOCATE( itp(maxjl), stat=iost )
371 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'ITP' )
373 ALLOCATE( vali(maxjl), stat=iost )
374 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'VALI' )
376 ALLOCATE( knti(maxjl), stat=iost )
377 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'KNTI' )
379 ALLOCATE( iseq(maxjl,2), stat=iost )
380 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'ISEQ' )
382 ALLOCATE( jseq(maxjl), stat=iost )
383 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'JSEQ' )
387 ALLOCATE( iutmp(maxjl,maxrcr), stat=iost )
388 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IUTMP' )
390 ALLOCATE( vutmp(maxjl,maxrcr), stat=iost )
391 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'VUTMP' )
395 ALLOCATE( ttmp(maxjl), stat=iost )
396 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'TTMP' )
398 ALLOCATE( itmp(maxjl), stat=iost )
399 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'ITMP' )
401 ALLOCATE( vtmp(maxjl), stat=iost )
402 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'VTMP' )
406 ALLOCATE( kmin(mxcdv), stat=iost )
407 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'KMIN' )
409 ALLOCATE( kmax(mxcdv), stat=iost )
410 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'KMAX' )
412 ALLOCATE( kmis(mxcdv), stat=iost )
413 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'KMIS' )
415 ALLOCATE( kbit(mxcdv), stat=iost )
416 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'KBIT' )
418 ALLOCATE( ityp(mxcdv), stat=iost )
419 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'ITYP' )
421 ALLOCATE( iwid(mxcdv), stat=iost )
422 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IWID' )
424 ALLOCATE(
CHARACTER*(MXLCC) :: cstr(mxcdv), stat=iost )
425 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CSTR' )
429 ALLOCATE( matx(mxcdv,mxcsb), stat=iost )
430 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'MATX' )
432 ALLOCATE(
CHARACTER*(MXLCC) :: catx(mxcdv,mxcsb), stat=iost )
433 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CATX' )
437 ALLOCATE( ibfxyn(mxmtbb), stat=iost )
438 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IBFXYN' )
440 ALLOCATE( cbscl(4,mxmtbb), stat=iost )
441 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CBSCL' )
443 ALLOCATE( cbsref(12,mxmtbb), stat=iost )
444 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CBSREF' )
446 ALLOCATE( cbbw(4,mxmtbb), stat=iost )
447 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CBBW' )
449 ALLOCATE( cbunit(14,mxmtbb), stat=iost )
450 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CBUNIT' )
452 ALLOCATE( cbmnem(8,mxmtbb), stat=iost )
453 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CBMNEM' )
455 ALLOCATE( cbelem(120,mxmtbb), stat=iost )
456 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CBELEM' )
458 ALLOCATE( idfxyn(mxmtbd), stat=iost )
459 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IDFXYN' )
461 ALLOCATE( cdseq(120,mxmtbd), stat=iost )
462 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CDSEQ' )
464 ALLOCATE( cdmnem(8,mxmtbd), stat=iost )
465 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CDMNEM' )
467 ALLOCATE( ndelem(mxmtbd), stat=iost )
468 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'NDELEM' )
470 ALLOCATE( idefxy(mxmtbd*maxcd), stat=iost )
471 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IDEFXY' )
475 ALLOCATE( iefxyn(mxmtbd,maxcd), stat=iost )
476 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IEFXYN' )
478 ALLOCATE( cmdscb(mxmtbb), stat=iost )
479 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CMDSCB' )
481 ALLOCATE( cmdscd(mxmtbd), stat=iost )
482 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CMDSCD' )
484 ALLOCATE( ceelem(mxmtbd,maxcd), stat=iost )
485 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CEELEM' )
489 ALLOCATE( nem(maxcd,10), stat=iost )
490 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'NEM' )
492 ALLOCATE( irp(maxcd,10), stat=iost )
493 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IRP' )
495 ALLOCATE( krp(maxcd,10), stat=iost )
496 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'KRP' )
500 ALLOCATE( ivmnem(mxs01v), stat=iost )
501 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IVMNEM' )
503 ALLOCATE( cmnem(mxs01v), stat=iost )
504 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CMNEM' )
508 ALLOCATE( inodtamc(mxtamc), stat=iost )
509 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'INODTAMC' )
511 ALLOCATE( ntco(mxtamc), stat=iost )
512 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'NTCO' )
514 ALLOCATE( ctco(mxtamc,mxtco), stat=iost )
515 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CTCO' )
517 ALLOCATE( inodtco(mxtamc,mxtco), stat=iost )
518 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'INODTCO' )
520 ALLOCATE( nbtmse(mxbtm), stat=iost )
521 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'NBTMSE' )
523 ALLOCATE( istbtm(mxbtm), stat=iost )
524 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'ISTBTM' )
526 ALLOCATE( iszbtm(mxbtm), stat=iost )
527 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'ISZBTM' )
529 ALLOCATE( ibtmse(mxbtm,mxbtmse), stat=iost )
530 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IBTMSE' )
534 ALLOCATE( tagnrv(mxnrv), stat=iost )
535 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'TAGNRV' )
537 ALLOCATE( inodnrv(mxnrv), stat=iost )
538 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'INODNRV' )
540 ALLOCATE( nrv(mxnrv), stat=iost )
541 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'NRV' )
543 ALLOCATE( isnrv(mxnrv), stat=iost )
544 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'ISNRV' )
546 ALLOCATE( ienrv(mxnrv), stat=iost )
547 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IENRV' )
551 ALLOCATE( irnch(mxrst), stat=iost )
552 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IRNCH' )
554 ALLOCATE( irbit(mxrst), stat=iost )
555 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'IRBIT' )
557 ALLOCATE( crtag(mxrst), stat=iost )
558 IF ( iost .ne. 0 ) CALL
bort( brtstr //
'CRTAG' )
subroutine arallocf
For dynamic allocation builds of the library, this subroutine is called internally during the first c...
This module contains array and variable declarations for use with any 2-03-YYY (change reference valu...
This module contains array and variable declarations used to store bitmaps internally within a data s...
This module contains array and variable declarations used to store DX BUFR tables internally for mult...
This module contains array and variable declarations used to store the contents of one or more BUFR f...
This module contains array and variable declarations used to store the internal jump/link table...
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
This module contains array and variable declarations used to store master Table B and Table D entries...
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
This module contains array and variable declarations used to store BUFR messages internally for multi...