1 SUBROUTINE UPTDD
(ID
,LUN
,IENT
,IRET
)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
6 C PRGMMR: WOOLLEN ORG: NP20 DATE: 1994-01-06
8 C ABSTRACT: THIS SUBROUTINE RETURNS THE BIT-WISE REPRESENTATION OF THE
9 C FXY VALUE CORRESPONDING TO, SEQUENTIALLY, A PARTICULAR (IENT'th)
10 C "CHILD" MNEMONIC OF A TABLE D SEQUENCE ("PARENT") MNEMONIC.
12 C PROGRAM HISTORY LOG:
13 C 1994-01-06 J. WOOLLEN -- ORIGINAL AUTHOR
14 C 1995-06-28 J. WOOLLEN -- INCREASED THE SIZE OF INTERNAL BUFR TABLE
15 C ARRAYS IN ORDER TO HANDLE BIGGER FILES
16 C 1998-07-08 J. WOOLLEN -- REPLACED CALL TO CRAY LIBRARY ROUTINE
17 C "ABORT" WITH CALL TO NEW INTERNAL BUFRLIB
19 C 1999-11-18 J. WOOLLEN -- THE NUMBER OF BUFR FILES WHICH CAN BE
20 C OPENED AT ONE TIME INCREASED FROM 10 TO 32
21 C (NECESSARY IN ORDER TO PROCESS MULTIPLE
22 C BUFR FILES UNDER THE MPI)
23 C 2003-11-04 J. ATOR -- ADDED DOCUMENTATION
24 C 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
26 C 2003-11-04 D. KEYSER -- UNIFIED/PORTABLE FOR WRF; ADDED HISTORY
27 C DOCUMENTATION; OUTPUTS MORE COMPLETE
28 C DIAGNOSTIC INFO WHEN ROUTINE TERMINATES
31 C USAGE: CALL UPTDD (ID, LUN, IENT, IRET)
32 C INPUT ARGUMENT LIST:
33 C ID - INTEGER: POSITIONAL INDEX OF PARENT MNEMONIC WITHIN
34 C INTERNAL BUFR TABLE D ARRAY TABD
35 C LUN - INTEGER: I/O STREAM INDEX INTO INTERNAL MEMORY ARRAYS
36 C IENT - INTEGER: ORDINAL INDICATOR OF CHILD MNEMONIC TO RETURN
37 C FROM WITHIN TABD(ID,LUN) SEQUENCE:
38 C 0 = return a count of the total number of child
39 C mnemonics within TABD(ID,LUN)
41 C OUTPUT ARGUMENT LIST:
42 C IRET - INTEGER: RETURN VALUE (SEE REMARKS)
45 C THE INTERPRETATION OF THE RETURN VALUE IRET DEPENDS UPON THE INPUT
46 C VALUE IENT, AS FOLLOWS:
48 C IF ( IENT = 0 ) THEN
49 C IRET = a count of the total number of child mnemonics within
52 C IRET = the bit-wise representation of the FXY value
53 C corresponding to the IENT'th child mnemonic of
58 C THIS ROUTINE CALLS: BORT IUPM
59 C THIS ROUTINE IS CALLED BY: NEMTBD RESTD
60 C Normally not called by any application
64 C LANGUAGE: FORTRAN 77
65 C MACHINE: PORTABLE TO ALL PLATFORMS
71 COMMON /TABABD
/ NTBA
(0:NFILES
),NTBB
(0:NFILES
),NTBD
(0:NFILES
),
72 . MTAB
(MAXTBA
,NFILES
),IDNA
(MAXTBA
,NFILES
,2),
73 . IDNB
(MAXTBB
,NFILES
),IDND
(MAXTBD
,NFILES
),
74 . TABA
(MAXTBA
,NFILES
),TABB
(MAXTBB
,NFILES
),
76 COMMON /DXTAB
/ MAXDX
,IDXV
,NXSTR
(10),LDXA
(10),LDXB
(10),LDXD
(10),
80 CHARACTER*128 BORT_STR
85 C-----------------------------------------------------------------------
86 C-----------------------------------------------------------------------
90 C CHECK IF IENT IS IN BOUNDS
91 C --------------------------
93 NDSC
= IUPM
(TABD
(ID
,LUN
)(LDD
:LDD
),8)
98 ELSEIF
(IENT
.LT
.0 .OR
. IENT
.GT
.NDSC
) THEN
102 C RETURN THE DESCRIPTOR INDICATED BY IENT
103 C ---------------------------------------
105 IDSC
= LDD
+1 + (IENT
-1)*2
106 IRET
= IUPM
(TABD
(ID
,LUN
)(IDSC
:IDSC
),16)
112 900 WRITE(BORT_STR
,'("BUFRLIB: UPTDD - VALUE OF THIRD ARGUMENT IENT'//
113 . ' (INPUT) IS OUT OF RANGE (IENT =",I4,")")') IENT