1 SUBROUTINE UPB
(NVAL
,NBITS
,IBAY
,IBIT
)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
6 C PRGMMR: WOOLLEN ORG: NP20 DATE: 1994-01-06
8 C ABSTRACT: THIS SUBROUTINE UNPACKS AND RETURNS A BINARY INTEGER
9 C CONTAINED WITHIN NBITS BITS OF IBAY, STARTING WITH BIT (IBIT+1).
10 C ON OUTPUT, IBIT IS UPDATED TO POINT TO THE LAST BIT THAT WAS
11 C UNPACKED. THIS IS SIMILAR TO BUFR ARCHIVE LIBRARY SUBROUTINE UPBB,
12 C EXCEPT IN UPBB IBIT IS NOT UPDATED UPON OUTPUT (AND THE ORDER OF
13 C ARGUMENTS IS DIFFERENT).
15 C PROGRAM HISTORY LOG:
16 C 1994-01-06 J. WOOLLEN -- ORIGINAL AUTHOR
17 C 2003-05-19 J. ATOR -- ADDED CHECK FOR NBITS EQUAL TO ZERO
18 C 2003-11-04 J. ATOR -- ADDED DOCUMENTATION
19 C 2003-11-04 J. WOOLLEN -- BIG-ENDIAN/LITTLE-ENDIAN INDEPENDENT (WAS
21 C 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
23 C 2003-11-04 D. KEYSER -- UNIFIED/PORTABLE FOR WRF; ADDED HISTORY
25 C 2009-03-23 J. ATOR -- REWROTE TO CALL UPBB
27 C USAGE: CALL UPB (NVAL, NBITS, IBAY, IBIT)
28 C INPUT ARGUMENT LIST:
29 C NBITS - INTEGER: NUMBER OF BITS OF IBAY WITHIN WHICH TO UNPACK
31 C IBAY - INTEGER: *-WORD PACKED BINARY ARRAY CONTAINING PACKED
33 C IBIT - INTEGER: BIT POINTER WITHIN IBAY INDICATING BIT AFTER
34 C WHICH TO START UNPACKING
36 C OUTPUT ARGUMENT LIST:
37 C NVAL - INTEGER: UNPACKED INTEGER
38 C IBIT - INTEGER: BIT POINTER WITHIN IBAY INDICATING LAST BIT
42 C THIS SUBROUTINE IS THE INVERSE OF BUFR ARCHIVE LIBRARY ROUTINE
45 C THIS ROUTINE CALLS: UPBB
46 C THIS ROUTINE IS CALLED BY: COPYSB IUPB MVB RDCMPS
47 C RDMGSB READSB STNDRD UFBINX
48 C UFBPOS UFBTAB UFBTAM UPC
50 C Normally not called by any application
54 C LANGUAGE: FORTRAN 77
55 C MACHINE: PORTABLE TO ALL PLATFORMS
61 C----------------------------------------------------------------------
62 C----------------------------------------------------------------------
64 CALL UPBB
(NVAL
,NBITS
,IBIT
,IBAY
)