NCEPLIBS-bufr 11.7.1
upb.f
Go to the documentation of this file.
1C> @file
2C> @author WOOLLEN @date 1994-01-06
3
4C> THIS SUBROUTINE UNPACKS AND RETURNS A BINARY INTEGER
5C> CONTAINED WITHIN NBITS BITS OF IBAY, STARTING WITH BIT (IBIT+1).
6C> ON OUTPUT, IBIT IS UPDATED TO POINT TO THE LAST BIT THAT WAS
7C> UNPACKED. THIS IS SIMILAR TO BUFR ARCHIVE LIBRARY SUBROUTINE UPBB,
8C> EXCEPT IN UPBB IBIT IS NOT UPDATED UPON OUTPUT (AND THE ORDER OF
9C> ARGUMENTS IS DIFFERENT).
10C>
11C> PROGRAM HISTORY LOG:
12C> 1994-01-06 J. WOOLLEN -- ORIGINAL AUTHOR
13C> 2003-05-19 J. ATOR -- ADDED CHECK FOR NBITS EQUAL TO ZERO
14C> 2003-11-04 J. ATOR -- ADDED DOCUMENTATION
15C> 2003-11-04 J. WOOLLEN -- BIG-ENDIAN/LITTLE-ENDIAN INDEPENDENT (WAS
16C> IN DECODER VERSION)
17C> 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
18C> INTERDEPENDENCIES
19C> 2003-11-04 D. KEYSER -- UNIFIED/PORTABLE FOR WRF; ADDED HISTORY
20C> DOCUMENTATION
21C> 2009-03-23 J. ATOR -- REWROTE TO CALL UPBB
22C>
23C> USAGE: CALL UPB (NVAL, NBITS, IBAY, IBIT)
24C> INPUT ARGUMENT LIST:
25C> NBITS - INTEGER: NUMBER OF BITS OF IBAY WITHIN WHICH TO UNPACK
26C> NVAL
27C> IBAY - INTEGER: *-WORD PACKED BINARY ARRAY CONTAINING PACKED
28C> NVAL
29C> IBIT - INTEGER: BIT POINTER WITHIN IBAY INDICATING BIT AFTER
30C> WHICH TO START UNPACKING
31C>
32C> OUTPUT ARGUMENT LIST:
33C> NVAL - INTEGER: UNPACKED INTEGER
34C> IBIT - INTEGER: BIT POINTER WITHIN IBAY INDICATING LAST BIT
35C> THAT WAS UNPACKED
36C>
37C> REMARKS:
38C> THIS SUBROUTINE IS THE INVERSE OF BUFR ARCHIVE LIBRARY ROUTINE
39C> PKB.
40C>
41C> THIS ROUTINE CALLS: UPBB
42C> THIS ROUTINE IS CALLED BY: COPYSB IUPB MVB RDCMPS
43C> RDMGSB READSB STNDRD UFBINX
44C> UFBPOS UFBTAB UFBTAM UPC
45C> WRCMPS WRITLC
46C> Normally not called by any application
47C> programs.
48C>
49 SUBROUTINE upb(NVAL,NBITS,IBAY,IBIT)
50
51
52
53 dimension ibay(*)
54
55C----------------------------------------------------------------------
56C----------------------------------------------------------------------
57
58 CALL upbb(nval,nbits,ibit,ibay)
59
60 ibit = ibit+nbits
61
62 RETURN
63 END
subroutine upb(NVAL, NBITS, IBAY, IBIT)
THIS SUBROUTINE UNPACKS AND RETURNS A BINARY INTEGER CONTAINED WITHIN NBITS BITS OF IBAY,...
Definition: upb.f:50
subroutine upbb(NVAL, NBITS, IBIT, IBAY)
THIS SUBROUTINE UNPACKS AND RETURNS A BINARY INTEGER CONTAINED WITHIN NBITS BITS OF IBAY,...
Definition: upbb.f:43