NCEPLIBS-bufr  11.7.0
 All Data Structures Files Functions Variables Pages
drstpl.f
Go to the documentation of this file.
1 C> @file
2 C> @author WOOLLEN @date 1994-01-06
3 
4 C> THIS SUBROUTINE IS CALLED BY BUFR ARCHIVE LIBRARY SUBROUTINE
5 C> UFBRW WHENEVER IT CAN'T FIND A MNEMONIC IT WANTS TO WRITE WITHIN THE
6 C> CURRENT SUBSET BUFFER. IT LOOKS FOR THE MNEMONIC WITHIN ANY
7 C> UNEXPANDED "DRS" (STACK) OR "DRB" (1-BIT DELAYED REPLICATION)
8 C> SEQUENCES INSIDE OF THE PORTION OF THE SUBSET BUFFER BOUNDED BY THE
9 C> INDICES INV1 AND INV2. IF FOUND, IT EXPANDS THE APPLICABLE "DRS" OR
10 C> "DRB" SEQUENCE TO THE POINT WHERE THE MNEMONIC IN QUESTION NOW
11 C> APPEARS IN THE SUBSET BUFFER, AND IN DOING SO IT WILL ALSO RETURN
12 C> A NEW VALUE FOR INV2.
13 C>
14 C> PROGRAM HISTORY LOG:
15 C> 1994-01-06 J. WOOLLEN -- ORIGINAL AUTHOR
16 C> 1998-07-08 J. WOOLLEN -- REPLACED CALL TO CRAY LIBRARY ROUTINE
17 C> "ABORT" WITH CALL TO NEW INTERNAL BUFRLIB
18 C> ROUTINE "BORT" (LATER REMOVED, UNKNOWN
19 C> WHEN)
20 C> 2002-05-14 J. WOOLLEN -- REMOVED OLD CRAY COMPILER DIRECTIVES
21 C> 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
22 C> INTERDEPENDENCIES
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)
28 C> 2009-03-31 J. WOOLLEN -- ADDED ADDITIONAL DOCUMENTATION
29 C> 2014-12-10 J. ATOR -- USE MODULES INSTEAD OF COMMON BLOCKS
30 C>
31 C> USAGE: CALL DRSTPL (INOD, LUN, INV1, INV2, INVN)
32 C>
33 C> INPUT ARGUMENT LIST:
34 C> INOD - 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 CURRENTLY BEING PROCESSED BY UFBRW
38 C> INV2 - INTEGER: ENDING INDEX OF THE PORTION OF THE SUBSET
39 C> BUFFER CURRENTLY BEING PROCESSED BY UFBRW
40 C>
41 C> OUTPUT ARGUMENT LIST:
42 C> INVN - INTEGER: LOCATION INDEX OF INOD WITHIN SUBSET BUFFER:
43 C> 0 = NOT FOUND
44 C> INV2 - INTEGER: IF INVN = 0, THEN INV2 IS UNCHANGED FROM ITS
45 C> INPUT VALUE. OTHERWISE, IT CONTAINS THE REDEFINED
46 C> ENDING INDEX OF THE PORTION OF THE SUBSET BUFFER
47 C> CURRENTLY BEING PROCESSED BY UFBRW, SINCE EXPANDING A
48 C> DELAYED REPLICATION SEQUENCE WILL HAVE NECESSARILY
49 C> INCREASED THE SIZE OF THIS BUFFER.
50 C>
51 C> REMARKS:
52 C> THIS ROUTINE CALLS: INVWIN NEWWIN USRTPL
53 C> THIS ROUTINE IS CALLED BY: UFBRW
54 C> Normally not called by any application
55 C> programs.
56 C>
57  SUBROUTINE drstpl(INOD,LUN,INV1,INV2,INVN)
58 
59  USE moda_tables
60 
61 C-----------------------------------------------------------------------
62 C-----------------------------------------------------------------------
63 
64 1 node = inod
65 2 node = jmpb(node)
66  IF(node.EQ.0) goto 100
67  IF(typ(node).EQ.'DRS' .OR. typ(node).EQ.'DRB') THEN
68  invn = invwin(node,lun,inv1,inv2)
69  IF(invn.GT.0) THEN
70  CALL usrtpl(lun,invn,1)
71  CALL newwin(lun,inv1,inv2)
72  invn = invwin(inod,lun,invn,inv2)
73  IF(invn.GT.0) goto 100
74  goto 1
75  ENDIF
76  ENDIF
77  goto 2
78 
79 C EXIT
80 C ----
81 
82 100 RETURN
83  END
subroutine usrtpl(LUN, INVN, NBMP)
THIS SUBROUTINE STORES THE SUBSET TEMPLATE INTO INTERNAL SUBSET ARRAYS IN MODULE USRINT FOR CASES OF ...
Definition: usrtpl.f:51
This module contains array and variable declarations used to store the internal jump/link table...
Definition: moda_tables.F:13
subroutine drstpl(INOD, LUN, INV1, INV2, INVN)
THIS SUBROUTINE IS CALLED BY BUFR ARCHIVE LIBRARY SUBROUTINE UFBRW WHENEVER IT CAN'T FIND A MNEMONIC ...
Definition: drstpl.f:57
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
subroutine newwin(LUN, IWIN, JWIN)
GIVEN AN INDEX WITHIN THE INTERNAL JUMP/LINK TABLE WHICH POINTS TO THE START OF AN "RPC" WINDOW (I...
Definition: newwin.f:51