NCEPLIBS-bufr
11.5.0
|
Go to the source code of this file.
Functions/Subroutines | |
subroutine | numtab (LUN, IDN, NEMO, TAB, IRET) |
THIS SUBROUTINE FIRST SEARCHES FOR AN INTEGER IDN, CONTAINING THE BIT-WISE REPRESENTATION OF A DESCRIPTOR (FXY) VALUE, WITHIN THE INTERNAL BUFR REPLICATION ARRAYS IN COMMON BLOCK /REPTAB/ TO SEE IF IDN IS A REPLICATION DESCRIPTOR OR A REPLICATION FACTOR DESCRIPTOR. More... | |
Definition in file numtab.f.
subroutine numtab | ( | LUN, | |
IDN, | |||
character*(*) | NEMO, | ||
character*1 | TAB, | ||
IRET | |||
) |
THIS SUBROUTINE FIRST SEARCHES FOR AN INTEGER IDN, CONTAINING THE BIT-WISE REPRESENTATION OF A DESCRIPTOR (FXY) VALUE, WITHIN THE INTERNAL BUFR REPLICATION ARRAYS IN COMMON BLOCK /REPTAB/ TO SEE IF IDN IS A REPLICATION DESCRIPTOR OR A REPLICATION FACTOR DESCRIPTOR.
IF THIS SEARCH IS UNSUCCESSFUL, IT SEACHES FOR IDN WITHIN THE INTERNAL BUFR TABLE D AND B ARRAYS TO SEE IF IDN IS A TABLE D OR TABLE B DESCRIPTOR. IF THIS SEARCH IS ALSO UNSUCCESSFUL, IT SEARCHES TO SEE IF IDN IS A TABLE C OPERATOR DESCRIPTOR. IF IDN IS FOUND IN ANY OF THESE SEARCHES, THIS SUBROUTINE RETURNS THE CORRESPONDING MNEMONIC AND OTHER INFORMATION FROM WITHIN EITHER THE INTERNAL ARRAYS FOR REPLICATION, REPLICATION FACTOR, TABLE D OR TABLE B DESCRIPTORS, OR ELSE FROM THE KNOWN VALUES FOR TABLE C DESCRIPTORS. IF IDN IS NOT FOUND, IT RETURNS WITH IRET=0.
PROGRAM HISTORY LOG: 1994-01-06 J. WOOLLEN – ORIGINAL AUTHOR 1995-06-28 J. WOOLLEN – INCREASED THE SIZE OF INTERNAL BUFR TABLE ARRAYS IN ORDER TO HANDLE BIGGER FILES 1999-11-18 J. WOOLLEN – THE NUMBER OF BUFR FILES WHICH CAN BE OPENED AT ONE TIME INCREASED FROM 10 TO 32 (NECESSARY IN ORDER TO PROCESS MULTIPLE BUFR FILES UNDER THE MPI) 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 2003-11-04 J. ATOR – ADDED DOCUMENTATION 2003-11-04 S. BENDER – ADDED REMARKS/BUFRLIB ROUTINE INTERDEPENDENCIES 2003-11-04 D. KEYSER – UNIFIED/PORTABLE FOR WRF; ADDED HISTORY DOCUMENTATION; CORRECTED TYPO ("IDN" WAS SPECIFIED AS "ID" IN CALCULATION OF IRET FOR TAB='C') 2005-11-29 J. ATOR – ADDED SUPPORT FOR 207 AND 208 OPERATORS 2009-04-21 J. ATOR – USE NUMTBD 2010-03-19 J. ATOR – ADDED SUPPORT FOR 204 AND 205 OPERATORS 2012-03-02 J. ATOR – ADDED SUPPORT FOR 203 OPERATOR 2015-02-25 J. ATOR – ALLOW PROCESSING OF 2-2X, 2-3X AND 2-4X NON-MARKER OPERATORS IN DX TABLES
USAGE: CALL NUMTAB (LUN, IDN, NEMO, TAB, IRET) INPUT ARGUMENT LIST: LUN - INTEGER: I/O STREAM INDEX INTO INTERNAL MEMORY ARRAYS IDN - INTEGER: BIT-WISE REPRESENTATION OF DESCRIPTOR (FXY) VALUE
OUTPUT ARGUMENT LIST: NEMO - CHARACTER*(*): MNEMONIC CORRESPONDING TO IDN TAB - CHARACTER*1: TYPE OF FXY VALUE THAT IS BIT-WISE REPRESENTED BY IDN: 'B' = BUFR Table B descriptor 'C' = BUFR Table C descriptor 'D' = BUFR Table D descriptor 'R' = BUFR replication descriptor 'F' = BUFR replication factor descriptor IRET - INTEGER: RETURN VALUE (SEE REMARKS)
REMARKS: THE INTERPRETATION OF THE RETURN VALUE IRET DEPENDS UPON THE RETURN VALUE OF TAB AND THE INPUT VALUE IDN, AS FOLLOWS:
IF ( TAB = 'B' ) THEN IRET = positional index of IDN within internal BUFR Table B array ELSE IF ( TAB = 'C') THEN IRET = the X portion of the FXY value that is bit-wise represented by IDN ELSE IF ( TAB = 'D') THEN IRET = positional index of IDN within internal BUFR Table D array ELSE IF ( TAB = 'R') THEN IF ( IDN denoted regular (i.e. non-delayed) replication ) THEN IRET = ((-1)*Y), where Y is the number of replications ELSE ( i.e. delayed replication ) IRET = positional index (=I) of IDN within internal replication descriptor array IDNR(I,1), where: IRET (=I) =2 –> 16-bit delayed replication descriptor IRET (=I) =3 –> 8-bit delayed replication descriptor IRET (=I) =4 –> 8-bit delayed replication descriptor (stack) IRET (=I) =5 –> 1-bit delayed replication descriptor END IF ELSE IF ( TAB = 'F') THEN IRET = positional index (=I) of IDN within internal replication factor array IDNR(I,2), where: IRET (=I) =2 –> 16-bit replication factor IRET (=I) =3 –> 8-bit replication factor IRET (=I) =4 –> 8-bit replication factor (stack) IRET (=I) =5 –> 1-bit replication factor ELSE IF ( IRET = 0 ) THEN IDN was not found in internal BUFR Table B or D, nor does it represent a Table C operator descriptor, a replication descriptor, or a replication factor descriptor END IF
THIS ROUTINE CALLS: ADN30 IOKOPER NUMTBD THIS ROUTINE IS CALLED BY: CKTABA NEMTBD SEQSDX STNDRD UFBQCP Normally not called by any application programs.
Definition at line 106 of file numtab.f.
References adn30(), iokoper(), and numtbd().
Referenced by cktaba(), nemtbd(), seqsdx(), stndrd(), and ufbqcp().