NCEPLIBS-bufr 11.7.1
invtag.f
Go to the documentation of this file.
1C> @file
2C> @author WOOLLEN @date 1994-01-06
3
4C> THIS FUNCTION LOOKS FOR A SPECIFIED MNEMONIC WITHIN THE
5C> PORTION OF THE CURRENT SUBSET BUFFER BOUNDED BY THE INDICES INV1
6C> AND INV2. IT IS SIMILAR TO BUFR ARCHIVE LIBRARY FUNCTION INVWIN,
7C> EXCEPT THAT INVWIN SEARCHES BASED ON THE ACTUAL NODE WITHIN THE
8C> INTERNAL JUMP/LINK TABLE, RATHER THAN ON THE MNEMONIC CORRESPONDING
9C> TO THAT NODE.
10C>
11C> PROGRAM HISTORY LOG:
12C> 1994-01-06 J. WOOLLEN -- ORIGINAL AUTHOR
13C> 1999-11-18 J. WOOLLEN -- THE NUMBER OF BUFR FILES WHICH CAN BE
14C> OPENED AT ONE TIME INCREASED FROM 10 TO 32
15C> (NECESSARY IN ORDER TO PROCESS MULTIPLE
16C> BUFR FILES UNDER THE MPI)
17C> 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
18C> INTERDEPENDENCIES
19C> 2003-11-04 D. KEYSER -- MAXJL (MAXIMUM NUMBER OF JUMP/LINK ENTRIES)
20C> INCREASED FROM 15000 TO 16000 (WAS IN
21C> VERIFICATION VERSION); UNIFIED/PORTABLE FOR
22C> WRF; ADDED DOCUMENTATION (INCLUDING
23C> HISTORY); OUTPUTS MORE COMPLETE DIAGNOSTIC
24C> INFO WHEN UNUSUAL THINGS HAPPEN
25C> 2009-03-31 J. WOOLLEN -- ADDED DOCUMENTATION
26C> 2009-04-21 J. ATOR -- USE ERRWRT
27C> 2014-12-10 J. ATOR -- USE MODULES INSTEAD OF COMMON BLOCKS
28C>
29C> USAGE: INVTAG (NODE, LUN, INV1, INV2)
30C> INPUT ARGUMENT LIST:
31C> NODE - INTEGER: JUMP/LINK TABLE INDEX OF MNEMONIC TO LOOK FOR
32C> LUN - INTEGER: I/O STREAM INDEX INTO INTERNAL MEMORY ARRAYS
33C> INV1 - INTEGER: STARTING INDEX OF THE PORTION OF THE SUBSET
34C> BUFFER IN WHICH TO LOOK
35C> INV2 - INTEGER: ENDING INDEX OF THE PORTION OF THE SUBSET
36C> BUFFER IN WHICH TO LOOK
37C>
38C> OUTPUT ARGUMENT LIST:
39C> INVTAG - INTEGER: LOCATION INDEX OF NODE WITHIN SPECIFIED
40C> PORTION OF SUBSET BUFFER
41C> 0 = NOT FOUND
42C>
43C> REMARKS:
44C> THIS ROUTINE CALLS: ERRWRT
45C> THIS ROUTINE IS CALLED BY: UFBRP UFBSEQ UFBSP
46C> Normally not called by any application
47C> programs.
48C>
49 FUNCTION invtag(NODE,LUN,INV1,INV2)
50
51 USE moda_usrint
52 USE moda_tables
53
54 COMMON /quiet/ iprt
55
56 CHARACTER*10 tagn
57
58C----------------------------------------------------------------------
59C----------------------------------------------------------------------
60
61 invtag = 0
62 IF(node.EQ.0) GOTO 200
63 tagn = tag(node)
64
65C SEARCH BETWEEN INV1 AND INV2
66C ----------------------------
67
6810 DO invtag=inv1,inv2
69 IF(tag(inv(invtag,lun)).EQ.tagn) GOTO 100
70 ENDDO
71
72 invtag = 0
73
74200 IF(iprt.GE.2) THEN
75 CALL errwrt('++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
76 CALL errwrt('BUFRLIB: INVTAG - RETURNING WITH A VALUE OF 0')
77 CALL errwrt('++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
78 CALL errwrt(' ')
79 ENDIF
80
81C EXIT
82C ----
83
84100 RETURN
85 END
subroutine errwrt(STR)
This subroutine allows the user to specify a custom location for the logging of error and diagnostic ...
Definition: errwrt.f:42
function invtag(NODE, LUN, INV1, INV2)
THIS FUNCTION LOOKS FOR A SPECIFIED MNEMONIC WITHIN THE PORTION OF THE CURRENT SUBSET BUFFER BOUNDED ...
Definition: invtag.f:50
This module contains array and variable declarations used to store the internal jump/link table.
Definition: moda_tables.F:13
character *10, dimension(:), allocatable tag
Mnemonics in the jump/link table.
Definition: moda_tables.F:132