NCEPLIBS-bufr 11.7.1
invwin.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 NODE WITHIN THE PORTION
5C> OF THE CURRENT SUBSET BUFFER BOUNDED BY THE INDICES INV1 AND INV2.
6C> IT IS SIMILAR TO BUFR ARCHIVE LIBRARY FUNCTION INVTAG, EXCEPT THAT
7C> INVTAG SEARCHES BASED ON THE MNEMONIC CORRESPONDING TO THE NODE.
8C>
9C> PROGRAM HISTORY LOG:
10C> 1994-01-06 J. WOOLLEN -- ORIGINAL AUTHOR
11C> 1999-11-18 J. WOOLLEN -- THE NUMBER OF BUFR FILES WHICH CAN BE
12C> OPENED AT ONE TIME INCREASED FROM 10 TO 32
13C> (NECESSARY IN ORDER TO PROCESS MULTIPLE
14C> BUFR FILES UNDER THE MPI)
15C> 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
16C> INTERDEPENDENCIES
17C> 2003-11-04 D. KEYSER -- MAXJL (MAXIMUM NUMBER OF JUMP/LINK ENTRIES)
18C> INCREASED FROM 15000 TO 16000 (WAS IN
19C> VERIFICATION VERSION); UNIFIED/PORTABLE FOR
20C> WRF; ADDED DOCUMENTATION (INCLUDING
21C> HISTORY); OUTPUTS MORE COMPLETE DIAGNOSTIC
22C> INFO WHEN UNUSUAL THINGS HAPPEN
23C> 2009-03-31 J. WOOLLEN -- ADDED DOCUMENTATION
24C> 2009-04-21 J. ATOR -- USE ERRWRT
25C> 2014-12-10 J. ATOR -- USE MODULES INSTEAD OF COMMON BLOCKS
26C>
27C> USAGE: INVWIN (NODE, LUN, INV1, INV2)
28C> INPUT ARGUMENT LIST:
29C> NODE - INTEGER: JUMP/LINK TABLE INDEX TO LOOK FOR
30C> LUN - INTEGER: I/O STREAM INDEX INTO INTERNAL MEMORY ARRAYS
31C> INV1 - INTEGER: STARTING INDEX OF THE PORTION OF THE SUBSET
32C> BUFFER IN WHICH TO LOOK
33C> INV2 - INTEGER: ENDING INDEX OF THE PORTION OF THE SUBSET
34C> BUFFER IN WHICH TO LOOK
35C>
36C> OUTPUT ARGUMENT LIST:
37C> INVWIN - INTEGER: LOCATION INDEX OF NODE WITHIN SPECIFIED
38C> PORTION OF SUBSET BUFFER
39C> 0 = NOT FOUND
40C>
41C> REMARKS:
42C> THIS ROUTINE CALLS: ERRWRT
43C> THIS ROUTINE IS CALLED BY: DRSTPL GETWIN NEVN TRYBUMP
44C> UFBGET UFBRW UFBSEQ
45C> Normally not called by any application
46C> programs.
47C>
48 FUNCTION invwin(NODE,LUN,INV1,INV2)
49
50 USE moda_usrint
51
52 COMMON /quiet/ iprt
53
54C----------------------------------------------------------------------
55C----------------------------------------------------------------------
56
57 invwin = 0
58 IF(node.EQ.0) GOTO 200
59
60C SEARCH BETWEEN INV1 AND INV2
61C ----------------------------
62
6310 DO invwin=inv1,inv2
64 IF(inv(invwin,lun).EQ.node) GOTO 100
65 ENDDO
66
67 invwin = 0
68
69 200 IF(iprt.GE.2) THEN
70 CALL errwrt('++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
71 CALL errwrt('BUFRLIB: INVWIN - RETURNING WITH A VALUE OF 0')
72 CALL errwrt('++++++++++++++BUFR ARCHIVE LIBRARY+++++++++++++++++')
73 CALL errwrt(' ')
74 ENDIF
75
76C EXIT
77C ----
78
79100 RETURN
80 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 invwin(NODE, LUN, INV1, INV2)
THIS FUNCTION LOOKS FOR A SPECIFIED NODE WITHIN THE PORTION OF THE CURRENT SUBSET BUFFER BOUNDED BY T...
Definition: invwin.f:49