NCEPLIBS-bufr 11.7.1
getabdb.f
Go to the documentation of this file.
1C> @file
2C> @author ATOR @date 2005-11-29
3
4C> THIS SUBROUTINE RETURNS INTERNAL TABLE B AND TABLE D
5C> INFORMATION FOR LOGICAL UNIT LUNIT IN A PRE-DEFINED ASCII FORMAT.
6C>
7C> PROGRAM HISTORY LOG:
8C> 2005-11-29 J. ATOR -- ADDED TO BUFR ARCHIVE LIBRARY (WAS IN-LINED
9C> IN PROGRAM NAMSND)
10C> 2014-12-10 J. ATOR -- USE MODULES INSTEAD OF COMMON BLOCKS
11C>
12C> USAGE: CALL GETABDB( LUNIT, TABDB, ITAB, JTAB )
13C> INPUT ARGUMENT LIST:
14C> LUNIT - INTEGER: FORTRAN LOGICAL UNIT NUMBER FOR BUFR FILE
15C> ITAB - INTEGER: DIMENSIONED SIZE OF TABDB ARRAY
16C>
17C> OUTPUT ARGUMENT LIST:
18C> TABDB - CHARACTER*128: (JTAB)-WORD ARRAY OF INTERNAL TABLE B
19C> AND TABLE D INFORMATION
20C> JTAB - INTEGER: NUMBER OF ENTRIES STORED WITHIN TABDB
21C>
22C> REMARKS:
23C> THIS ROUTINE CALLS: NEMTBD STATUS
24C> THIS ROUTINE IS CALLED BY: None
25C> Normally called only by application
26C> programs.
27C>
28 SUBROUTINE getabdb(LUNIT,TABDB,ITAB,JTAB)
29
30 USE moda_tababd
31 USE moda_nmikrp
32
33 CHARACTER*128 TABDB(*)
34 CHARACTER*8 NEMO
35
36C-----------------------------------------------------------------------
37C-----------------------------------------------------------------------
38
39 jtab = 0
40
41C MAKE SURE THE FILE IS OPEN
42C --------------------------
43
44 CALL status(lunit,lun,il,im)
45 IF(il.EQ.0) RETURN
46
47C WRITE OUT THE TABLE D ENTRIES FOR THIS FILE
48C -------------------------------------------
49
50 DO i=1,ntbd(lun)
51 nemo = tabd(i,lun)(7:14)
52 CALL nemtbd(lun,i,nseq,nem(1,1),irp(1,1),krp(1,1))
53 DO j=1,nseq,10
54 jtab = jtab+1
55 IF(jtab.LE.itab) THEN
56 WRITE(tabdb(jtab),1) nemo,(nem(k,1),k=j,min(j+9,nseq))
571 FORMAT('D ',a8,10(1x,a10))
58 ENDIF
59 ENDDO
60 ENDDO
61
62C ADD THE TABLE B ENTRIES
63C -----------------------
64
65 DO i=1,ntbb(lun)
66 jtab = jtab+1
67 IF(jtab.LE.itab) THEN
68 WRITE(tabdb(jtab),2) tabb(i,lun)(7:14),tabb(i,lun)(71:112)
692 FORMAT('B ',a8,1x,a42)
70 ENDIF
71 ENDDO
72
73 RETURN
74 END
subroutine getabdb(LUNIT, TABDB, ITAB, JTAB)
THIS SUBROUTINE RETURNS INTERNAL TABLE B AND TABLE D INFORMATION FOR LOGICAL UNIT LUNIT IN A PRE-DEFI...
Definition: getabdb.f:29
This module contains array and variable declarations used to store DX BUFR tables internally for mult...
Definition: moda_tababd.F:10
character *128, dimension(:,:), allocatable tabb
Table B entries for each internal I/O stream.
Definition: moda_tababd.F:59
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
character *600, dimension(:,:), allocatable tabd
Table D entries for each internal I/O stream.
Definition: moda_tababd.F:60
subroutine nemtbd(LUN, ITAB, NSEQ, NEMS, IRPS, KNTS)
This subroutine returns information about a Table D descriptor from the internal DX BUFR tables.
Definition: nemtbd.f:55
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