NCEPLIBS-bufr
11.5.0
Main Page
Related Pages
Data Types List
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Pages
pkftbv.f
Go to the documentation of this file.
1
C> @file
2
C> @brief Determine the numerical data value equivalent to the
3
C> setting of a specified bit within a flag table.
4
5
C> This function computes the numerical value equivalent to the
6
C> setting of bit #IBIT within a flag table of NBITS bits.
7
C>
8
C> <p>If the computation fails for any reason, then the function
9
C> returns the current placeholder value for "missing" data.
10
C>
11
C> @author J. Ator
12
C> @date 2005-11-29
13
C>
14
C> @param[in] NBITS - integer: Total number of bits in flag table
15
C> @param[in] IBIT - integer: Number of bit to be set
16
C>
17
C> @returns pkftbv - real*8: Value equivalent to the setting of
18
C> bit #IBIT within a flag table of NBITS bits
19
C>
20
C> @remarks
21
C> - This function is the logical inverse of subroutine upftbv().
22
C> - According to the WMO standard, bits within a bit field are
23
C> numbered from left to right, so bit #1 is always the high-order
24
C> (i.e. most significant) bit in any bit field.
25
C>
26
C> <b>Program history log:</b>
27
C> - 2005-11-29 J. Ator -- Original version
28
C>
29
REAL*8
FUNCTION
pkftbv
(NBITS,IBIT)
30
31
USE
modv_bmiss
32
33
C----------------------------------------------------------------------
34
C----------------------------------------------------------------------
35
36
IF
((nbits.LE.0).OR.(ibit.LE.0).OR.(ibit.GT.nbits))
THEN
37
pkftbv
= bmiss
38
ELSE
39
pkftbv
= (2.)**(nbits-ibit)
40
ENDIF
41
42
RETURN
43
END
pkftbv
REAL *8 function pkftbv(NBITS, IBIT)
This function computes the numerical value equivalent to the setting of bit #IBIT within a flag table...
Definition:
pkftbv.f:29
modv_bmiss
This module declares and initializes the BMISS variable.
Definition:
modv_BMISS.f90:9
nceplibs-bufr
src
pkftbv.f
Generated by
1.8.5