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