updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / external / bufr / iupb.f
blob1a98765b638a9efd7faf60f0b5a2f26e9640c9e7
1 FUNCTION IUPB(MBAY,NBYT,NBIT)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
5 C SUBPROGRAM: IUPB
6 C PRGMMR: WOOLLEN ORG: NP20 DATE: 1994-01-06
8 C ABSTRACT: THIS FUNCTION UNPACKS AND RETURNS A BINARY INTEGER WORD
9 C CONTAINED WITHIN NBIT BITS OF A BUFR MESSAGE PACKED INTO THE
10 C INTEGER ARRAY MBAY, STARTING WITH THE FIRST BIT OF BYTE NBYT.
12 C PROGRAM HISTORY LOG:
13 C 1994-01-06 J. WOOLLEN -- ORIGINAL AUTHOR
14 C 2003-11-04 J. ATOR -- ADDED DOCUMENTATION
15 C 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
16 C INTERDEPENDENCIES
17 C 2003-11-04 D. KEYSER -- UNIFIED/PORTABLE FOR WRF; ADDED HISTORY
18 C DOCUMENTATION
20 C USAGE: IUPB (MBAY, NBYT, NBIT)
21 C INPUT ARGUMENT LIST:
22 C MBAY - INTEGER: *-WORD PACKED BINARY ARRAY CONTAINING BUFR
23 C MESSAGE
24 C NBYT - INTEGER: BYTE WITHIN MBAY AT WHOSE FIRST BIT TO BEGIN
25 C UNPACKING
26 C NBIT - INTEGER: NUMBER OF BITS WITHIN MBAY TO BE UNPACKED
28 C OUTPUT ARGUMENT LIST:
29 C IUPB - INTEGER: UNPACKED INTEGER WORD
31 C REMARKS:
32 C THIS ROUTINE CALLS: UPB
33 C THIS ROUTINE IS CALLED BY: CKTABA CPYUPD GETLENS IUPBS01
34 C IUPBS3 MSGUPD MSGWRT RDMEMS
35 C STNDRD STRCPT SUBUPD UPDS3
36 C WRITLC
37 C Normally not called by any application
38 C programs.
40 C ATTRIBUTES:
41 C LANGUAGE: FORTRAN 77
42 C MACHINE: PORTABLE TO ALL PLATFORMS
44 C$$$
46 DIMENSION MBAY(*)
48 C----------------------------------------------------------------------
49 C----------------------------------------------------------------------
51 MBIT = (NBYT-1)*8
52 CALL UPB(IRET,NBIT,MBAY,MBIT)
53 IUPB = IRET
54 RETURN
55 END