1 SUBROUTINE NEWWIN
(LUN
,IWIN
,JWIN
)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
6 C PRGMMR: WOOLLEN ORG: NP20 DATE: 1994-01-06
8 C ABSTRACT: GIVEN AN INDEX WITHIN THE INTERNAL JUMP/LINK TABLE WHICH
9 C POINTS TO THE START OF AN "RPC" WINDOW (I.E. ITERATION OF AN 8-BIT
10 C OR 16-BIT DELAYED REPLICATION SEQUENCE), THIS SUBROUTINE COMPUTES
11 C THE ENDING INDEX OF THE WINDOW. ALTERNATIVELY, IF THE GIVEN INDEX
12 C POINTS TO THE START OF A "SUB" WINDOW (I.E. THE FIRST NODE OF A
13 C SUBSET), THE SUBROUTINE RETURNS THE INDEX OF THE LAST NODE.
15 C PROGRAM HISTORY LOG:
16 C 1994-01-06 J. WOOLLEN -- ORIGINAL AUTHOR
17 C 1998-07-08 J. WOOLLEN -- REPLACED CALL TO CRAY LIBRARY ROUTINE
18 C "ABORT" WITH CALL TO NEW INTERNAL BUFRLIB
20 C 1999-11-18 J. WOOLLEN -- THE NUMBER OF BUFR FILES WHICH CAN BE
21 C OPENED AT ONE TIME INCREASED FROM 10 TO 32
22 C (NECESSARY IN ORDER TO PROCESS MULTIPLE
23 C BUFR FILES UNDER THE MPI)
24 C 2002-05-14 J. WOOLLEN -- REMOVED OLD CRAY COMPILER DIRECTIVES
25 C 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
27 C 2003-11-04 D. KEYSER -- MAXJL (MAXIMUM NUMBER OF JUMP/LINK ENTRIES)
28 C INCREASED FROM 15000 TO 16000 (WAS IN
29 C VERIFICATION VERSION); UNIFIED/PORTABLE FOR
30 C WRF; ADDED DOCUMENTATION (INCLUDING
31 C HISTORY); OUTPUTS MORE COMPLETE DIAGNOSTIC
32 C INFO WHEN ROUTINE TERMINATES ABNORMALLY
33 C 2009-03-31 J. WOOLLEN -- ADDED DOCUMENTATION
34 C 2009-05-07 J. ATOR -- USE LSTJPB INSTEAD OF LSTRPC
36 C USAGE: CALL NEWWIN (LUN, IWIN, JWIN)
37 C INPUT ARGUMENT LIST:
38 C LUN - INTEGER: I/O STREAM INDEX INTO INTERNAL MEMORY ARRAYS
39 C IWIN - INTEGER: STARTING INDEX OF WINDOW ITERATION
41 C OUTPUT ARGUMENT LIST:
42 C JWIN - INTEGER: ENDING INDEX OF WINDOW ITERATION
46 C SEE THE DOCBLOCK IN BUFR ARCHIVE LIBRARY SUBROUTINE GETWIN FOR AN
47 C EXPLANATION OF "WINDOWS" WITHIN THE CONTEXT OF A BUFR DATA SUBSET.
49 C THIS ROUTINE CALLS: BORT LSTJPB
50 C THIS ROUTINE IS CALLED BY: DRSTPL UFBRW
51 C Normally not called by any application
55 C LANGUAGE: FORTRAN 77
56 C MACHINE: PORTABLE TO ALL PLATFORMS
62 COMMON /USRINT
/ NVAL
(NFILES
),INV
(MAXSS
,NFILES
),VAL
(MAXSS
,NFILES
)
64 CHARACTER*128 BORT_STR
67 C----------------------------------------------------------------------
68 C----------------------------------------------------------------------
72 C This is a "SUB" (subset) node, so return JWIN as pointing to
73 C the last value of the entire subset.
79 C Confirm that IWIN points to an RPC node and then compute JWIN.
82 IF(LSTJPB
(NODE
,LUN
,'RPC').NE
.NODE
) GOTO 900
83 JWIN
= IWIN
+VAL
(IWIN
,LUN
)
89 900 WRITE(BORT_STR
,'("BUFRLIB: NEWWIN - LSTJPB FOR NODE",I6,'//
90 . '" (LSTJPB=",I5,") DOES NOT EQUAL VALUE OF NODE, NOT RPC '//
91 . '(IWIN =",I8,")")') NODE
,LSTJPB
(NODE
,LUN
,'RPC'),IWIN