1 FUNCTION INVTAG
(NODE
,LUN
,INV1
,INV2
)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
6 C PRGMMR: WOOLLEN ORG: NP20 DATE: 1994-01-06
8 C ABSTRACT: THIS FUNCTION LOOKS FOR A SPECIFIED MNEMONIC WITHIN THE
9 C PORTION OF THE CURRENT SUBSET BUFFER BOUNDED BY THE INDICES INV1
10 C AND INV2. IT IS SIMILAR TO BUFR ARCHIVE LIBRARY FUNCTION INVWIN,
11 C EXCEPT THAT INVWIN SEARCHES BASED ON THE ACTUAL NODE WITHIN THE
12 C INTERNAL JUMP/LINK TABLE, RATHER THAN ON THE MNEMONIC CORRESPONDING
15 C PROGRAM HISTORY LOG:
16 C 1994-01-06 J. WOOLLEN -- ORIGINAL AUTHOR
17 C 1999-11-18 J. WOOLLEN -- THE NUMBER OF BUFR FILES WHICH CAN BE
18 C OPENED AT ONE TIME INCREASED FROM 10 TO 32
19 C (NECESSARY IN ORDER TO PROCESS MULTIPLE
20 C BUFR FILES UNDER THE MPI)
21 C 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
23 C 2003-11-04 D. KEYSER -- MAXJL (MAXIMUM NUMBER OF JUMP/LINK ENTRIES)
24 C INCREASED FROM 15000 TO 16000 (WAS IN
25 C VERIFICATION VERSION); UNIFIED/PORTABLE FOR
26 C WRF; ADDED DOCUMENTATION (INCLUDING
27 C HISTORY); OUTPUTS MORE COMPLETE DIAGNOSTIC
28 C INFO WHEN UNUSUAL THINGS HAPPEN
29 C 2009-03-31 J. WOOLLEN -- ADDED DOCUMENTATION
30 C 2009-04-21 J. ATOR -- USE ERRWRT
32 C USAGE: INVTAG (NODE, LUN, INV1, INV2)
33 C INPUT ARGUMENT LIST:
34 C NODE - INTEGER: JUMP/LINK TABLE INDEX OF MNEMONIC TO LOOK FOR
35 C LUN - INTEGER: I/O STREAM INDEX INTO INTERNAL MEMORY ARRAYS
36 C INV1 - INTEGER: STARTING INDEX OF THE PORTION OF THE SUBSET
37 C BUFFER IN WHICH TO LOOK
38 C INV2 - INTEGER: ENDING INDEX OF THE PORTION OF THE SUBSET
39 C BUFFER IN WHICH TO LOOK
41 C OUTPUT ARGUMENT LIST:
42 C INVTAG - INTEGER: LOCATION INDEX OF NODE WITHIN SPECIFIED
43 C PORTION OF SUBSET BUFFER
47 C THIS ROUTINE CALLS: ERRWRT
48 C THIS ROUTINE IS CALLED BY: UFBRP UFBSEQ UFBSP
49 C Normally not called by any application
53 C LANGUAGE: FORTRAN 77
54 C MACHINE: PORTABLE TO ALL PLATFORMS
60 COMMON /BTABLES
/ MAXTAB
,NTAB
,TAG
(MAXJL
),TYP
(MAXJL
),KNT
(MAXJL
),
61 . JUMP
(MAXJL
),LINK
(MAXJL
),JMPB
(MAXJL
),
62 . IBT
(MAXJL
),IRF
(MAXJL
),ISC
(MAXJL
),
63 . ITP
(MAXJL
),VALI
(MAXJL
),KNTI
(MAXJL
),
64 . ISEQ
(MAXJL
,2),JSEQ
(MAXJL
)
65 COMMON /USRINT
/ NVAL
(NFILES
),INV
(MAXSS
,NFILES
),VAL
(MAXSS
,NFILES
)
72 C----------------------------------------------------------------------
73 C----------------------------------------------------------------------
76 IF(NODE
.EQ
.0) GOTO 200
79 C SEARCH BETWEEN INV1 AND INV2
80 C ----------------------------
82 10 DO INVTAG
=INV1
,INV2
83 IF(TAG
(INV
(INVTAG
,LUN
)).EQ
.TAGN
) GOTO 100
88 200 IF(IPRT
.GE
.2) THEN
89 CALL ERRWRT
('++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
90 CALL ERRWRT
('BUFRLIB: INVTAG - RETURNING WITH A VALUE OF 0')
91 CALL ERRWRT
('++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')