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