NCEPLIBS-bufr 11.7.1
nemtab.f
Go to the documentation of this file.
1C> @file
2C> @brief Get information about a descriptor, based on the mnemonic
3
4C> This subroutine returns information about a descriptor from the
5C> internal DX BUFR tables, based on the mnemonic associated with
6C> that descriptor.
7C>
8C> @author J. Woollen
9C> @date 1994-01-06
10C>
11C> @param[in] LUN -- integer: Internal I/O stream index associated
12C> with DX BUFR tables
13C> @param[in] NEMO -- character*(*): Mnemonic
14C> @param[out] IDN -- integer: Bit-wise representation of FXY value
15C> for descriptor associated with NEMO
16C> @param[out] TAB -- character: Type associated with IDN
17C> - 'B' = Table B descriptor
18C> - 'D' = Table D descriptor
19C> - 'C' = Table C operator
20C> @param[out] IRET -- integer:
21C> - Positional index of IDN within internal
22C> Table B, if TAB = 'B'
23C> - Positional index of IDN within internal
24C> Table D, if TAB = 'D'
25C> - The X portion of the FXY value in IDN, if
26C> TAB = 'C'
27C> - 0, otherwise
28C>
29C> <b>Program history log:</b>
30C> | Date | Programmer | Comments |
31C> | -----|------------|----------|
32C> | 1994-01-06 | J. Woollen | Original author |
33C> | 1995-06-28 | J. Woollen | Increased the size of internal BUFR table arrays in order to handle bigger files |
34C> | 1999-11-18 | J. Woollen | The number of BUFR files which can be opened at one time increased from 10 to 32 |
35C> | 2000-09-19 | J. Woollen | Added capability to encode and decode data using the operator descriptors (BUFR table C) for changing width and changing scale |
36C> | 2003-11-04 | J. Ator | Added documentation |
37C> | 2003-11-04 | S. Bender | Added remarks and routine interdependencies |
38C> | 2003-11-04 | D. Keyser | Unified/portable for WRF; added documentation |
39C> | 2005-11-29 | J. Ator | Added support for 207 and 208 operators |
40C> | 2010-03-19 | J. Ator | Added support for 204 and 205 operators |
41C> | 2012-03-02 | J. Ator | Added support for 203 operator |
42C> | 2015-02-25 | J. Ator | Allow processing of 2-2x, 2-3x and 2-4X non-marker operators in DX tables |
43C>
44 SUBROUTINE nemtab(LUN,NEMO,IDN,TAB,IRET)
45
46 USE moda_tababd
47
48 CHARACTER*(*) NEMO
49 CHARACTER*8 NEMT
50 CHARACTER*1 TAB
51 LOGICAL FOLVAL
52
53C-----------------------------------------------------------------------
54C-----------------------------------------------------------------------
55
56 folval = nemo(1:1).EQ.'.'
57 iret = 0
58 tab = ' '
59
60C LOOK FOR NEMO IN TABLE B
61C ------------------------
62
63 DO 1 i=1,ntbb(lun)
64 nemt = tabb(i,lun)(7:14)
65 IF(nemt.EQ.nemo) THEN
66 idn = idnb(i,lun)
67 tab = 'B'
68 iret = i
69 GOTO 100
70 ELSEIF(folval.AND.nemt(1:1).EQ.'.') THEN
71 DO j=2,len(nemt)
72 IF(nemt(j:j).NE.'.' .AND. nemt(j:j).NE.nemo(j:j)) GOTO 1
73 ENDDO
74 idn = idnb(i,lun)
75 tab = 'B'
76 iret = i
77 GOTO 100
78 ENDIF
791 ENDDO
80
81C DON'T LOOK IN TABLE D FOR FOLLOWING VALUE-MNEMONICS
82C ---------------------------------------------------
83
84 IF(folval) GOTO 100
85
86C LOOK IN TABLE D IF WE GOT THIS FAR
87C ----------------------------------
88
89 DO i=1,ntbd(lun)
90 nemt = tabd(i,lun)(7:14)
91 IF(nemt.EQ.nemo) THEN
92 idn = idnd(i,lun)
93 tab = 'D'
94 iret = i
95 GOTO 100
96 ENDIF
97 ENDDO
98
99C IF STILL NOTHING, CHECK HERE FOR TABLE C OPERATOR DESCRIPTORS
100C -------------------------------------------------------------
101
102 IF (iokoper(nemo).EQ.1) THEN
103 READ(nemo,'(1X,I2)') iret
104 idn = ifxy(nemo)
105 tab = 'C'
106 GOTO 100
107 ENDIF
108
109C EXIT
110C ----
111
112100 RETURN
113 END
function ifxy(ADSC)
This function converts an FXY value from its 6 character representation to its bit-wise (integer) rep...
Definition: ifxy.f:43
integer function iokoper(NEMO)
This function determines whether a specified mnemonic is a Table C operator supported by the BUFRLIB ...
Definition: iokoper.f:24
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
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 idnd
Bit-wise representations of the FXY values corresponding to tabd.
Definition: moda_tababd.F:57
character *600, dimension(:,:), allocatable tabd
Table D entries for each internal I/O stream.
Definition: moda_tababd.F:60
subroutine nemtab(LUN, NEMO, IDN, TAB, IRET)
This subroutine returns information about a descriptor from the internal DX BUFR tables,...
Definition: nemtab.f:45