1 SUBROUTINE GETABDB
(LUNIT
,TABDB
,ITAB
,JTAB
)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
6 C PRGMMR: ATOR ORG: NP12 DATE: 2005-11-29
8 C ABSTRACT: THIS SUBROUTINE RETURNS INTERNAL TABLE B AND TABLE D
9 C INFORMATION FOR LOGICAL UNIT LUNIT IN A PRE-DEFINED ASCII FORMAT.
11 C PROGRAM HISTORY LOG:
12 C 2005-11-29 J. ATOR -- ADDED TO BUFR ARCHIVE LIBRARY (WAS IN-LINED
15 C USAGE: CALL GETABDB( LUNIT, TABDB, ITAB, JTAB )
16 C INPUT ARGUMENT LIST:
17 C LUNIT - INTEGER: FORTRAN LOGICAL UNIT NUMBER FOR BUFR FILE
18 C ITAB - INTEGER: DIMENSIONED SIZE OF TABDB ARRAY
20 C OUTPUT ARGUMENT LIST:
21 C TABDB - CHARACTER*128: (JTAB)-WORD ARRAY OF INTERNAL TABLE B
22 C AND TABLE D INFORMATION
23 C JTAB - INTEGER: NUMBER OF ENTRIES STORED WITHIN TABDB
26 C THIS ROUTINE CALLS: NEMTBD STATUS
27 C THIS ROUTINE IS CALLED BY: None
28 C Normally called only by application
32 C LANGUAGE: FORTRAN 77
33 C MACHINE: PORTABLE TO ALL PLATFORMS
39 COMMON /TABABD
/ NTBA
(0:NFILES
),NTBB
(0:NFILES
),NTBD
(0:NFILES
),
40 . MTAB
(MAXTBA
,NFILES
),IDNA
(MAXTBA
,NFILES
,2),
41 . IDNB
(MAXTBB
,NFILES
),IDND
(MAXTBD
,NFILES
),
42 . TABA
(MAXTBA
,NFILES
),TABB
(MAXTBB
,NFILES
),
48 CHARACTER*128 TABDB
(*)
49 CHARACTER*8 NEMO
,NEMS
(MAXCD
)
50 DIMENSION IRPS
(MAXCD
),KNTS
(MAXCD
)
52 C-----------------------------------------------------------------------
53 C-----------------------------------------------------------------------
57 C MAKE SURE THE FILE IS OPEN
58 C --------------------------
60 CALL STATUS
(LUNIT
,LUN
,IL
,IM
)
63 C WRITE OUT THE TABLE D ENTRIES FOR THIS FILE
64 C -------------------------------------------
67 NEMO
= TABD
(I
,LUN
)(7:14)
68 CALL NEMTBD
(LUN
,I
,NSEQ
,NEMS
,IRPS
,KNTS
)
72 WRITE(TABDB
(JTAB
),1) NEMO
,(NEMS
(K
),K
=J
,MIN
(J
+9,NSEQ
))
73 1 FORMAT('D ',A8
,10(1X
,A10
))
78 C ADD THE TABLE B ENTRIES
79 C -----------------------
84 WRITE(TABDB
(JTAB
),2) TABB
(I
,LUN
)(7:14),TABB
(I
,LUN
)(71:112)
85 2 FORMAT('B ',A8
,1X
,A42
)