1 REAL*8 FUNCTION PKFTBV
(NBITS
,IBIT
)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
6 C PRGMMR: JATOR ORG: NP12 DATE: 2005-11-29
8 C ABSTRACT: THIS FUNCTION COMPUTES AND RETURNS THE VALUE EQUIVALENT
9 C TO THE SETTING OF BIT# IBIT WITHIN A FLAG TABLE OF NBITS BITS.
10 C IF THE COMPUTATION FAILS FOR ANY REASON, THEN THE VALUE BMISS
11 C (10E10) IS RETURNED. NOTE THAT THIS SUBROUTINE IS THE LOGICAL
12 C INVERSE OF BUFRLIB SUBROUTINE UPFTBV.
14 C PROGRAM HISTORY LOG:
15 C 2005-11-29 J. ATOR -- ORIGINAL VERSION
17 C USAGE: PKFTBV (NBITS,IBIT)
18 C INPUT ARGUMENT LIST:
19 C NBITS - INTEGER: NUMBER OF BITS IN FLAG TABLE
20 C IBIT - INTEGER: NUMBER OF BIT TO BE SET WITHIN FLAG TABLE
22 C OUTPUT ARGUMENT LIST:
23 C PKFTBV - REAL*8: VALUE EQUIVALENT TO THE SETTING OF BIT# IBIT
24 C WITHIN A FLAG TABLE OF NBITS BITS.
27 C THIS ROUTINE CALLS: None
28 C THIS ROUTINE IS CALLED BY: None
29 C Normally called only by application
33 C LANGUAGE: FORTRAN 77
34 C MACHINE: PORTABLE TO ALL PLATFORMS
40 C----------------------------------------------------------------------
41 C----------------------------------------------------------------------
43 IF((NBITS
.LE
.0).OR
.(IBIT
.LE
.0).OR
.(IBIT
.GT
.NBITS
)) THEN
46 PKFTBV
= (2.)**(NBITS
-IBIT
)