NCEPLIBS-bufr 11.7.1
drstpl.f
Go to the documentation of this file.
1C> @file
2C> @author WOOLLEN @date 1994-01-06
3
4C> THIS SUBROUTINE IS CALLED BY BUFR ARCHIVE LIBRARY SUBROUTINE
5C> UFBRW WHENEVER IT CAN'T FIND A MNEMONIC IT WANTS TO WRITE WITHIN THE
6C> CURRENT SUBSET BUFFER. IT LOOKS FOR THE MNEMONIC WITHIN ANY
7C> UNEXPANDED "DRS" (STACK) OR "DRB" (1-BIT DELAYED REPLICATION)
8C> SEQUENCES INSIDE OF THE PORTION OF THE SUBSET BUFFER BOUNDED BY THE
9C> INDICES INV1 AND INV2. IF FOUND, IT EXPANDS THE APPLICABLE "DRS" OR
10C> "DRB" SEQUENCE TO THE POINT WHERE THE MNEMONIC IN QUESTION NOW
11C> APPEARS IN THE SUBSET BUFFER, AND IN DOING SO IT WILL ALSO RETURN
12C> A NEW VALUE FOR INV2.
13C>
14C> PROGRAM HISTORY LOG:
15C> 1994-01-06 J. WOOLLEN -- ORIGINAL AUTHOR
16C> 1998-07-08 J. WOOLLEN -- REPLACED CALL TO CRAY LIBRARY ROUTINE
17C> "ABORT" WITH CALL TO NEW INTERNAL BUFRLIB
18C> ROUTINE "BORT" (LATER REMOVED, UNKNOWN
19C> WHEN)
20C> 2002-05-14 J. WOOLLEN -- REMOVED OLD CRAY COMPILER DIRECTIVES
21C> 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
22C> INTERDEPENDENCIES
23C> 2003-11-04 D. KEYSER -- MAXJL (MAXIMUM NUMBER OF JUMP/LINK ENTRIES)
24C> INCREASED FROM 15000 TO 16000 (WAS IN
25C> VERIFICATION VERSION); UNIFIED/PORTABLE FOR
26C> WRF; ADDED DOCUMENTATION (INCLUDING
27C> HISTORY)
28C> 2009-03-31 J. WOOLLEN -- ADDED ADDITIONAL DOCUMENTATION
29C> 2014-12-10 J. ATOR -- USE MODULES INSTEAD OF COMMON BLOCKS
30C>
31C> USAGE: CALL DRSTPL (INOD, LUN, INV1, INV2, INVN)
32C>
33C> INPUT ARGUMENT LIST:
34C> INOD - INTEGER: JUMP/LINK TABLE INDEX OF MNEMONIC TO LOOK FOR
35C> LUN - INTEGER: I/O STREAM INDEX INTO INTERNAL MEMORY ARRAYS
36C> INV1 - INTEGER: STARTING INDEX OF THE PORTION OF THE SUBSET
37C> BUFFER CURRENTLY BEING PROCESSED BY UFBRW
38C> INV2 - INTEGER: ENDING INDEX OF THE PORTION OF THE SUBSET
39C> BUFFER CURRENTLY BEING PROCESSED BY UFBRW
40C>
41C> OUTPUT ARGUMENT LIST:
42C> INVN - INTEGER: LOCATION INDEX OF INOD WITHIN SUBSET BUFFER:
43C> 0 = NOT FOUND
44C> INV2 - INTEGER: IF INVN = 0, THEN INV2 IS UNCHANGED FROM ITS
45C> INPUT VALUE. OTHERWISE, IT CONTAINS THE REDEFINED
46C> ENDING INDEX OF THE PORTION OF THE SUBSET BUFFER
47C> CURRENTLY BEING PROCESSED BY UFBRW, SINCE EXPANDING A
48C> DELAYED REPLICATION SEQUENCE WILL HAVE NECESSARILY
49C> INCREASED THE SIZE OF THIS BUFFER.
50C>
51C> REMARKS:
52C> THIS ROUTINE CALLS: INVWIN NEWWIN USRTPL
53C> THIS ROUTINE IS CALLED BY: UFBRW
54C> Normally not called by any application
55C> programs.
56C>
57 SUBROUTINE drstpl(INOD,LUN,INV1,INV2,INVN)
58
59 USE moda_tables
60
61C-----------------------------------------------------------------------
62C-----------------------------------------------------------------------
63
641 node = inod
652 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
79C EXIT
80C ----
81
82100 RETURN
83 END
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:58
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
This module contains array and variable declarations used to store the internal jump/link table.
Definition: moda_tables.F:13
character *3, dimension(:), allocatable typ
Type indicators corresponding to tag:
Definition: moda_tables.F:133
integer, dimension(:), allocatable jmpb
Jump backward indices corresponding to tag and typ:
Definition: moda_tables.F:137
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:52
subroutine usrtpl(LUN, INVN, NBMP)
THIS SUBROUTINE STORES THE SUBSET TEMPLATE INTO INTERNAL SUBSET ARRAYS IN MODULE USRINT FOR CASES OF ...
Definition: usrtpl.f:52